diff --git a/oml/library.py b/oml/library.py index 9e49c55..037f0c4 100644 --- a/oml/library.py +++ b/oml/library.py @@ -323,7 +323,7 @@ def sync_db(): first = False logger.debug('sync items') 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) commit = True #logger.debug('sync:%s', i)