-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
[upnpcontrol] Add semantic tags #18544
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: Andrew Fiddian-Green <software@whitebear.ch>
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.
- I think the following shouldn't be given semantic tags, or at the very least, definitely not
Channel
- uri
- favoriteselect
- album
- albumart
- creator
- publisher
- genre
- tracknumber
- trackduration
- trackposition
- reltrackposition
This should not be set to MediaControl:
- upnprenderer
- browse
- playlistselect
- playlist
I don't think we need to apply semantic tags to every single channel. @rkoshak wdyt? |
Yeah. I was wondering if we should add
ditto |
If we were to do so, IMO, only one channel should receive this property. As I understand it, Semantic tagging is to give meaning to the data, but if you have multiple "items" with the same semantic tag, it is not helpful at all for an external "entity" to "see" and understand your "Thing". If I want to advance the track, which item should I change if there are multiple "Track" channels? Ditto Playlist / mediacontrol etc. |
@jimtng you probably misunderstood me. On a player the current |
This comment was marked as outdated.
This comment was marked as outdated.
I agree, these could all get the same property. I'd propose: And set the Track Number to Point: |
We should probably also look at Plex / other media-player stuff like Echo, Chromecast, TVs? Receivers, Sonos?, they'd all have similar stuff |
I don't think I would rather suggest
Agreed. We just need to get it right for the first one, and then it is essentially copy/paste. |
Point.Status + Property.TrackInfo sounds fine to me. |
If it's a Channel that is unlikely to be something exposed to end users of the home OH is controlling it doesn't need a tag. But that raises the question of whether the binding author has enough information to make that choice on behalf of the end user and which user should we impose the extra step on, those who do want to expose these to the end user (and therefore they need to select a tag on their own) or those who do not (and therefore they have to remove the auto-suggested tag). I don't have a good answer. It feels better to always recommend a tag and let the user remove them later. But that's only because of consistency. Overall, my rule of thumb is only about 60% of Items actually belong in the semantic model. But I'm pretty minimal, so maybe 75-80% for most users.
I would expect several of those to be something exposed to the end user like artist, album art, etc. If you'd want to see it in MainUI's Overview tabs, you need to tag it with something.
Tags are there to provide a little extra bit of information about what an Item represents. It is not meant to uniquely identify an Item. It's perfectly acceptable to have more than one Channel of a Thing with the same semantic Property tags.
The one with the Point tag that indicates it's something you can control. Just like temperature:
So I'd expect something like "trackPosition" to be "Status/Track" or "Position/Track" where "trackDuration" to be "Measurement/Track" or "Status/Track" or something like that. But they are all track Properties. I don't have any problem with having these extra sub-track property tags, but I do want to point out that property tags never stand alone and the tags alone are not there to uniquely identify an Item.
I strongly agree. "Track" isn't a verb nor something that can be converted to a verb (in the meaning we are using it here, we are not hunting). It's a noun. |
@rkoshak / @jimtng / @jlaur / @lsiepel so how shall we proceed here? Whatever we decide here for this binding would set the precedent for all other bindings that play audio or video media. The issues are how to tag channels that inform the state of the "now playing" track or clip. To be specific:
I think we have two options..
=> So please cast your votes for 1. or 2. above (personally I vote for 1.).. |
Option 1 makes sense. 2 doesn't bother me either. |
1 for me. I would stick to Property.Info at first. That can be relevant in non-mediaplayer context as well (e.g. service status messages for car bindings). |
Signed-off-by: Andrew Fiddian-Green <software@whitebear.ch>
Signed-off-by: Andrew Fiddian-Green <software@whitebear.ch>
Signed-off-by: Andrew Fiddian-Green <software@whitebear.ch>
@jimtng / @rkoshak based on feedback from other PRs in the pipeline, I have done the following:
I am therefore fairly confident that a) this PR is ready to be merged, and b) that it sets a kind of benchmark for other media players still in the pipeline. |
Signed-off-by: Andrew Fiddian-Green <software@whitebear.ch>
When looking at this i find it a bit hard to match the statement from @rkoshak
with the applied tags I totally agree that the tags have to add value. To me these tags are too generic, about all channels in all bindings could be tagged with this. |
TrackInfo was my original suggestion for the new property when we added it to OH core. But others suggested to make it more generic so it could cover other potential use cases. EDIT: to be fair the Info tag does supply info that the tag is about (static) information rather than (active) state. Note: if we would change the tag to TrackInfo we would need to do that in Core and possibly revisit other PRs in addons. Just a comment; not a reason for not doing it though.. EDIT 2: we could also add more explanation to the tag description text in my other PR in core on that topic. |
As the info is very specific about music and it is used in many bindings. |
..and/or we we could just change the description (far right hand column) ..and this.. |
IMO all should be aligned.
i know you might have been told otherwise before, so better that @jimtng, @jlaur or others join the discussion before you adapt anything. |
..just for info the word “metadata” is often used to describe what (I think) we mean by the |
Signed-off-by: Andrew Fiddian-Green <software@whitebear.ch>
@lsiepel #18664 included several media player and media service addons for which the tagging was discussed and agreed. This PR for this addon was a precursor to #18664 and also relates to a media player / service addon. So since #18664 was finally agreed, I think we can now merge this one too, please. |
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.
* Add semantic tags Signed-off-by: Andrew Fiddian-Green <software@whitebear.ch>
* Add semantic tags Signed-off-by: Andrew Fiddian-Green <software@whitebear.ch> Signed-off-by: Paul Smedley <paul@smedley.id.au>
This PR adds semantic tags.
Note: it is rather tentative since the
Property
tags of some channels are not self evident e.g. 'PlayList' and 'Track' => Perhaps we need to add some more properties?Signed-off-by: Andrew Fiddian-Green software@whitebear.ch