mirror of
https://github.com/StuffAnThings/qbit_manage.git
synced 2025-11-10 00:10:46 +08:00
Update cross_seed bug causing double recheck
This commit is contained in:
parent
4954ae6c04
commit
28aec747c8
1 changed files with 2 additions and 3 deletions
|
|
@ -167,11 +167,11 @@ def get_torrent_info(t_list):
|
||||||
return torrentdict
|
return torrentdict
|
||||||
|
|
||||||
# Function used to recheck paused torrents sorted by size and resume torrents that are completed
|
# Function used to recheck paused torrents sorted by size and resume torrents that are completed
|
||||||
def recheck(torrentdict=None):
|
def recheck():
|
||||||
if args.cross_seed == 'cross_seed' or args.manage == 'manage' or args.recheck == 'recheck':
|
if args.cross_seed == 'cross_seed' or args.manage == 'manage' or args.recheck == 'recheck':
|
||||||
#sort by size and paused
|
#sort by size and paused
|
||||||
torrent_sorted_list = client.torrents.info(status_filter='paused',sort='size')
|
torrent_sorted_list = client.torrents.info(status_filter='paused',sort='size')
|
||||||
if torrentdict is None: torrentdict = get_torrent_info(client.torrents.info(sort='added_on',reverse=True))
|
torrentdict = get_torrent_info(client.torrents.info(sort='added_on',reverse=True))
|
||||||
for torrent in torrent_sorted_list:
|
for torrent in torrent_sorted_list:
|
||||||
new_tag = [get_tags(x.url) for x in torrent.trackers if x.url.startswith('http')]
|
new_tag = [get_tags(x.url) for x in torrent.trackers if x.url.startswith('http')]
|
||||||
if torrent.tags == '': torrent.add_tags(tags=new_tag)
|
if torrent.tags == '': torrent.add_tags(tags=new_tag)
|
||||||
|
|
@ -242,7 +242,6 @@ def cross_seed():
|
||||||
logger.dryrun(f'{t_name} not found in torrents.')
|
logger.dryrun(f'{t_name} not found in torrents.')
|
||||||
else:
|
else:
|
||||||
logger.warning(f'{t_name} not found in torrents.')
|
logger.warning(f'{t_name} not found in torrents.')
|
||||||
recheck(torrentdict)
|
|
||||||
numcategory = Counter(categories)
|
numcategory = Counter(categories)
|
||||||
if args.dry_run == 'dry_run':
|
if args.dry_run == 'dry_run':
|
||||||
for c in numcategory:
|
for c in numcategory:
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue