diff options
-rw-r--r-- | pyagl/services/audiomixer.py | 2 | ||||
-rw-r--r-- | pyagl/services/base.py | 3 | ||||
-rw-r--r-- | pyagl/services/mediascanner.py | 4 | ||||
-rw-r--r-- | pyagl/tests/test_mediascanner.py | 2 |
4 files changed, 6 insertions, 5 deletions
diff --git a/pyagl/services/audiomixer.py b/pyagl/services/audiomixer.py index 7d14cc8..6e447b7 100644 --- a/pyagl/services/audiomixer.py +++ b/pyagl/services/audiomixer.py @@ -31,7 +31,7 @@ class AudioMixerService(AGLBaseService): parser.add_argument('--getvolume', help='Get volume level', action='store_true') def __init__(self, ip, port=None, service='agl-service-audiomixer'): - super().__init__(api='audiomixer', ip=ip, port=port, service=service, runservice=True) + super().__init__(api='audiomixer', ip=ip, port=port, service=service) async def subscribe(self, event='volume_changed'): # audio mixer uses 'event' instead 'value', return await self.request('subscribe', {'event': event}) diff --git a/pyagl/services/base.py b/pyagl/services/base.py index 320abde..cd69f55 100644 --- a/pyagl/services/base.py +++ b/pyagl/services/base.py @@ -133,7 +133,8 @@ class AGLBaseService: return parser def __init__(self, api: str, ip: str, port: str = None, url: str = None, - token: str = 'HELLO', uuid: str = 'magic', service: str = None, runservice: bool = False): + token: str = 'HELLO', uuid: str = 'magic', service: str = None, + runservice: bool = False, timeout: float = 5.0): self.api = api self.url = url self.ip = ip diff --git a/pyagl/services/mediascanner.py b/pyagl/services/mediascanner.py index b40457f..3a6e876 100644 --- a/pyagl/services/mediascanner.py +++ b/pyagl/services/mediascanner.py @@ -25,8 +25,8 @@ class MediaScannerService(AGLBaseService): parser = AGLBaseService.getparser() parser.add_argument('--media_result', help='Query media_results verb', action='store_true') - def __init__(self, ip, port=None, service='agl-service-mediascanner', runservice=True): - super().__init__(api='mediascanner', ip=ip, port=port, service=service, runservice=runservice) + def __init__(self, ip, port=None, service='agl-service-mediascanner'): + super().__init__(api='mediascanner', ip=ip, port=port, service=service) # more init stuff specific to the new service async def media_result(self): diff --git a/pyagl/tests/test_mediascanner.py b/pyagl/tests/test_mediascanner.py index 9aba4b0..a4d57ee 100644 --- a/pyagl/tests/test_mediascanner.py +++ b/pyagl/tests/test_mediascanner.py @@ -33,7 +33,7 @@ def event_loop(): async def service(): address = os.environ.get('AGL_TGT_IP', 'localhost') port = os.environ.get('AGL_TGT_PORT', None) - ns = await mss(ip=address, port=port, runservice=True) + ns = await mss(ip=address, port=port) yield ns await ns.websocket.close() |