info might be empty

This commit is contained in:
j 2016-02-25 13:09:10 +05:30
parent 988d030f92
commit 1c2ef33353

View file

@ -323,7 +323,7 @@ def sync_db():
first = False first = False
logger.debug('sync items') logger.debug('sync items')
i.update(commit=False) i.update(commit=False)
if i.info['mediastate'] == 'unavailable' and state.tasks: if i.info.get('mediastate') == 'unavailable' and state.tasks:
state.tasks.queue('getpreview', i.id) state.tasks.queue('getpreview', i.id)
commit = True commit = True
#logger.debug('sync:%s', i) #logger.debug('sync:%s', i)