mirror of
https://github.com/StuffAnThings/qbit_manage.git
synced 2025-10-06 11:57:20 +08:00
Better error handling for cross_seed and bug fixes
This commit is contained in:
parent
d5aca4cc56
commit
cd2b0e0dd4
3 changed files with 7 additions and 2 deletions
2
VERSION
2
VERSION
|
@ -1 +1 @@
|
||||||
2.0
|
2.1
|
|
@ -31,7 +31,7 @@ def print_stacktrace():
|
||||||
|
|
||||||
def my_except_hook(exctype, value, tb):
|
def my_except_hook(exctype, value, tb):
|
||||||
for line in traceback.format_exception(etype=exctype, value=value, tb=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=" "):
|
def centered(text, sep=" "):
|
||||||
|
|
|
@ -326,6 +326,11 @@ def set_cross_seed():
|
||||||
total = 0
|
total = 0
|
||||||
#Track # of torrents tagged that are not cross-seeded
|
#Track # of torrents tagged that are not cross-seeded
|
||||||
t_tagged = 0
|
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
|
# Only get torrent files
|
||||||
cs_files = [f for f in os.listdir(os.path.join(cfg['directory']['cross_seed'], '')) if f.endswith('torrent')]
|
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'], '')
|
dir_cs = os.path.join(cfg['directory']['cross_seed'], '')
|
||||||
|
|
Loading…
Add table
Reference in a new issue