aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorGravatar Christopher Rosell <chrippa@tanuki.se>2012-03-21 16:31:41 +0100
committerGravatar Christopher Rosell <chrippa@tanuki.se>2012-03-21 16:31:41 +0100
commit1f413ed99ca82fc35e004b627654e3e41b8704a2 (patch)
treee62091114f52d4842e7d6062007aaa471dc92778 /src
parent0f3765749001279fe232914bfa852650c4fd1162 (diff)
Move CLI related constant to cli.py.
Diffstat (limited to 'src')
-rw-r--r--src/livestreamer/__init__.py4
-rw-r--r--src/livestreamer/cli.py6
2 files changed, 3 insertions, 7 deletions
diff --git a/src/livestreamer/__init__.py b/src/livestreamer/__init__.py
index 255b5b4..7b5a628 100644
--- a/src/livestreamer/__init__.py
+++ b/src/livestreamer/__init__.py
@@ -1,10 +1,6 @@
from livestreamer import plugins
from livestreamer.compat import urlparse
-import os.path
-
-RCFILE = os.path.expanduser("~/.livestreamerrc")
-
def resolve_url(url):
parsed = urlparse(url)
diff --git a/src/livestreamer/cli.py b/src/livestreamer/cli.py
index 58c935c..c395319 100644
--- a/src/livestreamer/cli.py
+++ b/src/livestreamer/cli.py
@@ -1,7 +1,6 @@
#!/usr/bin/env python3
import sys, os
-
import livestreamer
parser = livestreamer.utils.ArgumentParser(description="Util to play various livestreaming services in a custom player",
@@ -13,6 +12,7 @@ parser.add_argument("-o", "--output", metavar="filename", help="write stream to
parser.add_argument("-c", "--cmdline", action="store_true", help="print commandline used internally to play stream")
parser.add_argument("-l", "--plugins", action="store_true", help="print installed plugins")
+RCFILE = os.path.expanduser("~/.livestreamerrc")
def exit(msg):
sys.stderr.write("error: " + msg + "\n")
@@ -64,8 +64,8 @@ def main():
arglist = sys.argv[1:]
- if os.path.exists(livestreamer.RCFILE):
- arglist.insert(0, "@" + livestreamer.RCFILE)
+ if os.path.exists(RCFILE):
+ arglist.insert(0, "@" + RCFILE)
args = parser.parse_args(arglist)