From 2846ee256b11ec3e577fab35f0c063e6428951b3 Mon Sep 17 00:00:00 2001 From: Christopher Rosell Date: Thu, 23 Aug 2012 23:37:37 +0200 Subject: Change location of livestreamerrc on Windows. --- README.md | 2 +- src/livestreamer/cli.py | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 7144428..e63ad63 100644 --- a/README.md +++ b/README.md @@ -49,7 +49,7 @@ Using Saving arguments AKA config file -------------------------------- -Livestreamer can read arguments from the file ~/.livestreamerrc. +Livestreamer can read arguments from the file ~/.livestreamerrc (POSIX) or %APPDATA%\livestreamer\livestreamerrc (Windows). A example file: player=mplayer diff --git a/src/livestreamer/cli.py b/src/livestreamer/cli.py index b6a4b94..e04f545 100644 --- a/src/livestreamer/cli.py +++ b/src/livestreamer/cli.py @@ -65,7 +65,10 @@ pluginopt.add_argument("-r", "--rtmpdump", metavar="path", pluginopt.add_argument("-j", "--jtv-cookie", metavar="cookie", help="Specify JustinTV cookie to allow access to subscription channels") -RCFILE = os.path.expanduser("~/.livestreamerrc") +if is_win32: + RCFILE = os.path.join(os.environ["APPDATA"], "livestreamer", "livestreamerrc") +else: + RCFILE = os.path.expanduser("~/.livestreamerrc") def exit(msg): sys.exit(("error: {0}").format(msg)) -- cgit v1.2.3