diff options
| author | exislow <exislow@users.noreply.github.com> | 2024-03-22 15:50:23 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-03-22 15:50:23 +0100 |
| commit | 0461c53be4191e18d5bba1e333de0d5ad7527bd0 (patch) | |
| tree | 4587ab7208dc4435ee119c9f8812325770f0b654 /tidal_dl_ng/helper | |
| parent | 134836d471c3accfbf323dbcc27d35a40b48ae6c (diff) | |
| parent | d331f93c911c4d008904177de15619b30955227e (diff) | |
| download | tidal-dl-ng-0461c53be4191e18d5bba1e333de0d5ad7527bd0.tar.gz | |
Merge pull request #66 from exislow/63-feature-provide-feedback-if-ffmpeg-not-found-on-path
63 feature provide feedback if ffmpeg not found on path
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 |
