diff options
Diffstat (limited to 'helpers/__init__.py')
-rw-r--r-- | helpers/__init__.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/helpers/__init__.py b/helpers/__init__.py index 534e168..f1a968b 100644 --- a/helpers/__init__.py +++ b/helpers/__init__.py | |||
@@ -33,6 +33,10 @@ def parse_args(): | |||
33 | default="config.yml", | 33 | default="config.yml", |
34 | required=False, | 34 | required=False, |
35 | help="Config file to load") | 35 | help="Config file to load") |
36 | parser.add_argument("-p", "--music-path", | ||
37 | default=".", | ||
38 | required=False, | ||
39 | help="Folder in which to find the music files") | ||
36 | parser.add_argument("-d", "--debug", | 40 | parser.add_argument("-d", "--debug", |
37 | nargs=0, | 41 | nargs=0, |
38 | action=DebugModeAction, | 42 | action=DebugModeAction, |
@@ -98,6 +102,10 @@ def parse_args(): | |||
98 | Config.channels = args.channels | 102 | Config.channels = args.channels |
99 | Config.sample_width = args.sample_width | 103 | Config.sample_width = args.sample_width |
100 | Config.builtin_mixing = args.builtin_mixing | 104 | Config.builtin_mixing = args.builtin_mixing |
105 | if args.music_path.endswith("/"): | ||
106 | Config.music_path = args.music_path | ||
107 | else: | ||
108 | Config.music_path = args.music_path + "/" | ||
101 | 109 | ||
102 | class DebugModeAction(argparse.Action): | 110 | class DebugModeAction(argparse.Action): |
103 | def __call__(self, parser, namespace, values, option_string=None): | 111 | def __call__(self, parser, namespace, values, option_string=None): |