Compare commits

..

No commits in common. "5b99f8aae32d332d01dd6bc2615dd4228c20ec1d" and "b2005030f23dd774014d50048b038fb6e464f2c1" have entirely different histories.

3 changed files with 4 additions and 21 deletions

View File

@ -1,6 +1,6 @@
[tool.poetry] [tool.poetry]
name = "voicemeeter-api" name = "voicemeeter-api"
version = "2.0.2" version = "2.0.1"
description = "A Python wrapper for the Voiceemeter API" description = "A Python wrapper for the Voiceemeter API"
authors = ["onyx-and-iris <code@onyxandiris.online>"] authors = ["onyx-and-iris <code@onyxandiris.online>"]
license = "MIT" license = "MIT"

View File

@ -250,19 +250,3 @@ class Midi:
def _set(self, key: int, velocity: int): def _set(self, key: int, velocity: int):
self.cache[key] = velocity self.cache[key] = velocity
class VmGui:
_launched = None
@property
def launched(self) -> bool:
return self._launched
@launched.setter
def launched(self, val: bool):
self._launched = val
@property
def launched_by_api(self):
return not self.launched

View File

@ -10,7 +10,7 @@ from .error import CAPIError, VMError
from .event import Event from .event import Event
from .inst import bits from .inst import bits
from .kinds import KindId from .kinds import KindId
from .misc import Midi, VmGui from .misc import Midi
from .subject import Subject from .subject import Subject
from .updater import Producer, Updater from .updater import Producer, Updater
from .util import grouper, polling, script from .util import grouper, polling, script
@ -32,7 +32,6 @@ class Remote(CBindings):
self.event = Event( self.event = Event(
{k: kwargs.pop(k) for k in ("pdirty", "mdirty", "midi", "ldirty")} {k: kwargs.pop(k) for k in ("pdirty", "mdirty", "midi", "ldirty")}
) )
self.gui = VmGui()
self.logger = logger.getChild(self.__class__.__name__) self.logger = logger.getChild(self.__class__.__name__)
for attr, val in kwargs.items(): for attr, val in kwargs.items():
@ -64,8 +63,8 @@ class Remote(CBindings):
def login(self) -> NoReturn: def login(self) -> NoReturn:
"""Login to the API, initialize dirty parameters""" """Login to the API, initialize dirty parameters"""
self.gui.launched = self.call(self.vm_login, ok=(0, 1)) == 0 res = self.call(self.vm_login, ok=(0, 1))
if not self.gui.launched: if res == 1:
self.logger.info( self.logger.info(
"Voicemeeter engine running but GUI not launched. Launching the GUI now." "Voicemeeter engine running but GUI not launched. Launching the GUI now."
) )