From ecb020250d89b6a25b9b6b4fadb33b585994e094 Mon Sep 17 00:00:00 2001 From: Christopher Rosell Date: Mon, 18 Jun 2012 18:02:06 +0200 Subject: Use "rtmpdump.exe" on Windows. --- src/livestreamer/compat.py | 3 ++- src/livestreamer/stream.py | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/livestreamer/compat.py b/src/livestreamer/compat.py index 4e007fa..a0a055d 100644 --- a/src/livestreamer/compat.py +++ b/src/livestreamer/compat.py @@ -1,9 +1,10 @@ #!/usr/bin/env python -import sys +import sys, os is_py2 = (sys.version_info[0] == 2) is_py3 = (sys.version_info[0] == 3) +is_win32 = os.name == "nt" if is_py2: input = raw_input diff --git a/src/livestreamer/stream.py b/src/livestreamer/stream.py index 486e620..a6aac3b 100644 --- a/src/livestreamer/stream.py +++ b/src/livestreamer/stream.py @@ -1,6 +1,6 @@ from livestreamer import options from livestreamer.utils import urlopen -from livestreamer.compat import str +from livestreamer.compat import str, is_win32 import os import pbs @@ -48,7 +48,7 @@ class RTMPStream(StreamProcess): def __init__(self, params): StreamProcess.__init__(self, params) - self.rtmpdump = options.get("rtmpdump") or "rtmpdump" + self.rtmpdump = options.get("rtmpdump") or (is_win32 and "rtmpdump.exe" or "rtmpdump") self.params["flv"] = "-" try: -- cgit v1.2.3