Audio and subtitle language icons for Estuary
#1
(EDIT: I updated the post with my current version that works with Kodi 17.3. The original post was for Kodi 17 Beta versions.)

Confluence had a nice feature where it would use media flags to display audio and subtitle languages in the Video OSD.

Image

Here's a guide for adding them to Estuary.

Save these two images
Image
Image
like this:
skin.estuary\media\flags\language\subtitle.png
skin.estuary\media\flags\language\audio.png

In skin.estuary\xml\Includes.xml find
Code:
    <include name="MediaFlag">
        <param name="width">115</param>
        <param name="height">60</param>
        <param name="visible">true</param>
        <definition>
            <control type="image">
                <width>$PARAM[width]</width>
                <height>$PARAM[height]</height>
                <fadetime>0</fadetime>
                <aspectratio align="center" aligny="center">keep</aspectratio>
                <texture>$PARAM[texture]</texture>
                <visible>$PARAM[visible]</visible>
            </control>
        </definition>
    </include>

Add this after it
Code:
    <!-- flags for audio and subtitle language -->
    <include name="LanguageFlag">
        <control type="group">
            <width>115</width>
            <height>60</height>
            <visible>$PARAM[visible]</visible>
            <control type="image">
                <top>0</top>
                <left>0</left>
                <width>115</width>
                <height>60</height>
                <fadetime>0</fadetime>
                <aspectratio align="center" aligny="center">keep</aspectratio>
                <texture>$PARAM[texture]</texture>
            </control>
            <control type="label">
                <left>55</left>
                <width>60</width>
                <height>60</height>
                <aligny>center</aligny>
                <font>font_flag</font>
                <align>left</align>
                <label>[UPPERCASE]$PARAM[label][/UPPERCASE]</label>
            </control>
        </control>
    </include>


In skin.estuary\xml\DialogFullScreenInfo.xml find this
Code:
                <include content="MediaFlag">
                    <param name="texture" value="$INFO[VideoPlayer.VideoCodec,flags/videocodec/,.png]" />
                </include>

Add this after it
Code:
                <include content="LanguageFlag">
                    <param name="visible" value="!String.IsEmpty(VideoPlayer.AudioLanguage)" />
                    <param name="texture" value="flags/language/audio.png" />
                    <param name="label" value="$INFO[VideoPlayer.AudioLanguage]" />
                </include>
                <include content="LanguageFlag">
                    <param name="visible" value="!String.IsEmpty(VideoPlayer.SubtitlesLanguage)" />
                    <param name="texture" value="flags/language/subtitle.png" />
                    <param name="label" value="$INFO[VideoPlayer.SubtitlesLanguage]" />
                </include>
Kodi @ NVidia Shield Android TV, Asrock J3455-ITX (LibreELEC Server), Windows 10, and Nexus 7 (2013)
Reply
#2
Perhaps Guilouz can add this to his mod
Reply
#3
(2016-09-28, 19:01)Sjors125 Wrote: Perhaps Guilouz can add this to his mod

It is already in his mod

Image
Moanbag is in da place!
Reply
#4
Ah, great to know. Smile
Reply
#5
Hi,

It is what i miss. I tried to download images and modify code but it didn't worked. But maybe these mods are outdated ? I don't found excatly the same folders and lines.

I worked in this folder : C:\Program Files (x86)\Kodi\addons\skin.estuary\xml

Thanks
Reply
#6
I tried some modifications with success. I didn't know what i was doing, i just compared existing code.

So, on my Kodi Windows (7) :

1- I downloaded image to C:\Program Files (x86)\Kodi\addons\skin.estuary\media\flags\language (i had to create flags and language folders)
2- i edited Includes.xml file located in C:\Program Files (x86)\Kodi\addons\skin.estuary\xml and i searched this code :

Code:
/include>
    <include name="MediaFlag">
        <param name="width">115</param>
        <param name="height">60</param>
        <param name="visible">true</param>
        <definition>
            <control type="image">
                <width>$PARAM[width]</width>
                <height>$PARAM[height]</height>
                <fadetime>0</fadetime>
                <aspectratio align="center" aligny="center">keep</aspectratio>
                <texture>$PARAM[texture]</texture>
                <visible>$PARAM[visible]</visible>
            </control>
        </definition>
    </include>

then i added this code after it :

Code:
<!-- flags for audio and subtitle language -->
    <include name="LanguageFlag">
        <control type="group">
            <width>115</width>
            <height>60</height>
            <visible>$PARAM[visible]</visible>
            <control type="image">
                <aspectratio align="center" aligny="center">keep</aspectratio>
                <texture>$PARAM[texture]</texture>
            </control>
            <control type="label">
                <width>60</width>
                <height>60</height>
                <textoffsetx>60</textoffsetx>
                <textoffsety>10</textoffsety>
                <font>font12</font>
                <align>left</align>
                <label>$PARAM[label]</label>
            </control>
        </control>

Then i edited DialogFullScreenInfo.xml located in C:\Program Files (x86)\Kodi\addons\skin.estuary\xml\DialogFullScreenInfo.xml and searcched this :

Code:
<control type="grouplist">
                <right>20</right>
                <top>155</top>
                <width>1300</width>
                <height>100</height>
                <align>right</align>
                <include>Animation_BottomSlide</include>
                <orientation>horizontal</orientation>
                <itemgap>10</itemgap>
                <visible>!Player.ChannelPreviewActive</visible>
                <include content="MediaFlag">
                    <param name="texture" value="$INFO[VideoPlayer.AudioChannels,flags/audiochannel/,.png]" />
                </include>
                <include content="MediaFlag">
                    <param name="texture" value="$INFO[VideoPlayer.AudioCodec,flags/audiocodec/,.png]" />
                </include>
                <include content="MediaFlag">
                    <param name="texture" value="$INFO[VideoPlayer.VideoAspect,flags/aspectratio/,.png]" />
                </include>
                <include content="MediaFlag">
                    <param name="texture" value="$INFO[VideoPlayer.VideoCodec,flags/videocodec/,.png]" />
                </include>
            </control>

and i modified it to this :

Code:
<control type="grouplist">
                <right>20</right>
                <top>155</top>
                <width>1300</width>
                <height>100</height>
                <align>right</align>
                <include>Animation_BottomSlide</include>
                <orientation>horizontal</orientation>
                <itemgap>10</itemgap>
                <visible>!Player.ChannelPreviewActive</visible>
                <include content="MediaFlag">
                    <param name="texture" value="$INFO[VideoPlayer.AudioChannels,flags/audiochannel/,.png]" />
                </include>
                <include content="MediaFlag">
                    <param name="texture" value="$INFO[VideoPlayer.AudioCodec,flags/audiocodec/,.png]" />
                </include>
                <include content="MediaFlag">
                    <param name="texture" value="$INFO[VideoPlayer.VideoAspect,flags/aspectratio/,.png]" />
                </include>
                <include content="MediaFlag">
                    <param name="texture" value="$INFO[VideoPlayer.VideoCodec,flags/videocodec/,.png]" />
                </include>
                <!-- audio language -->
                <include content="LanguageFlag">
                    <param name="visible" value="!String.IsEmpty(VideoPlayer.AudioLanguage)" />
                    <param name="texture" value="flags/language/audio.png" />
                    <param name="label" value="$INFO[VideoPlayer.AudioLanguage]" />
                </include>
                <!-- subtitle language -->
                <include content="LanguageFlag">
                    <param name="visible" value="!String.IsEmpty(VideoPlayer.SubtitlesLanguage)" />
                    <param name="texture" value="flags/language/subtitle.png" />
                    <param name="label" value="$INFO[VideoPlayer.SubtitlesLanguage]" />
                </include>
            </control>

Hope it helps.

Bye
Reply
#7
It works. Make sure the image paths are correct. You can just skip creating the "flags\language\" folders and dump em in the media folder.
Then you can use: <param name="texture" value="subtitle.png" />


But the text is too big and it's not the same font as the rest of the media flags.
Use "font_flag" instead of "font10_title". You also have change textoffsety to 15: <textoffsety>15</textoffsety>
Though I haven't figured out how to align the box correctly with the others. Its size is correct but it's a few pixels too high up.

Image
Reply
#8
Hi,

maxtherabbit edited his first post and all works fine.

Quote:Though I haven't figured out how to align the box correctly with the others. Its size is correct but it's a few pixels too high up.

I don't have this problem.

Byz
Reply
#9
(2017-08-16, 16:40)nonob Wrote: Hi,

maxtherabbit edited his first post and all works fine.

Quote:Though I haven't figured out how to align the box correctly with the others. Its size is correct but it's a few pixels too high up.

I don't have this problem.

Byz

Yeah well, that's because he edited the post after mine (added top/left). It's aligned now.
Thanks maxtherabbit!
Reply
#10
Excellent!

Is it possible to add the audio and subtitle languages to the Video Library views (Movies, TV Shows) also ?

Thanks in advance.
Reply
#11
Yes it is possible. If you've done the modifications in the original post, you just need to edit Includes.xml.

Find
Code:
<include name="MediaFlags">

                 ...

            <include content="MediaFlag">
                <param name="texture" value="$VAR[ResolutionFlagVar]" />
                <param name="visible" value="!String.IsEmpty(ListItem.VideoResolution)" />
            </include>

And add this after it
Code:
            <include content="LanguageFlag">
                <param name="visible" value="!String.IsEmpty(ListItem.AudioLanguage)" />
                <param name="texture" value="flags/language/audio.png" />
                <param name="label" value="$INFO[ListItem.AudioLanguage]" />
            </include>
            <include content="LanguageFlag">
                <param name="visible" value="!String.IsEmpty(ListItem.SubtitleLanguage)" />
                <param name="texture" value="flags/language/subtitle.png" />
                <param name="label" value="$INFO[ListItem.SubtitleLanguage]" />
            </include>

You can lower the number in <itemgap>28</itemgap> if it gets too wide.
Kodi @ NVidia Shield Android TV, Asrock J3455-ITX (LibreELEC Server), Windows 10, and Nexus 7 (2013)
Reply
#12
Thank you. It works as intended.
Reply
#13
Hi,

I would like also to update my kodi with subtitle, but I have a problem. I have the kodi on a Raspeberry Pi with Libreelec and I can't upload files. I worked with Wincp or Filezilla and I can download files from Raspberry Pi but not upload. Have simeine an idea what I must do that this will work?

Hope of help
greetings Looks
Reply

Logout Mark Read Team Forum Stats Members Help
Audio and subtitle language icons for Estuary0