dont fail without mediastate

This commit is contained in:
j 2016-01-19 17:42:45 +05:30
parent 51c5c38477
commit a91358d574

View file

@ -340,7 +340,7 @@ class Item(db.Model):
first_peer = m first_peer = m
# of fall back to first peer that has this item # of fall back to first peer that has this item
# in case its not available locally # 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) #logger.debug('syncing from first peer that has item %s', first_peer)
sync_from = first_peer sync_from = first_peer
if sync_from: if sync_from: