♻️ Refactoring of MPD download. Metadata does not need an explicit media_type flag anymore.

This commit is contained in:
Robert Honz
2024-01-14 17:29:39 +01:00
parent b59cba77c3
commit 825130bd61
9 changed files with 111 additions and 159 deletions
+10 -8
View File
@@ -3,7 +3,7 @@ from dataclasses import dataclass
from dataclasses_json import dataclass_json
from tidalapi import Quality
from tidal_dl_ng.constants import QualityVideo, SkipExisting
from tidal_dl_ng.constants import CoverDimensions, QualityVideo, SkipExisting
@dataclass_json
@@ -28,15 +28,16 @@ class Settings:
format_track: str = "Tracks/{artist_name} - {track_title}"
format_video: str = "Videos/{artist_name} - {track_title}"
video_convert_mp4: bool = True
metadata_cover_width: int = 320
metadata_cover_height: int = 320
metadata_cover_dimension: CoverDimensions = CoverDimensions.Px320
@dataclass
class HelpSettings:
skip_existing: str = ("Do not download, if file already exists. Possible option false = do not skip, "
"'exact' = if filename already exists, 'extension_ignore' = skip even if a file with a "
"different file extension exists.")
skip_existing: str = (
"Do not download, if file already exists. Possible option false = do not skip, "
"'exact' = if filename already exists, 'extension_ignore' = skip even if a file with a "
"different file extension exists."
)
album_cover_save: str = "Safe cover to album folder."
lyrics_save: str = "Safe lyrics to audio file."
api_key_index: str = "Set the device API KEY."
@@ -64,8 +65,9 @@ class HelpSettings:
"Videos are downloaded as MPEG Transport Stream (TS) files. With this option each video "
"will be converted to MP4. FFMPEG must be installed and added to your 'PATH' variable."
)
metadata_cover_width: str = "The width of the cover image embedded into the track."
metadata_cover_height: str = "The height of the cover image embedded into the track."
metadata_cover_dimension: str = (
"The dimensions of the cover image embedded into the track. Possible values: 320x320, 640x640x 1280x1280."
)
@dataclass_json
+1 -1
View File
@@ -5,7 +5,7 @@ from dataclasses import dataclass
class StreamManifest:
codecs: str
mime_type: str
stream_urls: [str]
urls: [str]
file_extension: str
encryption_type: str | None = None
encryption_key: str | None = None