Merge upstream/master and resolve conflicts

- Resolved conflict in dialog_settings.py (kept both cb_use_primary_album_artist and cb_mark_explicit checkboxes)
- Fixed code quality issues found by make check:
  * Removed duplicate on_download_album_from_track function (F811)
  * Updated isinstance calls to use X | Y syntax instead of (X, Y) (UP038)
  * Fixed unused loop variable album_stub (B007)
  * Applied automatic formatting fixes (black, prettier, trailing whitespace)
- Only remaining issue is C901 complexity warning in on_download_all_albums_from_playlist (expected per maintainer feedback)
This commit is contained in:
Winman486
2025-10-20 16:12:46 -05:00
8 changed files with 112 additions and 97 deletions
+4 -2
View File
@@ -1232,7 +1232,7 @@ class Download:
target_upc: dict[str, str] = METADATA_LOOKUP_UPC[metadata_target_upc]
explicit: bool = track.explicit if hasattr(track, "explicit") else False
title = name_builder_title(track)
title += METADATA_EXPLICIT if explicit else ""
title += METADATA_EXPLICIT if explicit and self.settings.data.mark_explicit else ""
# `None` values are not allowed.
m: Metadata = Metadata(
@@ -1564,7 +1564,9 @@ class Download:
path_tracks.sort()
elif not is_album:
# If it is not an album sort by creation time
path_tracks.sort(key=lambda x: os.path.getctime(x))
path_tracks.sort(
key=lambda x: x.stat().st_birthtime if hasattr(x.stat(), "st_birthtime") else x.stat().st_ctime
)
# Write data to m3u file
with path_playlist.open(mode="w", encoding="utf-8") as f: