(2021-09-08, 02:04)1a2b3c4d Wrote: That is precisely what I am looking for.
Cool. I achieved this by modifying the
Variables.xml
file in the stock Estuary skin. The location of this file will depend on your OS, and as Estuary is shipped with Kodi it will be installed in the addon directory inside the directory pointed to by
special://xbmc
(see
special protocol (wiki) for OS translations).
The variable to modify is
ListLabelVar
and the current values can be seen at
https://github.com/xbmc/xbmc/blob/master...ml#L71-L76
What I did was to add the following two value conditions to that variable, before the value which doesn't have a condition attached.
xml:
<value condition="!String.IsEqual(ListItem.Artist,ListItem.AlbumArtist) + String.IsEqual(ListItem.DBType,song)">$INFO[ListItem.TrackNumber,,. ]$INFO[ListItem.Artist,, - ]$INFO[ListItem.Title]</value>
<value condition="String.IsEqual(ListItem.Artist,ListItem.AlbumArtist) + String.IsEqual(ListItem.DBType,song)">$INFO[ListItem.TrackNumber,,. ]$INFO[ListItem.Title]</value>
What this does is ignore the track naming template in Kodi's settings and formats the value as follows.
If the artist AND the albumartist are different, AND the item is a song then :-
Write the track number if any, followed by
.
. If there is no track number then the
.
is ignored. Write the artist name followed by
-
and finally the song title.
if the artist AND the albumartist are the same AND the item is a song then :-
Write any track number as above, followed by just the song title.
The full variable should end up looking like this.
xml:
<variable name="ListLabelVar">
<value condition="String.IsEqual(ListItem.DbType,episode) + Window.IsActive(videoplaylist)">$INFO[ListItem.TVShowtitle,,: ]$INFO[ListItem.Season,,x]$INFO[ListItem.Episode,,. ]$INFO[ListItem.Title]</value>
<value condition="String.IsEqual(ListItem.DbType,musicvideo) + Window.IsActive(videoplaylist)">$INFO[ListItem.Artist,, - ]$INFO[ListItem.Title]</value>
<value condition="[!String.IsEmpty(ListItem.Season) | !String.IsEmpty(ListItem.Episode) | !String.IsEmpty(ListItem.EpisodeName)] + Window.IsActive(videoplaylist)">$INFO[ListItem.Title,,: ]$VAR[SeasonEpisodeLabel]$INFO[ListItem.EpisodeName]</value>
<value condition="!String.IsEqual(ListItem.Artist,ListItem.AlbumArtist) + String.IsEqual(ListItem.DBType,song)">$INFO[ListItem.TrackNumber,,. ]$INFO[ListItem.Artist,, - ]$INFO[ListItem.Title]</value>
<value condition="String.IsEqual(ListItem.Artist,ListItem.AlbumArtist) + String.IsEqual(ListItem.DBType,song)">$INFO[ListItem.TrackNumber,,. ]$INFO[ListItem.Title]</value>
<value>$INFO[ListItem.Label]</value>
</variable>
Make sure that Kodi is not running when you edit the file as it is only read when Kodi starts or you reload the skin.
@
jjd-uk Anything there I have missed or might cause an issue ?