UsergeTeam / Userge

Userge, Durable as a Serge
https://userge.tech
GNU General Public License v3.0
676 stars 2.01k forks source link

tools: utils: add get_media_path_and_name #475

Closed yshalsager closed 2 years ago

yshalsager commented 2 years ago

Moved from https://github.com/UsergeTeam/Userge-Plugins/blob/master/plugins/ff_mpeg.py#L56, since the same function can be used instead of having duplicated code in ffmpeg, transcribe, and google photos modules.

Krishna-Singhal commented 2 years ago

Hii @yshalsager , your pull request seems useful but Unfortunately will not work in major update, cuz you are importing url_download and tg_download from download.py

yshalsager commented 2 years ago

Hii @yshalsager , your pull request seems useful but Unfortunately will not work in major update, cuz you are importing url_download and tg_download from download.py

I see, just noticed that userge is defined in module __init__. I think we can use relative import, by replacing userge.plugins.misc.download with ..plugins.misc.download and it should work.

Krishna-Singhal commented 2 years ago

I see, just noticed that userge is defined in module __init__. I think we can use relative import, by replacing userge.plugins.misc.download with ..plugins.misc.download and it should work.

No, you are not getting me, Userge core is upgrading to verison 1 where it is not necessary that download plugin is available or not, and in utils you are importing from download so this is a issue

yshalsager commented 2 years ago

No, you are not getting me, Userge core is upgrading to verison 1 where it is not necessary that download plugin is available or not, and in utils you are importing from download so this is a issue

Ah, that's another thing. Then, feel free to either accept the PR, let it wait for the new changes, or reject it :D