Skip to content

Commit

Permalink
remove debug spam when searching qbittorrent api for .torrent match
Browse files Browse the repository at this point in the history
  • Loading branch information
L4GSP1KE committed Jun 20, 2023
1 parent 792c9f9 commit c1353bc
Showing 1 changed file with 0 additions and 7 deletions.
7 changes: 0 additions & 7 deletions src/clients.py
Original file line number Diff line number Diff line change
Expand Up @@ -199,23 +199,16 @@ async def search_qbit_for_torrent(self, meta, client):
torrent_path = torrent_path.replace(os.sep, '/').replace('/', os.sep)

if meta['is_disc'] in ("", None) and len(meta['filelist']) == 1:
if meta['debug']:
console.log(f"[yellow]{torrent_path=}\n{meta['path']=}\n")
if torrent_path == meta['filelist'][0] and len(torrent.files) == len(meta['filelist']):
valid, torrent_path = await self.is_valid_torrent(meta, f"{torrent_storage_dir}/{torrent.hash}.torrent", torrent.hash, 'qbit', print_err=False)
if valid:
console.print(f"[green]Found a matching .torrent with hash: [bold yellow]{torrent.hash}")
return torrent.hash
elif meta['path'] == torrent_path:
if meta['debug']:
console.log(f"[yellow]{torrent_path=}\n{meta['path']=}\n")
valid, torrent_path = await self.is_valid_torrent(meta, f"{torrent_storage_dir}/{torrent.hash}.torrent", torrent.hash, 'qbit', print_err=False)
if valid:
console.print(f"[green]Found a matching .torrent with hash: [bold yellow]{torrent.hash}")
return torrent.hash
else:
if meta['debug']:
console.log(f"[red]{torrent_path=}\n{meta['path']=}\n")
return None


Expand Down

0 comments on commit c1353bc

Please sign in to comment.