Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
5hojib committed Sep 19, 2024
1 parent 41d5073 commit 1c5dff4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
1 change: 1 addition & 0 deletions bot/helper/ext_utils/help_messages.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
"orgy",
"horny",
"swingers",
"ullu",
]


Expand Down
5 changes: 3 additions & 2 deletions bot/helper/mirror_leech_utils/telegram_uploader.py
Original file line number Diff line number Diff line change
Expand Up @@ -340,6 +340,7 @@ async def _upload_file(self, cap_mono, file, o_path, force_document=False):
if self._thumb and not await aiopath.exists(self._thumb):
self._thumb = None
thumb = self._thumb
is_doc = Flase
self._is_corrupted = False

try:
Expand All @@ -358,7 +359,7 @@ async def _upload_file(self, cap_mono, file, o_path, force_document=False):
or force_document
or (not is_video and not is_audio and not is_image)
):
isDoc = True
is_doc = True
await self._upload_document(cap_mono, thumb, is_video)
elif is_video:
await self._upload_video(cap_mono, thumb)
Expand All @@ -381,7 +382,7 @@ async def _upload_file(self, cap_mono, file, o_path, force_document=False):
await remove(thumb)
err_type = "RPCError: " if isinstance(err, RPCError) else ""
LOGGER.error(f"{err_type}{err}. Path: {self._up_path}")
if "Telegram says: [400" in str(err) and not isDoc:
if "Telegram says: [400" in str(err) and not is_doc:
LOGGER.error(f"Retrying As Document. Path: {self._up_path}")
return await self._upload_file(cap_mono, file, o_path, True)
raise err
Expand Down

0 comments on commit 1c5dff4

Please sign in to comment.