fix youtube download

This commit is contained in:
dsc 2023-09-02 21:19:05 +03:00
parent 62c04edc09
commit 4a6d6025d7
1 changed files with 7 additions and 0 deletions

View File

@ -80,6 +80,13 @@ class YouTube:
from ircradio.factory import app
import mutagen
if not filepath.endswith('.ogg'):
filepath = filepath + ".ogg"
if not os.path.exists(filepath):
app.logger.error(f"path does not exist: {filepath}")
return
try:
metadata = mutagen.File(filepath)
except Exception as ex: