Skip to content

Commit

Permalink
fix: add videos to current playlist when parsing arguments
Browse files Browse the repository at this point in the history
  • Loading branch information
vzhd1701 committed Jun 10, 2022
1 parent eb4249e commit 857d959
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
8 changes: 3 additions & 5 deletions gridplayer/player/managers/playlist.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,11 +113,9 @@ def process_arguments(self, argv):
self.error.emit(tr("No supported files or URLs!"))
return

playlist = Playlist(videos=videos)
self.videos_loaded.emit(videos)

self.load_playlist(playlist)

self._saved_playlist = None
self.alert.emit()

def load_playlist_file(self, playlist_file: Path):
try:
Expand Down Expand Up @@ -158,7 +156,7 @@ def load_playlist(self, playlist: Playlist):

self.is_seek_synced_loaded.emit(playlist.is_seek_synced)

self.playlist_loaded.emit()
self.alert.emit()

def check_playlist_save(self):
if not Settings().get("playlist/track_changes"):
Expand Down
1 change: 0 additions & 1 deletion gridplayer/player/player.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,6 @@ def __init__(self, **kwargs):
("s.arguments_received", "process_arguments"),
("playlist_closed", "video_blocks.close_all"),
("playlist_closed", "window_state.restore_to_minimum"),
("playlist_loaded", "window_state.activate_window"),
("window_state_loaded", "window_state.restore_window_state"),
("grid_state_loaded", "grid.set_grid_state"),
("is_seek_synced_loaded", "video_blocks.set_seek_synced"),
Expand Down

0 comments on commit 857d959

Please sign in to comment.