mirror of
https://github.com/pyrogram/pyrogram
synced 2025-08-29 05:18:10 +00:00
Add media type 1
This commit is contained in:
parent
c58db10e9f
commit
7a79e5a0c4
@ -135,6 +135,7 @@ class Client:
|
|||||||
|
|
||||||
MEDIA_TYPE_ID = {
|
MEDIA_TYPE_ID = {
|
||||||
0: "thumbnail",
|
0: "thumbnail",
|
||||||
|
1: "thumbnail",
|
||||||
2: "photo",
|
2: "photo",
|
||||||
3: "voice",
|
3: "voice",
|
||||||
4: "video",
|
4: "video",
|
||||||
@ -734,9 +735,7 @@ class Client:
|
|||||||
extension = ".webp"
|
extension = ".webp"
|
||||||
elif media_type == 9:
|
elif media_type == 9:
|
||||||
extension = mimetypes.guess_extension(media.mime_type) or ".mp3"
|
extension = mimetypes.guess_extension(media.mime_type) or ".mp3"
|
||||||
elif media_type == 0:
|
elif media_type in (0, 1, 2):
|
||||||
extension = ".jpg"
|
|
||||||
elif media_type == 2:
|
|
||||||
extension = ".jpg"
|
extension = ".jpg"
|
||||||
else:
|
else:
|
||||||
continue
|
continue
|
||||||
|
Loading…
x
Reference in New Issue
Block a user