Change function to inline
This commit is contained in:
@@ -162,10 +162,6 @@ class Downloader:
|
|||||||
if (block.temp_last != -1 and
|
if (block.temp_last != -1 and
|
||||||
block.last > block.temp_last):
|
block.last > block.temp_last):
|
||||||
return
|
return
|
||||||
|
|
||||||
def get_last_offset(actions):
|
|
||||||
return parser.get_offset(actions[-1])
|
|
||||||
|
|
||||||
continuation = block.continuation
|
continuation = block.continuation
|
||||||
while continuation:
|
while continuation:
|
||||||
url = f"{REPLAY_URL}{quote(continuation)}&pbj=1"
|
url = f"{REPLAY_URL}{quote(continuation)}&pbj=1"
|
||||||
@@ -174,7 +170,7 @@ class Downloader:
|
|||||||
continuation, actions = parser.parse(json.loads(text))
|
continuation, actions = parser.parse(json.loads(text))
|
||||||
if actions:
|
if actions:
|
||||||
block.chat_data.extend(actions)
|
block.chat_data.extend(actions)
|
||||||
last = get_last_offset(actions)
|
last = parser.get_offset(actions[-1])
|
||||||
first = parser.get_offset(actions[0])
|
first = parser.get_offset(actions[0])
|
||||||
if self.callback:
|
if self.callback:
|
||||||
self.callback(actions,last-first)
|
self.callback(actions,last-first)
|
||||||
|
|||||||
Reference in New Issue
Block a user