mirror of
https://github.com/pyrogram/pyrogram
synced 2025-08-28 21:07:59 +00:00
Add new sessions to the media_sessions dict before starting them
This commit is contained in:
parent
db14aa288d
commit
1b48f850bf
@ -2992,6 +2992,8 @@ class Client:
|
||||
self.api_id
|
||||
)
|
||||
|
||||
self.media_sessions[dc_id] = session
|
||||
|
||||
session.start()
|
||||
|
||||
session.send(
|
||||
@ -3009,9 +3011,9 @@ class Client:
|
||||
self.api_id
|
||||
)
|
||||
|
||||
session.start()
|
||||
self.media_sessions[dc_id] = session
|
||||
|
||||
self.media_sessions[dc_id] = session
|
||||
session.start()
|
||||
|
||||
if volume_id: # Photos are accessed by volume_id, local_id, secret
|
||||
location = types.InputFileLocation(
|
||||
@ -3080,10 +3082,10 @@ class Client:
|
||||
is_cdn=True
|
||||
)
|
||||
|
||||
cdn_session.start()
|
||||
|
||||
self.media_sessions[r.dc_id] = cdn_session
|
||||
|
||||
cdn_session.start()
|
||||
|
||||
try:
|
||||
with tempfile.NamedTemporaryFile("wb", delete=False) as f:
|
||||
file_name = f.name
|
||||
|
Loading…
x
Reference in New Issue
Block a user