Merge branch '71-feature-show-queued-downloads'

* 71-feature-show-queued-downloads:
  ✨ Lists can also be downloaded using the "Download List" button.
  👌 Reduced network traffic for covers.
  ✨ Display cover in info area.
  ✨ Use `Album.image()` to get cover url.
  ✨ Software named explicitly.
  ✨ Info pane will be initialized correctly.
  ✨ Added info pane to GUI.

# Conflicts:
#	tidal_dl_ng/gui.py
This commit is contained in:
Robert Honz
2024-03-29 12:32:11 +01:00
9 changed files with 807 additions and 483 deletions
+1 -10
View File
@@ -21,7 +21,6 @@ from tidal_dl_ng.constants import (
EXTENSION_LYRICS,
REQUESTS_TIMEOUT_SEC,
AudioExtensions,
CoverDimensions,
MediaType,
SkipExisting,
StreamManifestMimeType,
@@ -272,12 +271,6 @@ class Download:
# Move it.
shutil.move(tmp_lyrics_file_path, os.path.splitext(file_media_dst)[0] + EXTENSION_LYRICS)
def cover_url(self, sid: str, dimension: CoverDimensions = CoverDimensions.Px320):
if sid is None:
return ""
return f"https://resources.tidal.com/images/{sid.replace('-', '/')}/{dimension.value}.jpg"
def lyrics_write_file(self, file_path: str, lyrics: str) -> str:
result: str = file_path
@@ -332,9 +325,7 @@ class Download:
totaltrack=track.album.num_tracks if track.album and track.album.num_tracks else 1,
totaldisc=track.album.num_volumes if track.album and track.album.num_volumes else 1,
discnumber=track.volume_num if track.volume_num else 1,
url_cover=(
self.cover_url(track.album.cover, self.settings.data.metadata_cover_dimension) if track.album else ""
),
url_cover=track.album.image(self.settings.data.metadata_cover_dimension.value),
)
m.save()