Kodi Community Forum

Full Version: Can I show details on available movie subtitles using Estuary?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I'd like to see details on the all subtitles that are available for each movie as I'm browsing the Recently Added screen, and on the other video info screens.

Is this possible with Estuary?

Right now, I see that it displays details for Genre, Writer, Director, First Aired for each movie as I flip through the Recently Added screen.

Could I change First Aired to Subtitles (e.g., to show something like ENG / JAP, etc.)?

I looked for another skin that would do this, but actually I rather like Estuary and if possible I'd like to just stick with it.

I see an Options button in the lower-left corner of the screen, but I can't figure out how to activate that.

Thanks!

EDIT: I'm willing to tweak XML source, if necessary.
(2021-02-03, 10:20)mrob Wrote: [ -> ]EDIT: I'm willing to tweak XML source, if necessary.
You can use infolabels related to subtitles, see InfoLabels (wiki). Look for an infolabel ListItem.SubtitleLanguage and a few of the following infolabels.
Thanks for the pointer. Unfortunately, I'm a total noob and have no idea how to make use of this information.

Also, it looks like ListItem.SubtitleLanguage only tells me a single subtitle language. OTOH, ListItem.Property(SubtitleLanguage.[n]) seems like a way to read the language(s) multiple subtitles, but how do I determine the value of n? And then, once I have to value of n, how would I expand or iterate to list a variable number of subtitles?
You need to know the maximum number of subs your files hold, for example if a video file could potentially hold up to 5 subs then n would be 1 to 5 so to show them all you would need to add

xml:

<control type="group">
<width>115</width>
<visible>!String.IsEmpty(ListItem.Property(SubtitleLanguage.1)</visible>
<control type="label">
<width>115</width>
<height>60</height>
<align>center</align>
<aligny>center</aligny>
<label>$INFO[ListItem.Property(SubtitleLanguage.1)]</label>
<font>font_flag</font>
</control>
<include content="MediaFlag">
<param name="texture" value="flags/flag.png" />
</include>
</control>
<control type="group">
<width>115</width>
<visible>!String.IsEmpty(ListItem.Property(SubtitleLanguage.2)</visible>
<control type="label">
<width>115</width>
<height>60</height>
<align>center</align>
<aligny>center</aligny>
<label>$INFO[ListItem.Property(SubtitleLanguage.2)]</label>
<font>font_flag</font>
</control>
<include content="MediaFlag">
<param name="texture" value="flags/flag.png" />
</include>
</control>
<control type="group">
<width>115</width>
<visible>!String.IsEmpty(ListItem.Property(SubtitleLanguage.3)</visible>
<control type="label">
<width>115</width>
<height>60</height>
<align>center</align>
<aligny>center</aligny>
<label>$INFO[ListItem.Property(SubtitleLanguage.3)]</label>
<font>font_flag</font>
</control>
<include content="MediaFlag">
<param name="texture" value="flags/flag.png" />
</include>
</control>
<control type="group">
<width>115</width>
<visible>!String.IsEmpty(ListItem.Property(SubtitleLanguage.4)</visible>
<control type="label">
<width>115</width>
<height>60</height>
<align>center</align>
<aligny>center</aligny>
<label>$INFO[ListItem.Property(SubtitleLanguage.4)]</label>
<font>font_flag</font>
</control>
<include content="MediaFlag">
<param name="texture" value="flags/flag.png" />
</include>
</control>
<control type="group">
<width>115</width>
<visible>!String.IsEmpty(ListItem.Property(SubtitleLanguage.5)</visible>
<control type="label">
<width>115</width>
<height>60</height>
<align>center</align>
<aligny>center</aligny>
<label>$INFO[ListItem.Property(SubtitleLanguage.5)]</label>
<font>font_flag</font>
</control>
<include content="MediaFlag">
<param name="texture" value="flags/flag.png" />
</include>
</control>
To which file and where should I add this?

Also, if I set it up to list six subtitles, but the movie file contains none, will it still work?
Just thought that would only return the 3 letter language code so you may want to do something like

<label>Sub: $INFO[ListItem.Property(SubtitleLanguage.1)]</label>

so you know it's for a subtitle.
(2021-02-03, 16:15)jjd-uk Wrote: [ -> ]The flags come from https://github.com/xbmc/xbmc/blob/master...#L281-L347

Thanks. So I just edit this file on my local installation?

Does it take effect immediately, or do I need to reload it somehow? I'd like to avoid rebooting the machine each time, if possible.
(2021-02-03, 16:17)mrob Wrote: [ -> ]
(2021-02-03, 16:15)jjd-uk Wrote: [ -> ]The flags come from https://github.com/xbmc/xbmc/blob/master...#L281-L347

Thanks. So I just edit this file on my local installation?

Does it take effect immediately, or do I need to reload it somehow? I'd like to avoid rebooting the machine each time, if possible.

Yep just edit your local version of that file. The skin needs to be reloaded for edits to take effect, this can by mapping the action ReloadSkin() to a keymap

xml:
<keymap>
<global>
<keyboard>
<f5>ReloadSkin()</f5>
</keyboard>
</global>
</keymap>

This needs to go into your keymaps folder within the userdata folder, for more on this see https://kodi.wiki/view/Userdata and https://kodi.wiki/view/Keymap for more detail on keymaps.
Although I may have misunderstood, what I've posted would add to the flags that appear at the bottom where the flags for resolution, video codec, audio codec etc appear. If you want something more in the Info windows where you've got the details panel on the right hand side then you'll need something different.
As for using F5 to reload, I don't have a keyboard attached to the machine. It's running on a server, controlled by the Kodi remote for iOS.

There's some kind of "custom button" feature in the remote, but it just looks like a way to define shortcuts.
Sorry if you don't have a physical control device for the server then I'm not sure how you'd do it other than by rebooting server since I take it that it's headless so not possible for you to simply close Kodi and then reopen Kodi?

Going your original post, if you still want to replace First Aired in the Info windows then that comes from https://github.com/xbmc/xbmc/blob/master...#L200-L205

Replace with

xml:
<include content="InfoDialogMetadata">
<param name="control_id" value="154" />
<param name="label" value="[COLOR button_focus]$LOCALIZE[24012]: [/COLOR]$INFO[ListItem.Property(SubtitleLanguage.1)]$INFO[ListItem.Property(SubtitleLanguage.2,; )]$INFO[ListItem.Property(SubtitleLanguage.3,; )]" />
<param name="altlabel" value="$LOCALIZE[24012]: $INFO[ListItem.Property(SubtitleLanguage.1)]$INFO[ListItem.Property(SubtitleLanguage.2,; )]$INFO[ListItem.Property(SubtitleLanguage.3,; )]" />
<param name="visible" value="!String.IsEmpty(ListItem.SubtitleLanguage)" />
</include>

[edit] You could also add it as a new entry and not lose First Aired
Or do you not have a PC/laptop you could test on before transferring edited skin files to server?
(2021-02-03, 17:01)jjd-uk Wrote: [ -> ]Or do you not have a PC/laptop you could test on before transferring edited skin files to server?

Correct. I don't have a test machine. I'll try editing the file on the server and rebooting. It's not a major change, so maybe it'll be okay.

EDIT: Okay, I edited /usr/share/kodi/addons/skin.estuary/xml/Includes.xml, and inserted the text that you suggested. It works!

For anybody else trying this, I notice that subs in SRT files are not displayed, unless they have the language identifier in their file name, e.g., MyMovie.eng.srt.

So, now I'll have to go through and change a bunch of filenames, but it's worth it to get the benefit of this feature.

The ability to customize like this is one of the things that sold me on Kodi — thanks again!
I've discovered that there seem to be some limitations with ListItem.SubtitleLanguage.

It doesn't seem to display subtitles in VIDEO_TS files, and if I have vobsub (idx+sub) files, it doesn't seem to register them either.

I tried renaming my idx/sub files to be like myMovie.eng.idx and myMovie.eng.sub, but this seems to have no effect.

Also, parenthetically, I am not sure how I should rename idx files that contain multiple languages.

I find one other thread asking about the inconsistent behavior of ListItem.SubtitleLanguage.

Any suggestions about working around these limitations?