Better error handling for cross_seed and bug fixes

This commit is contained in:
Jon 2021-11-26 13:15:21 -05:00
parent d5aca4cc56
commit cd2b0e0dd4
No known key found for this signature in database
GPG key ID: 9665BA6CF5DC2671
3 changed files with 7 additions and 2 deletions

View file

@ -1 +1 @@
2.0
2.1

View file

@ -31,7 +31,7 @@ def print_stacktrace():
def my_except_hook(exctype, value, tb):
for line in traceback.format_exception(etype=exctype, value=value, tb=tb):
print_multiline(line, critical=True)
print_multiline(line, 'CRITICAL')
def centered(text, sep=" "):

View file

@ -326,6 +326,11 @@ def set_cross_seed():
total = 0
#Track # of torrents tagged that are not cross-seeded
t_tagged = 0
if not os.path.exists(os.path.join(cfg['directory']['cross_seed'], '')):
logger.error(f"Path Error: cross_seed directory not found at {os.path.abspath(os.path.join(cfg['directory']['cross_seed'], ''))}")
return
# Only get torrent files
cs_files = [f for f in os.listdir(os.path.join(cfg['directory']['cross_seed'], '')) if f.endswith('torrent')]
dir_cs = os.path.join(cfg['directory']['cross_seed'], '')