BinaryONe
commited on
Commit
·
5725d40
1
Parent(s):
c9f25dc
Image Enhancement
Browse files
FileStream/bot/plugins/FileHandlers/stream.py
CHANGED
|
@@ -76,7 +76,7 @@ async def private_receive_handler(bot: Client, message: Message):
|
|
| 76 |
file_info=get_file_info(message, instruction)
|
| 77 |
#This Will give a option to Public Private and temporary Upload
|
| 78 |
reply_markup,stream_text, poster = await upload_type_func(get_file_info(message, instruction),reply)
|
| 79 |
-
|
| 80 |
if poster == "None":
|
| 81 |
await reply.edit_text(text=stream_text,
|
| 82 |
parse_mode=ParseMode.HTML,
|
|
|
|
| 76 |
file_info=get_file_info(message, instruction)
|
| 77 |
#This Will give a option to Public Private and temporary Upload
|
| 78 |
reply_markup,stream_text, poster = await upload_type_func(get_file_info(message, instruction),reply)
|
| 79 |
+
print("Poster at Upload_type_func:", poster, type(poster))
|
| 80 |
if poster == "None":
|
| 81 |
await reply.edit_text(text=stream_text,
|
| 82 |
parse_mode=ParseMode.HTML,
|
FileStream/utils/FileProcessors/bot_utils.py
CHANGED
|
@@ -162,17 +162,17 @@ async def gen_link(_id):
|
|
| 162 |
file_info = await db.get_file(_id)
|
| 163 |
print("File Info at Gen Link :",file_info,type(file_info))
|
| 164 |
#file_name = file_info.get("file").get("file_name", ""),
|
| 165 |
-
file_name = file_info['file']['file_name']
|
| 166 |
-
file_size = humanbytes(file_info['file']['file_size'])
|
| 167 |
-
mime_type = file_info['file']['mime_type']
|
| 168 |
-
poster = file_info
|
| 169 |
-
title= file_info["title"]
|
| 170 |
-
description= file_info['description']
|
| 171 |
-
release_date= file_info["release_date"]
|
| 172 |
-
page_link = f"{Server.URL}app/watch/{_id}"
|
| 173 |
-
stream_link = f"{Server.URL}api/dl/{_id}"
|
| 174 |
file_link = f"https://t.me/{FileStream.username}?start=file_{_id}"
|
| 175 |
-
poster=''.join(poster)
|
| 176 |
print("\n Poster", poster, type(poster))
|
| 177 |
|
| 178 |
if "video" in mime_type:
|
|
@@ -196,7 +196,7 @@ async def gen_link(_id):
|
|
| 196 |
InlineKeyboardButton("ʀᴇᴠᴏᴋᴇ ғɪʟᴇ",callback_data=f"msgdelpvt_{_id}")
|
| 197 |
], [InlineKeyboardButton("ᴄʟᴏsᴇ", callback_data="close")]
|
| 198 |
])
|
| 199 |
-
return
|
| 200 |
|
| 201 |
|
| 202 |
#---------------------[ GEN STREAM LINKS FOR CHANNEL ]---------------------#
|
|
|
|
| 162 |
file_info = await db.get_file(_id)
|
| 163 |
print("File Info at Gen Link :",file_info,type(file_info))
|
| 164 |
#file_name = file_info.get("file").get("file_name", ""),
|
| 165 |
+
file_name = file_info['file']['file_name']
|
| 166 |
+
file_size = humanbytes(file_info['file']['file_size'])
|
| 167 |
+
mime_type = file_info['file']['mime_type']
|
| 168 |
+
poster = file_info['poster']
|
| 169 |
+
title= file_info["title"]
|
| 170 |
+
description= file_info['description']
|
| 171 |
+
release_date= file_info["release_date"]
|
| 172 |
+
page_link = f"{Server.URL}app/watch/{_id}"
|
| 173 |
+
stream_link = f"{Server.URL}api/dl/{_id}"
|
| 174 |
file_link = f"https://t.me/{FileStream.username}?start=file_{_id}"
|
| 175 |
+
#poster=''.join(poster)
|
| 176 |
print("\n Poster", poster, type(poster))
|
| 177 |
|
| 178 |
if "video" in mime_type:
|
|
|
|
| 196 |
InlineKeyboardButton("ʀᴇᴠᴏᴋᴇ ғɪʟᴇ",callback_data=f"msgdelpvt_{_id}")
|
| 197 |
], [InlineKeyboardButton("ᴄʟᴏsᴇ", callback_data="close")]
|
| 198 |
])
|
| 199 |
+
return reply_markup, stream_text, str(poster)
|
| 200 |
|
| 201 |
|
| 202 |
#---------------------[ GEN STREAM LINKS FOR CHANNEL ]---------------------#
|