Fix confirm modals hidden behind other modals and wishlist showing Unknown Album
- Bump confirm dialog z-index to 200000 (both #confirm-modal-overlay and
.confirmation-modal-overlay) so they always appear above all other modals
- Normalize track data in _run_sync_task before storing in original_tracks_map:
album as dict {'name': ...} and artists as [{'name': ...}] — fixes all
source converters (Deezer, YouTube, Tidal, Spotify Public, ListenBrainz,
Beatport) whose fallback paths stored plain strings, causing the wishlist
UI to show "Unknown Album" for every synced track
This commit is contained in:
parent
4c6e2fe1ec
commit
7fd29c4f77
2 changed files with 13 additions and 2 deletions
|
|
@ -29035,10 +29035,21 @@ def _run_sync_task(playlist_id, playlist_name, tracks_json, automation_id=None):
|
|||
print(f"🔄 Converting JSON tracks to SpotifyTrack objects...")
|
||||
|
||||
# Store original track data with full album objects (for wishlist with cover art)
|
||||
# Normalize formats: album must be dict {'name': ...}, artists must be [{'name': ...}]
|
||||
original_tracks_map = {}
|
||||
for t in tracks_json:
|
||||
track_id = t.get('id', '')
|
||||
if track_id:
|
||||
# Normalize album to dict format
|
||||
raw_album = t.get('album', '')
|
||||
if isinstance(raw_album, str):
|
||||
t['album'] = {'name': raw_album} if raw_album else {'name': 'Unknown Album'}
|
||||
elif not isinstance(raw_album, dict):
|
||||
t['album'] = {'name': str(raw_album) if raw_album else 'Unknown Album'}
|
||||
# Normalize artists to list of dicts
|
||||
raw_artists = t.get('artists', [])
|
||||
if raw_artists and isinstance(raw_artists[0], str):
|
||||
t['artists'] = [{'name': a} for a in raw_artists]
|
||||
original_tracks_map[track_id] = t
|
||||
|
||||
tracks = []
|
||||
|
|
|
|||
|
|
@ -4337,7 +4337,7 @@ body {
|
|||
/* Confirm Dialog Modal */
|
||||
/* Confirm dialog must sit above all other modals (playlist, download, etc.) */
|
||||
#confirm-modal-overlay {
|
||||
z-index: 100000;
|
||||
z-index: 200000;
|
||||
}
|
||||
|
||||
.confirm-modal {
|
||||
|
|
@ -13549,7 +13549,7 @@ body {
|
|||
height: 100vh;
|
||||
background: rgba(0, 0, 0, 0.7);
|
||||
backdrop-filter: blur(8px);
|
||||
z-index: 12000;
|
||||
z-index: 200000;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
|
|
|
|||
Loading…
Reference in a new issue