sync
This commit is contained in:
15
tool/core/cmd/stop.py
Normal file
15
tool/core/cmd/stop.py
Normal file
@@ -0,0 +1,15 @@
|
||||
from core.utils import console, console_err
|
||||
from core.protocol import COMMANDS
|
||||
|
||||
class stop:
|
||||
def __init__(self, bus):
|
||||
self.bus = bus
|
||||
|
||||
def get(self):
|
||||
self.bus.send_request(COMMANDS['stop'])
|
||||
data = self.bus.receive_ack()
|
||||
return data is not None and data.get('type') == 'ack'
|
||||
|
||||
def print(self, result):
|
||||
if result:
|
||||
console.print("⏹ Wiedergabe gestoppt und Warteschlange geleert.")
|
||||
Reference in New Issue
Block a user