BinaryONe commited on
Commit ·
6dbb1db
1
Parent(s): b5c6314
Image Enhancement
Browse files
FileStream/utils/FileProcessors/bot_utils.py
CHANGED
|
@@ -94,7 +94,8 @@ async def upload_type_func(file_info,replied_message):
|
|
| 94 |
if existing_file :
|
| 95 |
response = await gen_link(existing_file['_id'])
|
| 96 |
#await update.message.edit_text(text=stream_text,parse_mode=ParseMode.HTML,disable_web_page_preview=True,reply_markup=reply_markup,)
|
| 97 |
-
return {"reply_markup" : response
|
|
|
|
| 98 |
else:
|
| 99 |
name = file_info['file']['caption'] if file_info['file']['caption'] else file_info['file']['file_name']
|
| 100 |
title, year = Get_Title_Year(name)
|
|
@@ -171,7 +172,7 @@ async def gen_link(_id):
|
|
| 171 |
stream_link = f"{Server.URL}api/dl/{_id}",
|
| 172 |
file_link = f"https://t.me/{FileStream.username}?start=file_{_id}"
|
| 173 |
poster=''.join(poster)
|
| 174 |
-
print("\n Poster",poster,type(poster))
|
| 175 |
|
| 176 |
if "video" in mime_type:
|
| 177 |
stream_text = LANG.STREAM_TEXT.format(poster,description,title,release_date,file_name, file_size, stream_link, page_link, file_link)
|
|
|
|
| 94 |
if existing_file :
|
| 95 |
response = await gen_link(existing_file['_id'])
|
| 96 |
#await update.message.edit_text(text=stream_text,parse_mode=ParseMode.HTML,disable_web_page_preview=True,reply_markup=reply_markup,)
|
| 97 |
+
return {"reply_markup" : response.get("reply_markup"), "stream_text": response.get("stream_text"),"poster":response.get("poster"),"type":"ExistingFile"}
|
| 98 |
+
#return reply_markup,stream_text
|
| 99 |
else:
|
| 100 |
name = file_info['file']['caption'] if file_info['file']['caption'] else file_info['file']['file_name']
|
| 101 |
title, year = Get_Title_Year(name)
|
|
|
|
| 172 |
stream_link = f"{Server.URL}api/dl/{_id}",
|
| 173 |
file_link = f"https://t.me/{FileStream.username}?start=file_{_id}"
|
| 174 |
poster=''.join(poster)
|
| 175 |
+
print("\n Poster", poster, type(poster))
|
| 176 |
|
| 177 |
if "video" in mime_type:
|
| 178 |
stream_text = LANG.STREAM_TEXT.format(poster,description,title,release_date,file_name, file_size, stream_link, page_link, file_link)
|