mirror of
https://github.com/NohamR/Ratio.py.git
synced 2025-05-24 00:38:57 +00:00
Merge pull request #2 from Linekio/fix_seed_request
send the request with left=0, to appear as a seeder and not as a leecher
This commit is contained in:
commit
a2771299be
@ -59,7 +59,6 @@ class process_torrent():
|
|||||||
headers = tc.get_headers()
|
headers = tc.get_headers()
|
||||||
params = tc.get_query(uploaded=0,
|
params = tc.get_query(uploaded=0,
|
||||||
downloaded=0,
|
downloaded=0,
|
||||||
left=self.info['length'],
|
|
||||||
event='started')
|
event='started')
|
||||||
|
|
||||||
print('----------- First Command to Tracker --------')
|
print('----------- First Command to Tracker --------')
|
||||||
@ -113,7 +112,6 @@ class process_torrent():
|
|||||||
headers = tc.get_headers()
|
headers = tc.get_headers()
|
||||||
params = tc.get_query(uploaded=uploaded,
|
params = tc.get_query(uploaded=uploaded,
|
||||||
downloaded=downloaded,
|
downloaded=downloaded,
|
||||||
left=0,
|
|
||||||
event='stopped')
|
event='stopped')
|
||||||
content = self.send_request(params, headers)
|
content = self.send_request(params, headers)
|
||||||
self.tracker_response_parser(content)
|
self.tracker_response_parser(content)
|
||||||
|
@ -28,7 +28,7 @@ class Transmission292():
|
|||||||
headers['Accept-Encoding'] = 'Accept-Encoding: gzip;q=1.0, deflate, identity'
|
headers['Accept-Encoding'] = 'Accept-Encoding: gzip;q=1.0, deflate, identity'
|
||||||
return headers
|
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)
|
# The total amount uploaded (since the client sent the 'started' event)
|
||||||
self.parameters["uploaded"] = uploaded
|
self.parameters["uploaded"] = uploaded
|
||||||
# The total amount downloaded (since the client sent the 'started' event)
|
# The total amount downloaded (since the client sent the 'started' event)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user