don't remove pending downloads

This commit is contained in:
j 2019-01-21 12:25:48 +05:30
parent 7220fb4cdd
commit fb04c9fef0
2 changed files with 5 additions and 1 deletions

View file

@ -201,6 +201,8 @@ def run_scan():
if gone: if gone:
for id in gone: for id in gone:
i = Item.get(id) i = Item.get(id)
if i.info.get('mediastate') == 'transferring':
continue
path = i.get_path() path = i.get_path()
if not path or not os.path.exists(path): if not path or not os.path.exists(path):
logger.debug('cleaning orphaned record %s %s', i, path) logger.debug('cleaning orphaned record %s %s', i, path)

View file

@ -155,7 +155,9 @@ class Tor(object):
self.controller.add_event_listener(self.event_listener) self.controller.add_event_listener(self.event_listener)
self.controller.add_status_listener(self.status_listener) self.controller.add_status_listener(self.status_listener)
self.connected = True self.connected = True
self.socks_port = int(self.controller.get_conf('SocksPort').split(' ')[0]) port = self.controller.get_conf('SocksPort')
if port:
self.socks_port = int(port.split(' ')[0])
self.publish() self.publish()
state.online = self.is_online() state.online = self.is_online()
return True return True