Repository navigation
fix(stats): keep Spotify artist names with "&", "and" or a comma whole - #646
LargeModGames merged 1 commit into
Conversation
aggregate_top_artists ran every name through split_artists, so a single Spotify artist such as "Mumford & Sons" or "Tyler, The Creator" became two fake artists with the full play count. Spotify records already hold one credited artist per entry, so keep those whole when the item URI starts with "spotify:" (episodes included), and keep splitting local files, radio and records with no URI, whose artists arrive joined. Fixes LargeModGames#601 Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository: LargeModGames/spotatui/.coderabbit.yaml Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (2)
Included review availability: This review used your included allowance. Your plan provides up to 4 included reviews per hour; 0 remain after this review. 📝 WalkthroughWalkthroughTop artist aggregation now keeps nonblank artist strings whole for records with Spotify URIs. It continues to split joined artist strings for other records, including records without a URI. Tests cover both behaviors. ChangesTop Artist Aggregation
Priority: ⬇️ Low Estimated code review effort: 2 (Simple) | ~8 minutes Change: Bug fix · Severity of issue fixed: Low Merge Risk: ⚪ Minimal · up to The change appears ready to merge after normal checks. Architecture SummaryArchitecture risk: 🟡 Medium · up to The change affects 2 systems. Changed systems: Architecture concerns Review detailsSystems and components
Before / after behavior
Reliability and maintainability
🚥 Pre-merge checks | ✅ 4✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
✨ Simplify code
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
Summary
Fixes #601.
aggregate_top_artistskeeps each name inrecord.artistswhole whenitem_uristarts with"spotify:"(tracks and episodes), trimmed and skipping empty names the waysplit_artistsdoes. Every other record (local files, radio,item_uri: None) still goes throughsplit_artists.record.sourceisn't used, and the tag parser ininfra/local/mod.rsis untouched. Aggregation runs at read time, so existing history is fixed too.Tests, from the issue:
top_artists_keeps_a_spotify_band_name_with_an_ampersand_whole,top_artists_keeps_a_spotify_artist_name_with_a_comma_whole,top_artists_counts_each_credited_spotify_artist_separately,top_artists_still_splits_a_joined_local_file_artist_stringandtop_artists_splits_a_record_with_no_item_uri.Testing
cargo fmt --all -- --check: cleancargo clippy --no-default-features --features telemetry,tui -- -D warnings: cleancargo test --no-default-features --features telemetry,tui: 1314 passed, 0 failedcargo test --no-default-features --features telemetry,tui top_artists_: 5 passedAdditional notes
A local file tagged "Of Monsters and Men" is still split; that's the out-of-scope limit from the issue.
This is one of five small PRs I opened together (for #606, #598, #597, #596 and #601). Each changelog entry sits at a different spot in
[Unreleased], and I test-merged all five in three orders without conflicts; together they pass the slim checks (1327 tests).Written with AI coding assistants: Codex drafted fixes for these issues, and Claude Code rebuilt each one on current main against the issue text and re-tested it.
🤖 Generated with Claude Code
Summary by CodeRabbit