Source Flags via naming convention possible for Audio?
#31
You seem to be missing hints. I've been trying to hint that:

VAR's can NOT have the same names.
Image [RELEASE] Metroid
Image [RELEASE] IrcChat
Reply
#32
If you are providing hints then yes, I am missing them. Even if it's something simple right in front of my face, I'm stilll missing it. And not for lack of trying.
Reply
#33
So now you are renaming one of the identically named vars called AudioFlagVar yes?
And then putting them in a label (text) control again to see what comes out?
Image [RELEASE] Metroid
Image [RELEASE] IrcChat
Reply
#34
I have NO idea what to rename anything to anymore. Anything I've tried hasn't worked. So I'm stuck and it doesn't seem to be worth further effort of guessing and making up random var names in an attempt to stupidly stumble over the correct one. I've spent far more time working on this than it should have taken. Especially if someone else knows what information is giving me troubles. There is no complete list of audio variables that I can find through searching. There is nothing else built into this skin or a couple others I've tried that identifies what I'm looking for. So I'm done hunting and searching. It won't override the audio flag on the video player screen. So be it.
Reply
#35
I didn't try this, but it should be correct.

Rename the var containing VideoPlayer to anything else (and have .png after AudioChannels):
Code:
<variable name="AudioFlagDerp">
    <value condition="SubString(Player.Filename,atmos)">atmoslogo2.png</value>
    <value>$INFO[VideoPlayer.AudioCodec]$INFO[VideoPlayer.AudioChannels,,.png]</value>
</variable>

I assume this is the image location you want:
https://github.com/WarLion/skin.Aeon-Nox...o.xml#L135

Replace the existing INFO's with your var.
Code:
<control type="image">
    <left>1745</left>
    <texture fallback="flags/audio/defaultsound.png">$VAR[ColorFlagsAudio]audio/$VAR[AudioFlagDerp]</texture>
    <include>OSDFlagVars</include>
</control>

Image location should be in:
Code:
media/flags/audio/atmoslogo2.png
Image [RELEASE] Metroid
Image [RELEASE] IrcChat
Reply
#36
I will work through this later today. Thanks for your post.

I think having looked at it as you've written it out it makes more sense. Testing will be the key now.

As frustrating as some of this has been, it still makes me feel (somewhat) accomplished seeing the flag on the menus screens. Hoping this mod can be integrated into the skin code for anyone who'd like to use Atmos flags in the future.
Reply
#37
It still doesn't work. Nothing I'm trying works. Can't even get the atmos logo in the video source spot if I put the variable in that string. There's either something wrong with my png file or there's no var to override the audio format flag in the OSD. I'm pretty much giving up with it now.
Reply
#38
Does this work?
Code:
<control type="image">
    <left>1745</left>
    <texture fallback="flags/audio/defaultsound.png">flags/audio/atmoslogo2.png</texture>
    <include>OSDFlagVars</include>
</control>
Does this?
Code:
<control type="image">
    <left>1745</left>
    <texture fallback="flags/audio/defaultsound.png">flags/audio/$VAR[AudioFlagDerp]</texture>
    <include>OSDFlagVars</include>
</control>
What does this label say?
Code:
<control type="label" id="9999999">
        <description>My First label</description>
        <left>700</left>
        <top>450</top>
        <width>550</width>
        <height>50</height>
        <label>start - $INFO[Player.Filename] - end</label>
        <font>font13</font>
        <textcolor>FFFFFFFF</textcolor>
        <shadowcolor>ff000000</shadowcolor>
        <scrollsuffix> - </scrollsuffix>
  </control>

You have renamed one of your VAR's? Show me you renamed them, and that you are using the correct one in your image.
Image [RELEASE] Metroid
Image [RELEASE] IrcChat
Reply
#39
Eureka! It works!

Went through all the examples you posted. Figured out what those strings where doing and muddled and then figured it all out!


For those who'd like to add Atmos logos to your skin you need to use "atmos" in your file and path naming convention, then add the following code in the following places.

Variables.xml

Atmos logo on menu screens.

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

Atmos logo on Video Player OSD

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

Plus in DialogFullScreenInfo.xml you must replace this line

Code:
<texture fallback="flags/audio/defaultsound.png">$VAR[ColorFlagsAudio]audio/$INFO[VideoPlayer.AudioCodec]$INFO[VideoPlayer.AudioChannels,,.png]</texture>

with this line.

Code:
<texture fallback="flags/audio/defaultsound.png">flags/audio/$VAR[SourceAudioFlagVar]</texture>

And you need to have an Atmos logo flag in your skin/medi/flags/audio folder, in this case named atmoslogo.png.

Here are 3 versions of an Atmos logo.

Image

Image

Image
Reply
#40
Except you left out this VAR:

$VAR[ColorFlagsAudio]

I assume it is used somewhere in skin settings to set a custom flags folder or something.

But, well done.
Image [RELEASE] Metroid
Image [RELEASE] IrcChat
Reply
#41
Yeah that would be needed if you use colored flags in that skin. I don't. But I'll update the code for that skin to include it.
Reply
#42
Well now look what you've started... After figuring out how to flag my 3 Atmos movies with Atmos flags, and still being annoyed how Kodi reads any Blu-ray stream as 16:9 ignoring the various actual film aspect ratios, I figured out how to override the aspect flags. Cool, right? Sure, accept now I have 2158 movies to go through and rename 8 files and a folder per. Argh!!!! Big Grin
Reply
#43
Great Smile Just remember that reading filename is a performance hit compared to reading from the database.
Image [RELEASE] Metroid
Image [RELEASE] IrcChat
Reply
#44
I understand, but I'm running 2 (3) more than capable HTPC's. And since there's a known bug in Kodi that overrides the library information when manually edited and supersedes it with the stream data for video aspect ratio, this is the only fix at the moment.

At this point, IMO, the library should be editable enough to add a number of specific and custom flags to have things work. Media source to begin with, Atmos and/or other audio format support not recognized in the metadata, aspect ratio of the actual film, not data stream, extra flags for whatever you might like (say King Kong movies or Star Trek films or something). Even adding the proper cast to a film when it's poorly scraped can be a chore. How many people out there have Platoon in their library but it's not noted that Charlie Sheen had a small part in it?

Anyways, thanks for steering me through all this coding. I eventually got there, even after a number of frustrations. I'll post up some screen shots soon.
Reply

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