You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In Python I was able to successfully use the following to retrieve tracker data of each torrent files:
torrents = qbt_client.torrents_info()
Detect trackers of each torrents added to qbittorent:
for t in torrents:
for tracker in t.trackers:
print(tracker.url)
Get save path of each torrents added to qbittorent:
for t in torrents:
currentPath = t.info['save_path']
I need to get the individual files that are check marked for 'Download/Upload' in the Contents tab.
From there I need to determine if the file exists. This is because I had to relocate files to a temporary hard drive location, and some of these files are symbolic links that are no longer valid.
Edit: I think I figured it out. The following will generate a list of dictionaries, with each dictionaries representing the files with a checkbox next to them:
for t in torrents:
print(t.files)
It will have key with 'priority', and a corresponding integer as value.
The key 'name', will have a subfolder (if any), and the file extension at the end.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
In Python I was able to successfully use the following to retrieve tracker data of each torrent files:
torrents = qbt_client.torrents_info()Detect trackers of each torrents added to qbittorent:
Get save path of each torrents added to qbittorent:
I need to get the individual files that are check marked for 'Download/Upload' in the Contents tab.
From there I need to determine if the file exists. This is because I had to relocate files to a temporary hard drive location, and some of these files are symbolic links that are no longer valid.
I've been looking through the docs here: https://qbittorrent-api.readthedocs.io/_/downloads/en/latest/pdf/
And it seem torrents_info(), has nothing in regards to content or priority.
Edit: I think I figured it out. The following will generate a list of dictionaries, with each dictionaries representing the files with a checkbox next to them:
It will have key with 'priority', and a corresponding integer as value.
The key 'name', will have a subfolder (if any), and the file extension at the end.
I hope this post helps someone else.
Beta Was this translation helpful? Give feedback.
All reactions