Pass -- to mpv/mplayer before filename (#3219)

* Pass -- to mpv/mplayer before filename

* Pass -- in as a separate argument (dae)
This commit is contained in:
Abdo 2024-06-01 11:44:24 +03:00 committed by GitHub
parent 06f7aa393d
commit 8d2e8b1e4f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -306,7 +306,7 @@ class SimpleProcessPlayer(Player): # pylint: disable=abstract-method
def _play(self, tag: AVTag) -> None:
assert isinstance(tag, SoundOrVideoTag)
self._process = subprocess.Popen(
self.args + [tag.filename],
self.args + ["--", tag.filename],
env=self.env,
cwd=self._media_folder,
stdout=subprocess.DEVNULL,
@ -478,7 +478,7 @@ class SimpleMplayerSlaveModePlayer(SimpleMplayerPlayer):
filename = hooks.media_file_filter(tag.filename)
self._process = subprocess.Popen(
self.args + [filename],
self.args + ["--", filename],
env=self.env,
cwd=self.media_folder,
stdin=subprocess.PIPE,