You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
fix(radio): fall back when ICY titles are blank - #909
Reviewing files that changed from the base of the PR and between 837308b and f285c6c.
📒 Files selected for processing: 2
CHANGELOG.md
src/infra/radio/stream.rs
Included review availability: This review used your included allowance. Your plan provides up to 4 included reviews per hour; 3 remain after this review.
📝 Walkthrough
ICY stream titles are trimmed before storage. Blank and hyphen-only titles become None, allowing existing radio metadata fallback behavior to apply. Unit tests cover the normalization rules, and the changelog records the change.
Changes: Radio title cleanup
Layer / File(s)
Summary
Normalize and store ICY titles src/infra/radio/stream.rs, CHANGELOG.md
The stream callback now cleans titles before storing them. Blank and hyphen-only titles become None, while other titles are trimmed and retained. Unit tests cover these cases. The changelog documents the fallback behavior.
No established merge-blocking risk remains in the reviewed change.
Pre-merge checks: 4
Check name
Status
Explanation
Description Check
Check skipped - CodeRabbit’s high-level summary is enabled.
Title check
The title uses the valid conventional-commit prefix "fix(radio):" and clearly describes the ICY title fallback change. The subject is concise and imperative.
Linked Issues check
The change meets #820. clean_stream_title trims valid titles and returns None for missing, empty, whitespace-only, and hyphen-only values. The callback uses this function at the single metadata wr…
Out of Scope Changes check
The changes stay within #820. They modify radio stream title normalization, add focused unit tests, and add the related changelog entry. No reader duplication, timeout change, or unrelated implementat…
Full details: Linked Issues check
Explanation
The change meets #820. clean_stream_title trims valid titles and returns None for missing, empty, whitespace-only, and hyphen-only values. The callback uses this function at the single metadata write site and keeps the existing parse-error guard, so parse failures preserve the last valid title. Unit tests cover the required cases and use stream_title in their names. The existing readers receive None and provide the station fallback.
Full details: Out of Scope Changes check
Explanation
The changes stay within #820. They modify radio stream title normalization, add focused unit tests, and add the related changelog entry. No reader duplication, timeout change, or unrelated implementation change is present in the reviewed evidence.
✨ Finishing Touches
🧪 Generate unit tests (beta)
Create a new PR
✨ Simplify code
Create a new PR
Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
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.
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
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.
Summary
Treat blank ICY
StreamTitlevalues as missing so Radio uses its existing station fallback.Fixes #820.
Testing
cargo test --no-default-features --features telemetry,tui,internet-radio stream_titlecargo test --no-default-features --features telemetry,tui,internet-radiocargo test --no-default-features --features telemetry,tuicargo fmt --all -- --checkcargo clippy --no-default-features --features telemetry,tui -- -D warningsAdditional notes
💬 Questions or want to chat with other contributors? Join the spotatui Discord.
Summary by CodeRabbit