Correct filename if ffmpeg conversion is invoked by yt-dl
Signed-off-by: lzzy12 <jhashivam2020@gmail.com>
This commit is contained in:
parent
a54fc42e1e
commit
50ab740219
|
|
@ -5,6 +5,7 @@ import threading
|
||||||
from bot import download_dict_lock, download_dict
|
from bot import download_dict_lock, download_dict
|
||||||
from ..status_utils.youtube_dl_download_status import YoutubeDLDownloadStatus
|
from ..status_utils.youtube_dl_download_status import YoutubeDLDownloadStatus
|
||||||
import logging
|
import logging
|
||||||
|
import re
|
||||||
|
|
||||||
LOGGER = logging.getLogger(__name__)
|
LOGGER = logging.getLogger(__name__)
|
||||||
|
|
||||||
|
|
@ -14,7 +15,11 @@ class MyLogger:
|
||||||
self.obj = obj
|
self.obj = obj
|
||||||
|
|
||||||
def debug(self, msg):
|
def debug(self, msg):
|
||||||
LOGGER.debug(msg)
|
LOGGER.info(msg)
|
||||||
|
# Hack to fix changing changing extension
|
||||||
|
match = re.search(r'.ffmpeg..Merging formats into..(.*?).$', msg)
|
||||||
|
if match and not self.obj.is_playlist:
|
||||||
|
self.obj.name = match.group(1)
|
||||||
|
|
||||||
def warning(self, msg):
|
def warning(self, msg):
|
||||||
LOGGER.warning(msg)
|
LOGGER.warning(msg)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue