removed direct usage of api client to AirtimeDB which encapsulates that behaviour

This commit is contained in:
Rudi Grinberg 2012-11-16 12:36:58 -05:00
parent 11214d754d
commit cf6e1d66ee
1 changed files with 7 additions and 1 deletions

View File

@ -15,6 +15,7 @@ from media.monitor.airtime import AirtimeNotifier, AirtimeMessageReceiver
from media.monitor.watchersyncer import WatchSyncer
from media.monitor.eventdrainer import EventDrainer
from media.monitor.manager import Manager
from media.monitor.syncdb import AirtimeDB
from media.saas.airtimeinstance import AirtimeInstance
class MM2(InstanceThread, Loggable):
@ -49,7 +50,12 @@ class MM2(InstanceThread, Loggable):
airtime_receiver = AirtimeMessageReceiver(config,manager)
airtime_notifier = AirtimeNotifier(config, airtime_receiver)
store = apiclient.setup_media_monitor()
adb = AirtimeDB(apiclient)
store = {
u'stor' : adb.storage_path(),
u'watched_dirs' : adb.list_watched(),
}
self.logger.info("initializing mm with directories: %s" % str(store))