Source Flags via naming convention possible for Audio?
#16
(2015-01-21, 01:31)MassIV Wrote: 1. You didn't give me your attempt at the code for the image control.

Based on what I can find for 3DBD flags, this is what I've tried.

Code:
    <variable name="AudioFlagVar">
        <value condition="SubString(ListItem.Filenameandpath,atmos)">atmos8</value>
        <value>$INFO[ListItem.AudioCodec]$INFO[ListItem.AudioChannels]</value>
    </variable>

Got this to work for the menu screens. Holy wow what a relief.

Now, working to get the flag in the video player. - This is the only thing I can't get to work now. Must be the variable name.

Code:
    <variable name="AudioFlagVar">
        <value condition="SubString(Player.Filenameandpath,atmos)">atmos8</value>
        <value>$INFO[VideoPlayer.AudioCodec]$INFO[VideoPlayer.AudioChannels]</value>
    </variable>



(2015-01-21, 01:31)MassIV Wrote: 2. I didn't say VideoPlayer.FileName. If you put that in a normal label control there, does it give you the actual name of the file?

Quote:I've tried various combinations of code to get it into the player info screen.

So you do not currently have an oscar image always showing up when DialogFullScreenInfo.xml is active?

I see what you are saying here. I will try when I get home and see what works.

Edit - Yes, when I comment out the visibility string the icon appears on the player info screen for every movie. Now to play around with the visibility.

Edit again - SubString(Player.FileName,bestpicture) is the string that works. 1 little issue down! Thanks for nudging me in the right direction.
Reply
#17
The infolabel for the flag in the video player is not:

Player.Filenameandpath
Image [RELEASE] Metroid
Image [RELEASE] IrcChat
Reply
#18
I'd swear I tried filenameandpath and just filename and neither worked for the player. Will give it a shot when I get home later but seeing the Atmos logo in the menu now is pretty awesome. Thank you for putting up with my roadblocks to this point.
Reply
#19
Code:
    <variable name="AudioFlagVar">
        <value condition="SubString(Player.Filename,atmos)">atmos8</value>
        <value>$INFO[VideoPlayer.AudioCodec]$INFO[VideoPlayer.AudioChannels]</value>
    </variable>

This doesn't work for the video player info screen.
Reply
#20
If you put Player.Filename in a label there, does it read "atmos" in the name?
Image [RELEASE] Metroid
Image [RELEASE] IrcChat
Reply
#21
With this code, I get a custom icon in the audio source flag on all menus.


Code:
    <variable name="AudioFlagVar">
        <value condition="SubString(ListItem.Filenameandpath,atmos)">atmos8</value>
        <value>$INFO[ListItem.AudioCodec]$INFO[ListItem.AudioChannels]</value>
    </variable>

I can not get the same custom icon to work in the video player info screen, having used this code and numerous variations of it.


Code:
    <variable name="AudioFlagVar">
        <value condition="SubString(Player.Filename,atmos)">atmos8</value>
        <value>$INFO[VideoPlayer.AudioCodec]$INFO[VideoPlayer.AudioChannels]</value>
    </variable>

At best, when the file first plays it shows a DD5.1 flag instead of the TrueHD7.1 flag that is the 'default' audio codec. It doesn't say atmos anywhere.

I'm basing this code off other code in the skin for custom flags, but there's nothing specific to audio currently. I have it working 75%. Just need to sort out the last part.
Reply
#22
Well I've sorted out pretty much every other tweak I wanted ot make to my skin but I've still not solved this one. Just not sure what I've got wrong in the video player control. It's probably really simple to but nothing I've tried has been successful. Still plugging away though.
Reply
#23
You haven't answered my question yet.
If you put Player.Filename in a label there, does it read "atmos" in the name?
And if you put the AudioFlagVar in a label, what does it say?
Image [RELEASE] Metroid
Image [RELEASE] IrcChat
Reply
#24
I guess I don't understand your question. Where would it say atmos? Or anything else?

When I use the code I've posted, and several variations of it, the audio icon in the videoplayer info screen doesn't change from the default TrueHD7.1 flag that Kodi reads on any atmos enabled track. At best(?) it doesn't register the stream fast enough and shows a dolby digital 5.1 flag which would be the very baseline of the Atmos track.
Reply
#25
I'm asking you to make a new label control anywhere in that window for the purpose of debugging (you can delete it after testing).
Have it return to you in text $INFO[Player.Filename] and after that $VAR[AudioFlagVar]

For good measure also post all the values in <variable name="AudioFlagVar"> not just the ones you think are relevant.
Image [RELEASE] Metroid
Image [RELEASE] IrcChat
Reply
#26
I'm sorry, I'm still not understanding.

You want me to make a new, random flag for the video info screen based on the filename of what's in the video player? And then what?

And then how am I figuring out what I need to override the 'default' audio flag based on the filename, that's different for what works in the menu screens?

And I've posted all the audio relevant code from the variables.xml file. I've had to create it all myself as there are no other audio flag overrides in this skin. There are those for source flags and various other variables don't know about but nothing else for audio. I built the posted code based on the source code that already exists. But there's something not correct in it to get it to work.

Source code flag override in variable.xml

Code:
<variable name="SourceFlagVar">
        <value condition="[SubString(ListItem.filename,PDTV) | SubString(ListItem.filename,sdtv) | SubString(ListItem.filename,sd tv)]">sdtv</value>
        <value condition="[SubString(ListItem.Filename,hdtv) | SubString(ListItem.Filename,hd tv)]">hdtv</value>
        <value condition="[SubString(ListItem.Filename,hddvd) | SubString(ListItem.Filename,hd-dvd)]">hddvd</value>
        <value condition="[SubString(ListItem.Filename,bluray) | SubString(ListItem.Filename,blu-ray) | SubString(ListItem.Filename,bdrip) | SubString(ListItem.Filename,brrip)] + [SubString(ListItem.Filename,.3D.) | SubString(ListItem.Filename,3DBD)]">bluray3d</value>
        <value condition="[SubString(ListItem.Filename,bluray) | SubString(ListItem.Filename,blu-ray) | SubString(ListItem.Filename,bdrip) | SubString(ListItem.Filename,brrip)]">bluray</value>
        <value condition="SubString(ListItem.Filename,dvb)">dvb</value>
        <value condition="SubString(ListItem.Filename,web-dl)">web-dl</value>
        <value condition="SubString(ListItem.Filename,dvd) | StringCompare(ListItem.FileExtension,iso) | StringCompare(ListItem.FileExtension,ifo)">dvd</value>
        <value>$INFO[ListItem.VideoCodec]</value>
    </variable>
    <variable name="VideoSourceFlagVar">
        <value condition="[SubString(Player.Filenameandpath,PDTV) | SubString(Player.Filenameandpath,sdtv)]">sdtv</value>
        <value condition="SubString(Player.Filenameandpath,hdtv)">hdtv</value>
        <value condition="[SubString(Player.Filenameandpath,hddvd) | SubString(Player.Filenameandpath,hd-dvd)]">hddvd</value>
        <value condition="[SubString(Player.Filenameandpath,bluray) | SubString(Player.Filenameandpath,blu-ray) | SubString(Player.Filenameandpath,bdrip) | SubString(Player.Filenameandpath,brrip)] + [SubString(Player.Filenameandpath,.3D.) | SubString(Player.Filenameandpath,3DBD)]">bluray3d</value>
        <value condition="[SubString(Player.Filenameandpath,bluray) | SubString(Player.Filenameandpath,blu-ray) | SubString(Player.Filenameandpath,bdrip) | SubString(Player.Filenameandpath,brrip)]">bluray</value>
        <value condition="SubString(Player.Filenameandpath,dvb)">dvb</value>
        <value condition="SubString(Player.Filenameandpath,web-dl)">web-dl</value>
        <value condition="SubString(Player.Filenameandpath,dvd) | SubString(Player.Filenameandpath,.iso,Right) | SubString(Player.Filenameandpath,.ifo,Right)">dvd</value>
        <value>$INFO[VideoPlayer.VideoCodec]</value>
    </variable>

Audio code flag override created in variables.xml

Code:
    <variable name="AudioFlagVar">
        <value condition="SubString(ListItem.Filenameandpath,atmos)">atmoslogo2</value>
        <value>$INFO[ListItem.AudioCodec]$INFO[ListItem.AudioChannels]</value>
    </variable>    
    <variable name="AudioFlagVar">
        <value condition="SubString(Player.Filename,atmos)">atmoslogo2.png</value>
        <value>$INFO[VideoPlayer.AudioCodec]$INFO[VideoPlayer.AudioChannels]</value>
    </variable>

The first half of the audio code overrides the scraped/stream audio codec information (Dolby TrueHD 7.1) and instead displays a custom Atmos logo.

The second line of code seems to be correct based on the working Source code above yet does not work as the first audio code does. This is where I'm stuck.

If you know the answer please sort it out. But it seems you are wanting to lead me with a dangling carrott to "learn" this myself. I've tried, and tried, and tried. But nothing I've found in the online manual or from discecting the code explains what string or substring or whatever I need to properly get the videoplayer on screen info audio source flag to be overridder.

The only source flag I can find, and remove if I wish, for the OSD is in the DialgueFullScreenInfo.xml file and is as follws.

Code:
                <control type="image">
                    <left>1745</left>
                    <texture fallback="flags/audio/defaultsound.png">$VAR[ColorFlagsAudio]audio/$INFO[VideoPlayer.AudioCodec]$INFO[VideoPlayer.AudioChannels,,.png]</texture>
                    <include>OSDFlagVars</include>
                </control>

That just confuses me even more.
Reply
#27
I wanted you to make a temporary label control with $INFO[Player.Filename] and $VAR[AudioFlagVar] so you can see in text what is actually returned by the VAR.
http://kodi.wiki/view/Label_control
Code:
<control type="label" id="9999999">
        <description>My First label</description>
        <left>700</left>
        <top>450</top>
        <width>550</width>
        <height>50</height>
        <label>$VAR[AudioFlagVar]</label>
        <font>font13</font>
        <textcolor>FFFFFFFF</textcolor>
        <shadowcolor>ff000000</shadowcolor>
        <scrollsuffix> - </scrollsuffix>
  </control>

Quote:And then how am I figuring out what I need to override the 'default' audio flag based on the filename, that's different for what works in the menu screens?

Well if this is straight from your code as it is currently. Then the label control should tell us which one of the VAR's with identical names is being returned.
Image [RELEASE] Metroid
Image [RELEASE] IrcChat
Reply
#28
I've tried generating a label based on the $VAR[AudioFlagVar] variable but it doesn't work.

I am able to create a general text label on the OSD. So far, I can't figure out which variable controls the audio icon on the video player. So still stuck in the same place.

Finding the actual audio icon control in the DialogFullScreenInfo.xml it gives an include of OSDFlagVars, but that doesn't seem to be a list to reference someplace else. So still kinda stuck.

If you google "Kodi AudioFlagVar" the ONLY hit is this thread.
Reply
#29
Quote:I've tried generating a label based on the $VAR[AudioFlagVar] variable but it doesn't work.
That is probably also why we never see an icon.
Well we know $INFO[VideoPlayer.AudioCodec] should work (you can test in your text label) in DialogFullScreenInfo.xml so... Something is preventing it from showing even that.

Perhaps it's looking at the other AudioFlagVar with the same name, that contains $INFO[ListItem.AudioCodec]. Which would not work because there is no ListItem.

OSDFlagVars is here (Remember you can use "find in files" to search all text files in your 1080i folder):

https://github.com/WarLion/skin.Aeon-Nox...s.xml#L205
Image [RELEASE] Metroid
Image [RELEASE] IrcChat
Reply
#30
Code:
<include name="OSDFlagVars">
        <width>150</width>
        <height>64</height>
        <aspectratio>keep</aspectratio>
        <fadetime>IconCrossfadeTime2</fadetime>
        <colordiffuse>white2</colordiffuse>
        <animation effect="fade" time="200">VisibleChange</animation>
    </include>

This doesn't explain where the video player is pulling the audio codec flag from. In fact I don't even know what it's telling me. as based on the dimensions it's not even big enough to encompass all the video player flags.

Guess I'll just have to live with the video player only displaying the TrueHD flag until Atmos is built into the file headers and read as it's own codec. For now at least I can see the flag on the menu screens which is half the battle.
Reply

Logout Mark Read Team Forum Stats Members Help
Source Flags via naming convention possible for Audio?0