Skip to content
Snippets Groups Projects
Commit a20f1d85 authored by ale's avatar ale
Browse files

fix the logic for realtime_watch option

parent 70017873
No related branches found
No related tags found
No related merge requests found
...@@ -109,8 +109,7 @@ def main(): ...@@ -109,8 +109,7 @@ def main():
help='URL to the API endpoint') help='URL to the API endpoint')
parser.add_option('--bwlimit', type='int', parser.add_option('--bwlimit', type='int',
help='Bandwidth limit (in KBps, default unlimited)') help='Bandwidth limit (in KBps, default unlimited)')
parser.add_option('--realtime_watch', action='store_true', parser.add_option('--no_realtime_watch', action='store_true',
default=True,
help='Monitor music_dir in realtime') help='Monitor music_dir in realtime')
daemonize.add_standard_options(parser) daemonize.add_standard_options(parser)
utils.read_config_defaults( utils.read_config_defaults(
...@@ -127,9 +126,7 @@ def main(): ...@@ -127,9 +126,7 @@ def main():
# Reading from the configuration file will set this variable to # Reading from the configuration file will set this variable to
# a string, convert it back into boolean. # a string, convert it back into boolean.
do_realtime = opts.realtime_watch do_realtime = not opts.no_realtime_watch
if isinstance(do_realtime, basestring):
do_realtime = (do_realtime.lower() in ('true', 'on', 'yes'))
daemonize.daemonize(opts, run_client, daemonize.daemonize(opts, run_client,
(opts.server_url, opts.music_dir, opts.api_key, (opts.server_url, opts.music_dir, opts.api_key,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment