Skip to content
Permalink
Browse files

Merge pull request #106 from gtmanfred/master

cli: Attempt to load config from $XDG_CONFIG_HOME/livestreamer/config if it exists.
  • Loading branch information...
chrippa committed Apr 2, 2013
2 parents d13e4bc + aa121df commit ea805917d8ed3d0b95fa9a375cbe9bf84f3395bb
Showing with 7 additions and 1 deletion.
  1. +1 −0 docs/cli.rst
  2. +6 −1 src/livestreamer_cli/constants.py
@@ -174,6 +174,7 @@ is capable of reading arguments from a file instead, a sort of configuration fil
Livestreamer will look for this file in different locations depending on your platform:

**Unix-like OSs**
``~/.config/livestreamer/config``
``~/.livestreamerrc``

**Windows**
@@ -25,7 +25,12 @@
if is_win32:
RCFILE = os.path.join(os.environ["APPDATA"], "livestreamer", "livestreamerrc")
else:
RCFILE = os.path.expanduser("~/.livestreamerrc")
XDGCONFIGHOME=os.environ.get('XDG_CONFIG_HOME')
if not XDGCONFIGHOME:
XDGCONFIGHOME="~/.config"
RCFILE = os.path.expanduser(XDGCONFIGHOME + "/livestreamer/config")
if not os.path.isfile(RCFILE):
RCFILE = os.path.expanduser("~/.livestreamerrc")


EXAMPLE_USAGE = """

0 comments on commit ea80591

Please sign in to comment.
You can’t perform that action at this time.