Merge remote-tracking branch 'rudi/cc-4652' into 2.2.x
This commit is contained in:
commit
e9524c8615
|
@ -202,6 +202,12 @@ class Manager(Loggable):
|
|||
organize.
|
||||
"""
|
||||
store_paths = mmp.expand_storage(store)
|
||||
# First attempt to make sure that all paths exist before adding any
|
||||
# watches
|
||||
for path_type, path in store_paths.iteritems():
|
||||
try: mmp.create_dir(path)
|
||||
except mmp.FailedToCreateDir as e: self.unexpected_exception(e)
|
||||
|
||||
self.set_problem_files_path(store_paths['problem_files'])
|
||||
self.set_imported_path(store_paths['imported'])
|
||||
self.set_recorded_path(store_paths['recorded'])
|
||||
|
|
|
@ -104,6 +104,9 @@ def main(global_config, api_client_config, log_config,
|
|||
airtime_notifier = AirtimeNotifier(config, airtime_receiver)
|
||||
|
||||
store = apiclient.setup_media_monitor()
|
||||
|
||||
log.info("Initing with the following airtime response:%s" % str(store))
|
||||
|
||||
airtime_receiver.change_storage({ 'directory':store[u'stor'] })
|
||||
|
||||
for watch_dir in store[u'watched_dirs']:
|
||||
|
@ -115,6 +118,7 @@ def main(global_config, api_client_config, log_config,
|
|||
(given from the database)." % watch_dir)
|
||||
if os.path.exists(watch_dir):
|
||||
airtime_receiver.new_watch({ 'directory':watch_dir }, restart=True)
|
||||
else: log.info("Failed to add watch on %s" % str(watch_dir))
|
||||
|
||||
bs = Bootstrapper( db=sdb, watch_signal='watch' )
|
||||
|
||||
|
|
Loading…
Reference in New Issue