forked from Wobbl/Wobuzz
OOPing it more: Removed gui_communication/track_control.py and the complete gui_communication directory.
This commit is contained in:
parent
07e53ef2e7
commit
cd6d37497f
9 changed files with 126 additions and 156 deletions
|
@ -33,7 +33,7 @@ class Player:
|
|||
self.playing = True
|
||||
self.paused = False
|
||||
|
||||
self.app.gui_communication.on_playstate_update()
|
||||
self.app.gui.track_control.on_playstate_update()
|
||||
|
||||
def track_finished(self):
|
||||
if not self.current_playlist.on_last_track():
|
||||
|
@ -42,7 +42,7 @@ class Player:
|
|||
|
||||
self.play()
|
||||
self.track_progress.start()
|
||||
self.app.gui_communication.on_track_change(previous_track, self.current_playlist.current_track)
|
||||
self.app.gui.on_track_change(previous_track, self.current_playlist.current_track)
|
||||
|
||||
else:
|
||||
self.stop()
|
||||
|
@ -54,9 +54,9 @@ class Player:
|
|||
self.play()
|
||||
self.track_progress.start()
|
||||
|
||||
self.app.gui_communication.on_track_change(None, self.current_playlist.current_track)
|
||||
self.app.gui.on_track_change(None, self.current_playlist.current_track)
|
||||
|
||||
self.app.gui_communication.on_playstate_update()
|
||||
self.app.gui.track_control.on_playstate_update()
|
||||
|
||||
def play_track_in_playlist(self, track_index):
|
||||
self.stop()
|
||||
|
@ -67,14 +67,14 @@ class Player:
|
|||
|
||||
self.play()
|
||||
self.track_progress.start()
|
||||
self.app.gui_communication.on_track_change(previous_track, self.current_playlist.current_track)
|
||||
self.app.gui.on_track_change(previous_track, self.current_playlist.current_track)
|
||||
|
||||
def pause(self):
|
||||
self.music_channel.pause()
|
||||
self.track_progress.pause()
|
||||
self.paused = True
|
||||
|
||||
self.app.gui_communication.on_playstate_update()
|
||||
self.app.gui.track_control.on_playstate_update()
|
||||
|
||||
def unpause(self):
|
||||
self.music_channel.unpause()
|
||||
|
@ -83,7 +83,7 @@ class Player:
|
|||
self.playing = True
|
||||
self.paused = False
|
||||
|
||||
self.app.gui_communication.on_playstate_update()
|
||||
self.app.gui.track_control.on_playstate_update()
|
||||
|
||||
def next_track(self):
|
||||
if not self.current_playlist.on_last_track():
|
||||
|
@ -104,7 +104,7 @@ class Player:
|
|||
self.play()
|
||||
self.track_progress.start()
|
||||
|
||||
self.app.gui_communication.on_track_change(last_track, self.current_playlist.current_track)
|
||||
self.app.gui.on_track_change(last_track, self.current_playlist.current_track)
|
||||
|
||||
def stop(self):
|
||||
self.music_channel.stop()
|
||||
|
@ -114,7 +114,7 @@ class Player:
|
|||
self.playing = False
|
||||
self.paused = False
|
||||
|
||||
self.app.gui_communication.on_playstate_update()
|
||||
self.app.gui.track_control.on_playstate_update()
|
||||
|
||||
def seek(self, position: int):
|
||||
self.music_channel.stop()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue