send the request ith left=0, to appear as a seeder and not as a leecher

This commit is contained in:
Benoît Fontaine 2019-04-19 12:22:07 +02:00
parent e416b9edf9
commit 7634a231d6
2 changed files with 1 additions and 3 deletions

View File

@ -59,7 +59,6 @@ class process_torrent():
headers = tc.get_headers()
params = tc.get_query(uploaded=0,
downloaded=0,
left=self.info['length'],
event='started')
print('----------- First Command to Tracker --------')
@ -113,7 +112,6 @@ class process_torrent():
headers = tc.get_headers()
params = tc.get_query(uploaded=uploaded,
downloaded=downloaded,
left=0,
event='stopped')
content = self.send_request(params, headers)
self.tracker_response_parser(content)

View File

@ -28,7 +28,7 @@ class Transmission292():
headers['Accept-Encoding'] = 'Accept-Encoding: gzip;q=1.0, deflate, identity'
return headers
def get_query(self, uploaded, downloaded, left, event=None):
def get_query(self, uploaded, downloaded, left=0, event=None):
# The total amount uploaded (since the client sent the 'started' event)
self.parameters["uploaded"] = uploaded
# The total amount downloaded (since the client sent the 'started' event)