Skip to content

Commit

Permalink
Update call.py
Browse files Browse the repository at this point in the history
  • Loading branch information
Vivekkumar-IN authored Aug 8, 2024
1 parent 7f5290f commit 2f6b29e
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions BrandrdXMusic/core/call.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
from pytgcalls.types.stream import StreamAudioEnded

import config
from BrandrdXMusic import LOGGER, YouTube, app
from BrandrdXMusic import LOGGER, YouTube, app, YTB
from BrandrdXMusic.misc import db
from BrandrdXMusic.utils.database import (
add_active_chat,
Expand Down Expand Up @@ -442,7 +442,15 @@ async def change_stream(self, client, chat_id):
video=str(streamtype) == "video",
)
except:
return await mystic.edit_text(
try:
file_path, direct = await YTB.download(
videoid,
mystic,
videoid=True,
video=str(streamtype) == "video",
)
except:
return await mystic.edit_text(
_["call_6"], disable_web_page_preview=True
)
if video:
Expand Down

0 comments on commit 2f6b29e

Please sign in to comment.