Skip to content

Commit

Permalink
Fixed: VLC backend throws exception when no media
Browse files Browse the repository at this point in the history
  • Loading branch information
pozitronik committed Nov 8, 2024
1 parent 88bdbe4 commit 1ea5f90
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sinner/models/audio/VLCAudioBackend.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ class VLCAudioBackend(BaseAudioBackend):
def __init__(self, parameters: Namespace, media_path: str | None = None) -> None:
super().__init__(parameters, media_path)
self._vlc_instance = vlc.Instance() if self._show_player_window else vlc.Instance(['--intf=dummy', '--no-video'])
self._player = self._vlc_instance.media_player_new(uri=media_path) if media_path else self._vlc_instance.media_player_new
self._player: vlc.MediaPlayer = self._vlc_instance.media_player_new(uri=media_path) if media_path else self._vlc_instance.media_player_new()

@property
def volume(self) -> int:
Expand Down

0 comments on commit 1ea5f90

Please sign in to comment.