Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reprocess radio tracks if metadata incomplete #896

Merged
merged 2 commits into from
Feb 17, 2022

Conversation

jjlawren
Copy link
Contributor

Some services (notably Sonos Radio) act as radio stations, but do not encode the current track's metadata in a streamContent element. This change will reprocess metadata if the radio decoding process does not populate the necessary fields.

Note: We only check if artist is empty as title is almost always set and album is less commonly provided. If artist is missing we can be fairly confident that it's worth reprocessing with the standard method.

@pwt pwt self-assigned this Feb 14, 2022
@pwt pwt added this to the 0.27.0 milestone Feb 14, 2022
@jjlawren
Copy link
Contributor Author

jjlawren commented Feb 14, 2022

One possible regression is that the reprocessing step will undo the cleanup which avoids using URIs as the title:
https://github.com/SoCo/SoCo/blob/master/soco/core.py#L1886-L1893

Edit: Addressed in 41470b2

@pwt
Copy link
Contributor

pwt commented Feb 17, 2022

LGTM --thanks.

@pwt pwt merged commit 49b7deb into SoCo:master Feb 17, 2022
pwt pushed a commit that referenced this pull request Feb 17, 2022
* Reprocess radio tracks if metadata incomplete
* Drop URI titles during reprocessing
@jjlawren jjlawren deleted the metadata_handle_sonos_radio branch February 19, 2022 20:34
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.

2 participants