2024-11-11, 15:34
It's working flawlessly. Great job. Thanks for the share. I'm going to see what suggestions to mske
<variable name="Label_ListItem_Sur_Tech">
<value condition="String.Contains(ListItem.FileNameAndPath,truehd) + String.Contains(ListItem.AudioCodec,truehd)">TRUEHD</value>
<value condition="String.Contains(ListItem.FileNameAndPath,atmos) + [String.Contains(ListItem.AudioCodec,truehd) | String.Contains(ListItem.AudioCodec,eac3)]">ATMOS</value>
<value condition="[String.Contains(ListItem.FileNameAndPath,dtsx) | String.Contains(ListItem.FileNameAndPath,dts-x)] + String.Contains(ListItem.AudioCodec,dtshd_ma)">DTS-X</value>
<value condition="[String.Contains(ListItem.FileNameAndPath,dtshd) | String.Contains(ListItem.FileNameAndPath,dts-hd)] + String.Contains(ListItem.AudioCodec,dtshd)">DTS-HD</value>
<value condition="!String.IsEmpty(ListItem.AudioCodec)">$INFO[ListItem.AudioCodec]</value>
<value condition="String.Contains(Container(99950).ListItem.Property(base_filenameandpath),truehd) + String.Contains(Container(99950).ListItem.Property(base_audiocodec),truehd)">TRUEHD</value>
<value condition="String.Contains(Container(99950).ListItem.Property(base_filenameandpath),atmos) + [String.Contains(Container(99950).ListItem.Property(base_audiocodec),truehd) | String.Contains(Container(99950).ListItem.Property(base_audiocodec),eac3)]">ATMOS</value>
<value condition="[String.Contains(Container(99950).ListItem.Property(base_filenameandpath),dtsx) | String.Contains(Container(99950).ListItem.Property(base_filenameandpath),dts-x)] + String.Contains(Container(99950).ListItem.Property(base_audiocodec),dtshd_ma)">DTS-X</value>
<value condition="[String.Contains(Container(99950).ListItem.Property(base_filenameandpath),dtshd) | String.Contains(Container(99950).ListItem.Property(base_filenameandpath),dts-hd)] + String.Contains(Container(99950).ListItem.Property(base_audiocodec),dtshd)">DTS-HD</value>
<value condition="!String.IsEmpty(Container(99950).ListItem.Property(base_audiocodec))">$INFO[Container(99950).ListItem.Property(base_audiocodec)]</value>
</variable>
<variable name="Label_VideoPlayer_Sur_Tech">
<value condition="String.Contains(VideoPlayer.AudioCodec,truehd)">TRUEHD</value>
<value condition="String.Contains(Player.FilenameAndPath,atmos) + [String.Contains(VideoPlayer.AudioCodec,truehd) | String.Contains(VideoPlayer.AudioCodec,eac3)]">ATMOS</value>
<value condition="[String.Contains(Player.FilenameAndPath,dtsx) | String.Contains(Player.FilenameAndPath,dts-x)] + String.Contains(VideoPlayer.AudioCodec,dtshd_ma)">DTS-X</value>
<value condition="String.Contains(VideoPlayer.AudioCodec,dtshd)">DTS-HD</value>
<value condition="!String.IsEmpty(VideoPlayer.AudioCodec)">$INFO[VideoPlayer.AudioCodec]</value>
</variable>
(2024-11-12, 07:37)Officer KD6-3.7 Wrote: @AngryBird Really sorry about that but I just noticed I made a typo in the 'Label_ListItem_Sur_Tech' variable (I wrote 'dts-hd' instead of 'dtshd' when checking for the audio codec).Ahh, got it. I'm still learning. And yes, I guess dtshd_ma and dtshd_hra both contain the string dtshd Silly me.
The one you posted is the 'Label_VideoPlayer_Sur_Tech' -- i.e. when the Video Player is active (which fortunately works because the string 'dtshd_ma' contains 'dtshd'). You can test this by playing the file and selecting the DTS-HD audio track.
I'll fix it in the next version but you can change the code in the meanwhile to check if it's working
In the Includes_Labels.xml file replace the two variables ('Label_ListItem_Sur_Tech and Label_VideoPlayer_Sur_Tech ) with the code below
Also, if anyone has access to files with multiple audio tracks with different codecs (example a movie with a TrueHD and a DTS-HD MA track or a EAC3 track etc.), please let me know if the labels still work (i.e. will Kodi grab the AudioCodec of the first/default track and match it with the filenameandpath).
Just checked with my BladeRunner 2049 and Dune file and it determines the order as listed in the variable (irrespective of the order of audio tracks)
It'll check for TRUEHD > then ATMOS (either TRUEHD or EAC3) > DTS-X > DTS-HD
I think most home releases/blu-rays usually come with DTS audio so an argument could be made to give those preference over their Dolby counterparts (simply need to reorder the value conditions in the variable). Like if you named your file 'Dune Part One (2021)_TrueHD with Atmos_DTS-HD', would you rather want 'TRUEHD' or 'DTS-HD' to show up in the info line?
Or I could add a setting, something like 'Preferred audio codec in info line: Dolby/DTS' and it will check those first accordingly.
But let me know if that makes things too convoluted (too many goddamn settings lol!). I understand that is mostly a very 'enthusiast'/'niche' topic for people that care about their local files haha.
Sorry about the bug and thank you for letting me know!
(2024-11-12, 13:15)Officer KD6-3.7 Wrote: @BigRedJim - That does sound like a very interesting idea but I'm afraid the skin cannot detect the HDR capabilities of the user's display. So having a logo pop up could be a little misleading for some users.
The HDR tags added to the VideoPlayer OSD signify the presence of HDR metadata in the videostream (but that does not guarantee that your display actually supports that HDR format).
If you were to play a DV or HDR10 file on a non-HDR display (like on an old laptop), you'd still see the DV/HDR10 tag in the video OSD info line but everything would look 'flat'. You'd need to enable tonemapping for the colors to look right.
Here's a different example: Samsung TVs do not support Dolby Vision (they don't want to pay Dolby the licensing fees so they developed their own dynamic HDR format - HDR10+).
If you were to play a DV file on their TVs, you'd only actually be seeing the fallback/base HDR10 data (which is static HDR metadata as opposed to Dolby Vision and HDR10+ which utilize a frame-by-frame dynamic luminance approach).
In this case, Kodi is still going to show the DV tag in the OSD (because the video stream does have dolbyvision metadata) but you can't technically see it because the display doesn't support that format. So if we were to have the DV logo pop up here, it would be quite misleading.
(2024-11-12, 13:15)Officer KD6-3.7 Wrote: Here's a different example: Samsung TVs do not support Dolby Vision (they don't want to pay Dolby the licensing fees so they developed their own dynamic HDR format - HDR10+).I'm one with a Samsung who doesn't want/need the DV label. I ended up deleting the DV line and adding 2 filename searches. I had to search the filename for HDR10 along with HDR10plus because as far as I found Kodi only keeps the one HDRType and you never know what the fallback HDR is with Kodi. Plus I didn't want both a HDR10 and a HDR10+ label. Basically, I just ignore whatever Kodi has except for HLG.
If you were to play a DV file on their TVs, you'd only actually be seeing the fallback/base HDR10 data (which is static HDR metadata as opposed to Dolby Vision and HDR10+ which utilize a frame-by-frame dynamic luminance approach).
In this case, Kodi is still going to show the DV tag in the OSD (because the video stream does have dolbyvision metadata) but you can't technically see it because the display doesn't support that format. So if we were to have the DV logo pop up here, it would be quite misleading.
Quote: <value condition="String.Contains(ListItem.FileNameAndPath,.hdr10plus.)">HDR10+</value>I suppose one could make an option the user could set for the type of TV they have.
<value condition="String.Contains(ListItem.FileNameAndPath,.hdr10.)">HDR10</value>
<value condition="String.IsEqual(ListItem.HdrType,hlg)">HLG</value>
<value>SDR</value>