Fixed a bug that could deadlock the player
This commit is contained in:
parent
02e77662ac
commit
a99679eda5
2 changed files with 3 additions and 0 deletions
|
@ -154,6 +154,7 @@ class Source(ABC):
|
|||
"mpv",
|
||||
*args,
|
||||
stdout=asyncio.subprocess.PIPE,
|
||||
stderr=asyncio.subprocess.PIPE,
|
||||
)
|
||||
return await mpv_process
|
||||
|
||||
|
@ -306,6 +307,7 @@ class Source(ABC):
|
|||
self.downloaded_files[entry.ident].audio,
|
||||
*extra_options,
|
||||
)
|
||||
await self.player.communicate()
|
||||
await self.player.wait()
|
||||
self.player = None
|
||||
if self._skip_next:
|
||||
|
|
|
@ -257,6 +257,7 @@ class YoutubeSource(Source):
|
|||
"--fullscreen",
|
||||
mpv_options,
|
||||
)
|
||||
await self.player.communicate()
|
||||
await self.player.wait()
|
||||
else:
|
||||
await super().play(entry, mpv_options)
|
||||
|
|
Loading…
Add table
Reference in a new issue