WIP: Video support
This commit is contained in:
@@ -18,7 +18,7 @@ from ujson import loads
|
||||
|
||||
from classes.pyroclient import PyroClient
|
||||
from modules.api_client import (
|
||||
BodyPhotoUploadAlbumsAlbumPhotosPost,
|
||||
BodyPhotoUpload,
|
||||
File,
|
||||
client,
|
||||
photo_delete,
|
||||
@@ -158,7 +158,7 @@ async def cmd_import(app: PyroClient, msg: Message):
|
||||
uploaded = await photo_upload(
|
||||
app.config["posting"]["api"]["album"],
|
||||
client=client,
|
||||
multipart_data=BodyPhotoUploadAlbumsAlbumPhotosPost(
|
||||
multipart_data=BodyPhotoUpload(
|
||||
File(photo_bytes, Path(filename).name, "image/jpeg")
|
||||
),
|
||||
ignore_duplicates=app.config["submission"]["allow_duplicates"],
|
||||
|
@@ -215,7 +215,7 @@ async def get_submission(app: PyroClient, msg: Message):
|
||||
and app.config["submission"]["require_confirmation"]["admins"] is False
|
||||
):
|
||||
try:
|
||||
submitted = await app.submit_photo(str(inserted.inserted_id))
|
||||
submitted = await app.submit_media(str(inserted.inserted_id))
|
||||
await msg.reply_text(
|
||||
app._("sub_yes_auto", "message", locale=user_locale),
|
||||
disable_notification=True,
|
||||
|
Reference in New Issue
Block a user