dont fail without mediastate

This commit is contained in:
j 2016-01-19 17:42:45 +05:30
parent 51c5c38477
commit a91358d574
1 changed files with 1 additions and 1 deletions

View File

@ -340,7 +340,7 @@ class Item(db.Model):
first_peer = m
# of fall back to first peer that has this item
# in case its not available locally
if not sync_from and self.info['mediastate'] != 'available' and first_peer:
if not sync_from and self.info.get('mediastate') != 'available' and first_peer:
#logger.debug('syncing from first peer that has item %s', first_peer)
sync_from = first_peer
if sync_from: