Skip to content
This repository was archived by the owner on May 2, 2026. It is now read-only.

Commit eb8c443

Browse files
committed
fix(player): vlc on android
1 parent b052ee8 commit eb8c443

2 files changed

Lines changed: 8 additions & 4 deletions

File tree

viu_media/libs/player/mpv/player.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ def play(self, params):
5252
if TORRENT_REGEX.match(params.url) and detect.is_running_in_termux():
5353
raise ViuError("Unable to play torrents on termux")
5454
elif params.syncplay and detect.is_running_in_termux():
55-
raise ViuError("Unable to play torrents on termux")
55+
raise ViuError("Unable to play with syncplay on termux")
5656
elif detect.is_running_in_termux():
5757
return self._play_on_mobile(params)
5858
else:

viu_media/libs/player/vlc/player.py

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,10 +46,11 @@ def play(self, params: PlayerParams) -> PlayerResult:
4646
Returns:
4747
PlayerResult: Information about the playback session.
4848
"""
49-
if not self.executable:
50-
raise ViuError("VLC executable not found in PATH.")
51-
5249
if TORRENT_REGEX.match(params.url) and detect.is_running_in_termux():
50+
raise ViuError("Unable to play torrents on termux")
51+
elif params.syncplay and detect.is_running_in_termux():
52+
raise ViuError("Unable to play with syncplay on termux")
53+
elif detect.is_running_in_termux():
5354
return self._play_on_mobile(params)
5455
else:
5556
return self._play_on_desktop(params)
@@ -116,6 +117,9 @@ def _play_on_desktop(self, params: PlayerParams) -> PlayerResult:
116117
Returns:
117118
PlayerResult: Information about the playback session.
118119
"""
120+
if not self.executable:
121+
raise ViuError("VLC executable not found in PATH.")
122+
119123
if TORRENT_REGEX.search(params.url):
120124
return self._stream_on_desktop_with_webtorrent_cli(params)
121125

0 commit comments

Comments
 (0)