diff options
Diffstat (limited to 'tidal_dl_ng/helper')
| -rw-r--r-- | tidal_dl_ng/helper/path.py | 10 | ||||
| -rw-r--r-- | tidal_dl_ng/helper/tidal.py | 2 |
2 files changed, 10 insertions, 2 deletions
diff --git a/tidal_dl_ng/helper/path.py b/tidal_dl_ng/helper/path.py index 2fc7d16..2b739d6 100644 --- a/tidal_dl_ng/helper/path.py +++ b/tidal_dl_ng/helper/path.py @@ -2,6 +2,7 @@ import glob import math import os import re +import shutil from pathlib import Path, PosixPath from pathvalidate import sanitize_filename, sanitize_filepath @@ -10,7 +11,7 @@ from tidalapi import Album, Mix, Playlist, Track, UserPlaylist, Video from tidal_dl_ng import __name_display__ from tidal_dl_ng.constants import FILENAME_SANITIZE_PLACEHOLDER, UNIQUIFY_THRESHOLD, AudioExtensions, MediaType -from tidal_dl_ng.helper.tidal import name_builder_artist, name_builder_title, name_builder_album_artist +from tidal_dl_ng.helper.tidal import name_builder_album_artist, name_builder_artist, name_builder_title def path_home() -> str: @@ -261,3 +262,10 @@ def check_file_exists(path_file: str, extension_ignore: bool = False) -> bool: result = bool(sum([glob.glob(_file) for _file in path_files], [])) return result + + +def is_installed_ffmpeg() -> bool: + # Checks if ffmpeg is found in PATH. + result: bool = bool(shutil.which("ffmpeg")) + + return result diff --git a/tidal_dl_ng/helper/tidal.py b/tidal_dl_ng/helper/tidal.py index 77dd72d..2dde6b2 100644 --- a/tidal_dl_ng/helper/tidal.py +++ b/tidal_dl_ng/helper/tidal.py @@ -1,5 +1,5 @@ from tidalapi import Album, Mix, Playlist, Session, Track, UserPlaylist, Video -from tidalapi.artist import Role, Artist +from tidalapi.artist import Artist, Role from tidalapi.session import SearchTypes from tidal_dl_ng.constants import MediaType |
