Opened 9 years ago

Closed 9 years ago

Last modified 9 years ago

#4914 closed Bug (fixed)

Misshandling announce including scrape fields

Reported by: rb07 Owned by: jordan
Priority: Low Milestone: 2.60
Component: Transmission Version: 2.52
Severity: Minor Keywords: tracker announce scrape needinfo
Cc:

Description

Use case: a tracker with http URL, no 'announce' in the URL, returns only 'complete' and 'incomplete' fields.

Example of such tracker: thebox

Very simple fix included.

Attachments (1)

announcer.c.patch (623 bytes) - added by rb07 9 years ago.
Fixes using the scrape info returned by announce.

Download all attachments as: .zip

Change History (10)

Changed 9 years ago by rb07

Fixes using the scrape info returned by announce.

comment:1 Changed 9 years ago by rb07

Side notes:

Tested with the daemon, and Qt client.

transmission-show, on the other hand, doesn't work with this case, but looking at the code it seems that it doesn't handle many use cases, not just this one. Still strange since 'transmission-remote -t ## --info-trackers' has no problem.

comment:2 follow-up: Changed 9 years ago by jordan

  • Keywords needinfo added
  • Milestone changed from None Set to 2.53
  • Owner set to jordan
  • Status changed from new to assigned

I don't understand what error is being reported in this ticket...?

Some trackers return all the scrape information (seeders, downloaders, downloads) in their announce responses. In those cases, the announce response parser checks for this case so that it can avoid an unnecessary scrape.

Changing >= 3 to >= 2 in the case you describe would prevent libtransmission from scraping the tracker to learn how many times the torrent's been downloaded.

transmission-show doesn't do announces at all.

comment:3 in reply to: ↑ 2 Changed 9 years ago by rb07

Replying to jordan:

I don't understand what error is being reported in this ticket...?

The error is that scrape stats are never shown.

Some trackers return all the scrape information (seeders, downloaders, downloads) in their announce responses. In those cases, the announce response parser checks for this case so that it can avoid an unnecessary scrape.

Yes.

Changing >= 3 to >= 2 in the case you describe would prevent libtransmission from scraping the tracker to learn how many times the torrent's been downloaded.

You missed the part in the description that says: there is no 'announce' in the URL, so scrapping is never done.

What this change does is allow the information gathered in the announce to be shown. In my test case there is no 'downloads' field, so that will never be known, but the others are there.

transmission-show doesn't do announces at all.

Option -s does scrapes... or not? I really don't care about transmission-show, I was just commenting that it seems very limited.

comment:4 Changed 9 years ago by rb07

Perhaps this is better (it won't prevent a scrape, if a scrape can be done):

            if( scrape_fields >= 3 ||
              ( scrape_fields == 2 && tracker->scrape == NULL ) )

Untested.

comment:5 Changed 9 years ago by jordan

transmission-show doesn't do announces at all.

Option -s does scrapes... or not? I really don't care about transmission-show, I was just commenting that it seems very limited.

If the .torrent doesn't give information on where to send the scrape request, transmission-show won't send one. Blaming the tool for that doesn't make sense.

comment:6 Changed 9 years ago by jordan

So the intent of both of these proposals is to get tr_tracker_stat.hasScraped set to 'true' even when the session doesn't have all of the fields provided by a scrape.

On one hand, that's probably trading one bug for a smaller one since Transmission would be reporting an incorrect state.

On the other hand, the missing data in this case is tr_tracker_stat.downloadCount, which isn't used for anything in libtransmission, transmission-gtk, -qt, or -web, and -mac only uses it for display in the Inspector...

comment:7 Changed 9 years ago by rb07

Yes, but put it in context: there is no scrape. This change is for trackers that send (some of) the scrape info with the announce, and don't have a scrape URL.

BTW this change doesn't affect the Mac application, which uses a different way to get the information and it already shows it (with a downloads of zero).

Last edited 9 years ago by rb07 (previous) (diff)

comment:8 Changed 9 years ago by jordan

  • Resolution set to fixed
  • Status changed from assigned to closed

r13313: (trunk libT) #4914 if a tracker has no scrape URL but the announce response contains any scrape fields, that's as close to a scrape as we're going to get, so use those fields.

comment:9 Changed 9 years ago by livings124

  • Milestone changed from 2.53 to 2.60
Note: See TracTickets for help on using tickets.