[RPC] How do I use the files-wanted array

Ask for help and report issues not specific to either the Mac OS X or GTK+ versions of Transmission
Post Reply
goestav.x
Posts: 2
Joined: Thu Apr 18, 2019 12:27 am

[RPC] How do I use the files-wanted array

Post by goestav.x »

Hi,

I'm new to using the Transmission RPC and I can't figure out how I can get the files of a torrent.

I only want to download the images in the torrents, so I thought I'd just read an array of the files in a torrent and then check the mime type.
But the problem is, I can't figure out how I can read the files in a torrent before adding it to Transmission (or passing it through the RPC).

(I pass a magnet link to the torrent-add [https://trac.transmissionbt.com/browser ... c.txt#L356])
killemov
Posts: 542
Joined: Sat Jul 31, 2010 5:04 pm

Re: [RPC] How do I use the files-wanted array

Post by killemov »

"read the files in a torrent" is in conflict with "pass a magnet link". Reading the torrent-file itself outside of Transmission has nothing to do with Transmission and requires you to know bencode. The moment you add the magnet, which is basically the torrent hash only, to Transmission there is no file data to be read. You have to wait for Transmission to get the torrent metadata from an external source before you can select anything. That's why it would be better to add the torrent file itself if you have it.
goestav.x
Posts: 2
Joined: Thu Apr 18, 2019 12:27 am

Re: [RPC] How do I use the files-wanted array

Post by goestav.x »

Thanks for explaining!
Post Reply