Merged
Conversation
Creates a new playlist from an M3U file (name from file stem), matching tracks by file path against the library database. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Previously, artist detail view had no way to fetch albums by artist_id directly — Swift was paginating the entire album catalog and filtering client-side, which is both slow and incorrect for artists who only appear as track artists (feat. / featuring). Changes: - queries::get_artist_albums: extend WHERE clause with OR EXISTS subquery so albums where the artist has at least one track are also returned, even if they are not the album artist (covers "Various Artists"-upgraded compilations and feat. artists) - ffi.rs: expose get_artist_albums(artist_id) via swift-bridge so Swift can call it directly with a single FFI round-trip A new test (test_get_artist_albums_includes_track_artist) verifies that albums are found for artists who are track-only contributors. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Previously, albums without an ALBUMARTIST tag were matched by title only, causing "Greatest Hits" by The Beatles and "Greatest Hits" by Eminem to be merged into a single "Various Artists" album. Album identity is now always (title, artist_id), matching the UNIQUE constraint already present in the database schema. Each distinct (title, primary_artist) pair produces its own album row. Compilations with multiple track artists must be tagged with ALBUMARTIST=Various Artists in the file metadata to be grouped correctly. Removes: find_album_by_title (title-only lookup, no longer needed) Keeps: update_album_artist (still useful for tagged-ALBUMARTIST path) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Adds clean_orphans() in queries.rs that:
- Deletes albums with no tracks
- Deletes artists with no tracks and no albums
Exposed via clean_library() FFI returning { albums_deleted, artists_deleted }.
Intended to be run after a rescan when the album-grouping fix may have
left behind stale "Various Artists" or other orphaned rows.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Fixes CI formatting check failures on all three platforms. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.