Created attachment 476693 [details]
Patch to make Tracker Details tab functional
Description of problem:
The Tracker Details tab doesn't function properly, because:
(a) it fails to handle announce-lists with multiple tracker groups, which has become the norm
(b) the scrape code expects the tracker URL to end in an info_hash parameter (which I've never seen), instead of adding that parameter
Version-Release number of selected component (if applicable): 0.2b-20.fc14
The attached patch corrects both of these issues.
I've submitted it upstream as well, but there's been no developer activity on the gtorrentviewer sourceforge project in something like 2 years, and its CVS repository doesn't even seem to be accessible anymore, so I'm not optimistic about the patch being applied there anytime soon.
(Make that 6 years... I don't know why the sourceforge summary page claimed activity 500-something days ago, but the latest released project files are from 2004.)
Indeed, no activity for many years.
The unpatched upstream version actually crashes if you press the "Refresh" button on the "Tracker Details" tab with a modern gtk library.
Thanks for the patch, it definitely improves things and I'll be pushing updates for Rawhide, F-14 and F-13 shortly.
gtorrentviewer-0.2b-21.fc14 has been submitted as an update for Fedora 14.
gtorrentviewer-0.2b-21.fc13 has been submitted as an update for Fedora 13.
gtorrentviewer-0.2b-21.fc13 has been pushed to the Fedora 13 testing repository. If problems still persist, please make note of it in this bug report.
If you want to test the update, you can install it with
su -c 'yum --enablerepo=updates-testing update gtorrentviewer'. You can provide feedback for this update here: https://admin.fedoraproject.org/updates/gtorrentviewer-0.2b-21.fc13
Looks good, thanks Paul! I installed the gtorrentviewer-0.2b-21.fc14 build from updates-testing, it functions identically to the local build I used to generate the patch.
It's worth noting that, while I believe my patch is an overall improvement and therefore worth distributing, it's still a hack. The new code should work properly for the majority of "typical" torrents/trackers, but will definitely break (in a graceful way, with connection-failed or bad-data messages) for some URLs. There are a few spots that could use further attention, though... I'll briefly list some outstanding issues here (for lack of a better place). This way, they're documented somewhere public; perhaps someone else can improve the code. (Or maybe I'll feel inspired to revisit it down the road.)
1. The current quick-and-dirty logic should work for tracker URLs of the form "http://host[:port]/announce" (by far the most common), but the code as patched explicitly still does NOT implement the full logic from the scrape "standard", as documented here:
1. the udp: trackers really shouldn't be listed at all, since they can't be scraped. The selections should be limited to http: trackers.
2. As noted above, the scrape "standard" is documented, and includes rules for determining whether a tracker supports scrape based on its URL. Any "non-scrapeable" tracker URLs should also be excluded.
gtorrentviewer-0.2b-21.fc14 has been pushed to the Fedora 14 stable repository. If problems still persist, please make note of it in this bug report.
gtorrentviewer-0.2b-21.fc13 has been pushed to the Fedora 13 stable repository. If problems still persist, please make note of it in this bug report.