mirror of
https://github.com/sanderfoobar/ircradio.git
synced 2025-01-26 20:24:35 +01:00
fix youtube download
This commit is contained in:
parent
62c04edc09
commit
4a6d6025d7
@ -80,6 +80,13 @@ class YouTube:
|
|||||||
from ircradio.factory import app
|
from ircradio.factory import app
|
||||||
import mutagen
|
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:
|
try:
|
||||||
metadata = mutagen.File(filepath)
|
metadata = mutagen.File(filepath)
|
||||||
except Exception as ex:
|
except Exception as ex:
|
||||||
|
Loading…
Reference in New Issue
Block a user