Thermopyle Posted January 11, 2010 Report Share Posted January 11, 2010 It looks like the 'targets' key in resume.dat is used for the Relocate feature. This key works like this as far as I can tell:[*] Not present on multi file torrents that haven't been relocated[*] Present on single file torrents[*] Present on multi file torrents with files that have been relocatedDoes anyone know how to map from the files listed in 'targets' to the appropriate file in the .torrent['info']['files'] key? For example, based upon resume.dat I'm trying to locate where utorrent is currently seeding a file from. For .torrent['info']['files'] = filename.avi, resume.dat[.torrent]['targets'] may have "C:\relocated\newfilename.avi". This is easy if it's just a single-file torrent. However, if it's a multi-file torrent...how do I determine the correct mapping from ['files'] to ['targets']? Filesize is one idea, but it's possible to have two different files with the same size. Link to comment Share on other sites More sharing options...
Ultima Posted January 11, 2010 Report Share Posted January 11, 2010 The targets key is a list that contains other lists, each consisting of [ index, path ], where index is the zero-based index of the file as listed in the .torrent file's info dictionary. Link to comment Share on other sites More sharing options...
Thermopyle Posted January 11, 2010 Author Report Share Posted January 11, 2010 Thanks, Ultima. I knew it was a list of lists, I just glossed over that point in my description thinking it unimportant. I didnt think about the indexes mapping to each other, though.Thanks! Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.