Improve black hole support
Also scan the 'from' folder if Black hole is used together with another downloader.
This commit is contained in:
@@ -51,10 +51,10 @@ class Blackhole(Downloader):
|
|||||||
with open(full_path, 'wb') as f:
|
with open(full_path, 'wb') as f:
|
||||||
f.write(filedata)
|
f.write(filedata)
|
||||||
os.chmod(full_path, Env.getPermission('file'))
|
os.chmod(full_path, Env.getPermission('file'))
|
||||||
return True
|
return self.downloadReturnId('')
|
||||||
else:
|
else:
|
||||||
log.info('File %s already exists.', full_path)
|
log.info('File %s already exists.', full_path)
|
||||||
return True
|
return self.downloadReturnId('')
|
||||||
|
|
||||||
except:
|
except:
|
||||||
log.error('Failed to download to blackhole %s', traceback.format_exc())
|
log.error('Failed to download to blackhole %s', traceback.format_exc())
|
||||||
|
|||||||
@@ -288,7 +288,7 @@ class Release(Plugin):
|
|||||||
value = toUnicode(download_result.get(key))
|
value = toUnicode(download_result.get(key))
|
||||||
)
|
)
|
||||||
rls.info.append(rls_info)
|
rls.info.append(rls_info)
|
||||||
db.commit()
|
db.commit()
|
||||||
|
|
||||||
log_movie = '%s (%s) in %s' % (getTitle(media['library']), media['library']['year'], rls.quality.label)
|
log_movie = '%s (%s) in %s' % (getTitle(media['library']), media['library']['year'], rls.quality.label)
|
||||||
snatch_message = 'Snatched "%s": %s' % (data.get('name'), log_movie)
|
snatch_message = 'Snatched "%s": %s' % (data.get('name'), log_movie)
|
||||||
|
|||||||
@@ -827,6 +827,11 @@ Remove it if you want it to be renamed (again, or at least let it try again)
|
|||||||
fireEvent('release.update_status', rel.id, status = ignored_status, single = True)
|
fireEvent('release.update_status', rel.id, status = ignored_status, single = True)
|
||||||
continue
|
continue
|
||||||
|
|
||||||
|
if not rel_dict['info'].get('download_id'):
|
||||||
|
log.debug('Download status functionality is not implemented for downloader (%s) of release %s.', (rel_dict['info'].get('download_downloader', 'unknown'), rel_dict['info']['name']))
|
||||||
|
scan_required = True
|
||||||
|
continue
|
||||||
|
|
||||||
# check status
|
# check status
|
||||||
nzbname = self.createNzbName(rel_dict['info'], movie_dict)
|
nzbname = self.createNzbName(rel_dict['info'], movie_dict)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user