fix spotify playlist discover automation

This commit is contained in:
Broque Thomas 2026-03-05 21:17:58 -08:00
parent 551cd95064
commit 17babb1fc8

View file

@ -20082,11 +20082,10 @@ def _run_playlist_discovery_worker(playlists, automation_id=None):
total_tracks = 0 total_tracks = 0
last_playlist_name = '' last_playlist_name = ''
# Pre-compute grand total for progress tracking (skip spotify playlists) # Pre-compute grand total for progress tracking
grand_total = 0 grand_total = 0
db_init = get_database() db_init = get_database()
for pl in playlists: for pl in playlists:
if pl.get('source', '') != 'spotify':
t = db_init.get_mirrored_playlist_tracks(pl['id']) t = db_init.get_mirrored_playlist_tracks(pl['id'])
if t: if t:
grand_total += len(t) grand_total += len(t)
@ -20098,10 +20097,6 @@ def _run_playlist_discovery_worker(playlists, automation_id=None):
last_playlist_name = pl_name last_playlist_name = pl_name
source = pl.get('source', '') source = pl.get('source', '')
# Spotify playlists are auto-discovered during refresh
if source == 'spotify':
continue
db = get_database() db = get_database()
tracks = db.get_mirrored_playlist_tracks(pl_id) tracks = db.get_mirrored_playlist_tracks(pl_id)
if not tracks: if not tracks: