summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/webvicli/webvicli/client.py22
1 files changed, 11 insertions, 11 deletions
diff --git a/src/webvicli/webvicli/client.py b/src/webvicli/webvicli/client.py
index 3d63080..c15f073 100644
--- a/src/webvicli/webvicli/client.py
+++ b/src/webvicli/webvicli/client.py
@@ -487,17 +487,17 @@ class WVClient:
# Found url, now find a working media player
for player in self.streamplayers:
if '%s' not in player:
- playcmd = player + ' ' + streamurl
- else:
- try:
- # Hack for playing from fifo in VLC
- if 'vlc' in player and streamurl.startswith('file://'):
- streamurl = 'stream://' + streamurl[len('file://'):]
-
- playcmd = player % streamurl
- except TypeError:
- print 'Can\'t substitute URL in', player
- continue
+ player = player + ' %s'
+
+ try:
+ # Hack for playing from fifo in VLC
+ if 'vlc' in player and streamurl.startswith('file://'):
+ streamurl = 'stream://' + streamurl[len('file://'):]
+
+ playcmd = player.replace('%s', streamurl, 1)
+ except TypeError:
+ print 'Can\'t substitute URL in', player
+ continue
try:
print 'Trying player: ' + playcmd