mirror of
https://github.com/darkzoul5/YoutubePlaylistSync.git
synced 2026-11-04 23:47:56 +02:00
fix: resolve scanner lint errors
This commit is contained in:
1 parent
3494578c0e
commit
a647685070
1 file changed
+5
-2
@@ -1,9 +1,12 @@
|
|||||||
from __future__ import annotations
|
from __future__ import annotations
|
||||||
|
|
||||||
|
import logging
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
|
|
||||||
from ..models import PlaylistItem
|
from ..models import PlaylistItem
|
||||||
|
|
||||||
|
logger = logging.getLogger(__name__)
|
||||||
|
|
||||||
|
|
||||||
class PlaylistScanner:
|
class PlaylistScanner:
|
||||||
"""
|
"""
|
||||||
@@ -38,8 +41,8 @@ class PlaylistScanner:
|
|||||||
p = Path(str(ffmpeg_path))
|
p = Path(str(ffmpeg_path))
|
||||||
if p.exists():
|
if p.exists():
|
||||||
ydl_opts["ffmpeg_location"] = str(p)
|
ydl_opts["ffmpeg_location"] = str(p)
|
||||||
except Exception:
|
except (OSError, TypeError, ValueError) as exc:
|
||||||
pass
|
logger.debug("Invalid ffmpeg path: %s", exc)
|
||||||
|
|
||||||
with yt_dlp.YoutubeDL(ydl_opts) as ydl: # type: ignore[attr-defined]
|
with yt_dlp.YoutubeDL(ydl_opts) as ydl: # type: ignore[attr-defined]
|
||||||
info = ydl.extract_info(playlist_url, download=False)
|
info = ydl.extract_info(playlist_url, download=False)
|
||||||
|
|||||||
Reference in new issue
Block a user