Exporting all torrent data

Other platforms, generic questions.
Post Reply
Sunshine
Newbie
Newbie
Posts: 3
Joined: Sat Feb 17, 2024 12:43 pm

Exporting all torrent data

Post by Sunshine »

I was wondering if I can make a handy database of all downloaded torrents. I upgraded qBittorrent to the last version (5.0.2), then switched to SQLite fastresume data. Surprisingly, only about half of torrents have a name in the DB file.

How can I get the full dataset of downloaded torrents, e.g. having all the names, etc?
User avatar
Peter
Administrator
Administrator
Posts: 3049
Joined: Wed Jul 07, 2010 6:14 pm

Re: Exporting all torrent data

Post by Peter »

Sunshine
Newbie
Newbie
Posts: 3
Joined: Sat Feb 17, 2024 12:43 pm

Re: Exporting all torrent data

Post by Sunshine »

Thank you your fast answer.
For me as not a programmer, API calls are way more complex and time-consuming solution. Still I can act like a script kiddie, but the learning curve takes a tremendous time (2 level queries, loops, etc.), which is sad - especially because using SQLite data would be perfect if half of the data were not missing for some mysterious reason at random.
That's why I asked if there was some kind of switch or method to include all the information in the database, not just randomly selected ones.
User avatar
Peter
Administrator
Administrator
Posts: 3049
Joined: Wed Jul 07, 2010 6:14 pm

Re: Exporting all torrent data

Post by Peter »

I get that and it's a good question. Thing is, I had all the data in SQLite when I changed it, so someone would need all your saved settings which contains quite a few sensitive data (passkey, download names, etc.) So I'd just use code still.

Programmers are not needed anymore.
Just use an LLM ("AI")!

I typed
- With qBittorrent API
- How can I get the full dataset of downloaded torrents, e.g. having all the names, etc?

And it already wrote me all the code with curl.
Then it also wrote me a Python example.

Of course you can specify which data you want from the torrents, what you want to do with it, etc. It will write you the whole code from start to finish, you just copy-paste, spot obvious errors, etc. Like you just need this and that data, and it should write it out to a file, etc. It'll do it all for you.

For debugging, I recommend PyCharm for example.
Sunshine
Newbie
Newbie
Posts: 3
Joined: Sat Feb 17, 2024 12:43 pm

Re: Exporting all torrent data

Post by Sunshine »

Thanks for the encouragement! With your method I was finally able to get all data into my spreadheet to analyze it.

Some observations/obsticles on the way:
  • The titles has missing names in the db has also no names in the .fastresume files, I found the values are zero:
    :qBt-name0:
  • Libreoffice Calc CSV import is broken: the last part of data is duplicated, so the last record followed a broken record, and continued the last several lines again.
Conclusion: Problem solved. It still bothers me a bit that .fastresume (and DB) has missing data, which somehow qBittorrent can handle, collecting them from .torrent files.
User avatar
Peter
Administrator
Administrator
Posts: 3049
Joined: Wed Jul 07, 2010 6:14 pm

Re: Exporting all torrent data

Post by Peter »

- Interesting about titles. I'd check the Github Issues tracker and see if anything is up for the SQLite stuff. Pull requests, open tickets, something. Since it's experimental, it has to have open tickets.
- Calc CSV - I only had to import data sets from like one kind of device and that worked. But you can always also use Excel (I know, eww). If you click Data tab on top, you can import from Text and it handles CSV pretty nicely. I know, not many people like Excel, just saying. You can of course make PDF or any other stuff too. How? Just ask your favorite LLM. No kidding, they will generate you code for Python that will graph out whatever you want. It's neat stuff.

I know its' not magic; if you studied data science for example, you know the libraries, the code, good for ya. But for someone who never touched that stuff, this is useful.
Post Reply