Added stream option
This commit is contained in:
@@ -7,6 +7,7 @@ from gui.modules import settings
|
||||
from gui.modules import restreammic
|
||||
from gui.modules import explorer
|
||||
from gui.modules import collections
|
||||
from gui.modules import stream
|
||||
from modules.player.player import Player
|
||||
from modules.restream.restream import Restreamer
|
||||
|
||||
@@ -19,3 +20,4 @@ def register_handlers(ui: Ui_MainWindow, MainWindow: QMainWindow, p: Player, rs:
|
||||
restreammic.register_handlers(ui, MainWindow, rs)
|
||||
explorer.register_handlers(ui, p)
|
||||
collections.register_handlers(ui, p)
|
||||
stream.register_handlers(ui, p)
|
||||
|
||||
1
gui/modules/stream/__init__.py
Normal file
1
gui/modules/stream/__init__.py
Normal file
@@ -0,0 +1 @@
|
||||
from .handlers import *
|
||||
12
gui/modules/stream/handlers.py
Normal file
12
gui/modules/stream/handlers.py
Normal file
@@ -0,0 +1,12 @@
|
||||
from gui.gui import Ui_MainWindow
|
||||
from modules.player.player import Player
|
||||
|
||||
|
||||
def register_handlers(ui: Ui_MainWindow, p: Player):
|
||||
ui.play_stream_button.clicked.connect(
|
||||
lambda: (
|
||||
p.set_media(ui.to_stream_url_box.text()),
|
||||
ui.stream_logs_box.append(f"Playing {ui.to_stream_url_box.text()}"),
|
||||
p.play(ui)
|
||||
)
|
||||
)
|
||||
Reference in New Issue
Block a user