Skip to content

merge: dev -> main - Improved song matching and playlist generation song count#28

Merged
Blueion76 merged 17 commits intomainfrom
dev
Feb 23, 2026
Merged

merge: dev -> main - Improved song matching and playlist generation song count#28
Blueion76 merged 17 commits intomainfrom
dev

Conversation

@Blueion76
Copy link
Copy Markdown
Owner

No description provided.

…ion filter

Bug 1 (main.py): _generate_hybrid_daily_mix was slicing songs[:30] before
passing to _process_recommendations. Since _is_duplicate() both checks AND
adds to self.processed_songs, later playlists with overlapping genres would
have all 30 of their songs already flagged as duplicates -> 0 songs added.
Fix: return the full pool so _process_recommendations can iterate past
duplicates and still fill max_songs=30.

Bug 2 (listenbrainz.py): get_created_for_you_playlists() was filtering for
top-level 'id' and 'name' keys, but the ListenBrainz API returns JSPF format
where each playlist is wrapped as {"playlist": {"title": ..., "identifier": ...}}.
No playlists ever passed the filter -> always 0 playlists found.
Fix: validate against the correct nested structure.
- Rewrote _process_recommendations with per-playlist dedup (Set),
  up to 3 download rounds, similar-song check, and a 5x candidate
  pool so every playlist can independently reach max_songs even when
  earlier playlists already consumed popular tracks.
- Fixed AudioMuse prompt loop: now accumulates unique songs across
  prompt variants instead of overwriting with each attempt, ensuring
  the full songs_per_mix quota is filled from variant results.
Added optional mbid parameter to search_song method for MusicBrainz ID lookup.
Added a buffer to the number of LLM songs requested to account for version mismatches and download failures.
Added filtering for unexpected playlists returned by AI.
Updated the default value for PERF_DOWNLOAD_DELAY from 6 to 10 seconds.
Updated performance parameters for download and post-scan delays.
Update env variables
@Blueion76 Blueion76 merged commit d4548a3 into main Feb 23, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant