queue_cache = BasicFileStorage(
args._cache_path['queue'])
- for entry in db.media_entries.find():
+ for entry in db.MediaEntry.find():
for name, path in entry['media_files'].items():
_log.info('Importing: {0} - {1}'.format(
entry.title,
global_config, app_config = setup_global_and_app_config(args.conf_file)
connection, db = setup_connection_and_db_from_config(
- app_config, use_pymongo=True)
+ app_config)
tf = tarfile.open(
args.tar_file,
queue_cache = BasicFileStorage(
args._cache_path['queue'])
- for entry in db.media_entries.find():
+ for entry in db.MediaEntry.find():
for name, path in entry['media_files'].items():
_log.info(u'Exporting {0} - {1}'.format(
entry.title,
mc_file = media_cache.get_file(path, mode='wb')
mc_file.write(
mg_globals.public_store.get_file(path, mode='rb').read())
- except e:
+ except Exception as e:
_log.error('Failed: {0}'.format(e))
_log.info('...Media exported')
setup_storage()
connection, db = setup_connection_and_db_from_config(
- app_config, use_pymongo=True)
+ app_config)
_export_database(db, args)