-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
[upnpcontrol] Missing TrackMetaData keys in onValueReceived switch case #19485
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
Conversation
Signed-off-by: Laurent ARNAL <laurent@clae.net>
What device is emitting this? This is not part of the uPnP standard as far as I can tell: https://openconnectivity.org/developer/specifications/upnp-resources/upnp/mediaserver4-and-mediarenderer3/. |
I have limited knowledge of the specs, this is what chatgpt says. Is this helpfull? Yes, TrackMetaData is part of the UPnP AV (Audio/Video) specifications, but not as a formally defined XML element in the UPnP core specs themselves. It appears as part of the AVTransport service in the UPnP AV specifications (specifically: AVTransport:1 and AVTransport:2) defined by the UPnP Forum / DLNA. |
The value comes from my Marantz MCR612 amplifier. The renderer subdevice. Laurent. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
Adds support for devices that emit the non-standard TrackMetaData event variable so that metadata synchronization works consistently.
- Add "TrackMetaData" to the onValueReceived switch, routed to onValueReceivedCurrentMetaData(value).
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
break; | ||
case "CurrentTrackMetaData": | ||
case "CurrentURIMetaData": | ||
case "TrackMetaData": | ||
onValueReceivedCurrentMetaData(value); | ||
break; | ||
case "NextAVTransportURIMetaData": |
Copilot
AI
Oct 16, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[nitpick] TrackMetaData appears to be a vendor-specific variant; consider adding a brief inline comment to document why this additional key is handled here (e.g., 'Some renderers emit TrackMetaData instead of CurrentTrackMetaData/CurrentURIMetaData'). This will help future maintainers avoid removing it as redundant.
Copilot uses AI. Check for mistakes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
break; | |
case "CurrentTrackMetaData": | |
case "CurrentURIMetaData": | |
case "TrackMetaData": | |
onValueReceivedCurrentMetaData(value); | |
break; | |
case "NextAVTransportURIMetaData": | |
break; | |
case "CurrentTrackMetaData": | |
case "CurrentURIMetaData": | |
case "TrackMetaData": // Some (non-compliant) renderers emit TrackMetaData instead of CurrentTrackMetaData/CurrentURIMetaData | |
onValueReceivedCurrentMetaData(value); | |
break; | |
case "NextAVTransportURIMetaData": |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
Well, I think ChatGPT is wrong here. CurrentTrackMetaData and CurrentURIMetaData are in the AVTransport specs. TrackMetaData is not. It is or a vendor specific extension, or a non-compliant bug in the device. Anyway, it wouldn't harm to add it if this makes it work with the odd device. But I do think a comment should be put in to indicate it is a non-standard element. |
Signed-off-by: Laurent ARNAL <laurent@clae.net>
Signed-off-by: Laurent ARNAL <laurent@clae.net>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, LGTM
Missing TrackMetaData keys in onValueReceived switch case
We are missing the TrackMetaData keys in onValueReceived function.
In some case, it prevent Openhab to synchronise current playing song metadata because some devices use this key.
Fixed: #19486