Get Season title from Episode level
#1
From a list of episodes is it possible to get the title/label of that episodes season?

I can get the shows title using ListItem.TVShowTitle but there doesn't seem to be a way to get the season title/label.
Reply
#2
Just add a hidden container with https://github.com/sualfred/script.embua...of-tv-show

The list is sorted ascending by season number. Specials are at the beginning.

If that is too hacky for you I could modify https://github.com/sualfred/script.embua...-of-season to return the season label as listitem property.
Main: Lancool II Mesh  - Ryzen 9 5900x - MSI x570 Unify - Zotac RTX 3080 AMP HOLO - 32GB Trident Z Neo 3600 CL16 -  EVO 960 M.2 250GB / EVO 940 250GB / MX100 512GB /  Crucial P1 2TB / WD Blue 3D Nand 2TB 
Sound: Saxx AS30 DSP - Beyer Dynamic Custom One Pro 
TV: Nvidia Shield 2019 Pro- Adalight 114x LEDs - Sony 65XG9505 - Kodi / Emby - Yamaha RX-V683 - Heco Victa 700/101/251a + Dynavoice Magic FX-4
Server: i3 Skylake - 8GB - OMV4 - 22TB Storage
Reply
#3
(2019-10-19, 14:13)sualfred Wrote: Just add a hidden container with https://github.com/sualfred/script.embua...of-tv-show

The list is sorted ascending by season number. Specials are at the beginning.

If that is too hacky for you I could modify https://github.com/sualfred/script.embua...-of-season to return the season label as listitem property.

Thanks, that's kind of the way I'm doing it now, using a custom python script to look up all the seasons for the show and then add in the data when I create the new list, I had just hoped there was maybe an InfoLabel I was missing that would be easier. Thanks anyway Smile
Reply
#4
Wait a minute. Isn't Container.Foldername exactly what you are looking for? But that is only filled in MyVideoNav.xml.
Main: Lancool II Mesh  - Ryzen 9 5900x - MSI x570 Unify - Zotac RTX 3080 AMP HOLO - 32GB Trident Z Neo 3600 CL16 -  EVO 960 M.2 250GB / EVO 940 250GB / MX100 512GB /  Crucial P1 2TB / WD Blue 3D Nand 2TB 
Sound: Saxx AS30 DSP - Beyer Dynamic Custom One Pro 
TV: Nvidia Shield 2019 Pro- Adalight 114x LEDs - Sony 65XG9505 - Kodi / Emby - Yamaha RX-V683 - Heco Victa 700/101/251a + Dynavoice Magic FX-4
Server: i3 Skylake - 8GB - OMV4 - 22TB Storage
Reply
#5
(2019-10-19, 15:11)sualfred Wrote: Wait a minute. Isn't Container.Foldername exactly what you are looking for? But that is only filled in MyVideoNav.xml.

Container.FolderName doesn't seem to work if you have a list of episodes from different seasons. For example set 'Flatten TV show seasons' to 'Always' so that when you enter a TV show you get a list containing all the episodes and then Container.FolderName returns the TV Show name, not the season name. 

Also as a quick note:-
Quote:Just add a hidden container with https://github.com/sualfred/script.embua...of-tv-show

The list is sorted ascending by season number. Specials are at the beginning.
This doesn't seem to work with named Seasons, try running it against a show with named season like American Horror Story or Channel Zero and it returns the seasons out of order. In fact it returns them in alphabetical order not season order Sad
Reply
#6
Yep, only works on a regular tvshow -> season -> episodes structure

Haven't had season names in mind. Does it work if you add sortby="season" to the <content> path?
Main: Lancool II Mesh  - Ryzen 9 5900x - MSI x570 Unify - Zotac RTX 3080 AMP HOLO - 32GB Trident Z Neo 3600 CL16 -  EVO 960 M.2 250GB / EVO 940 250GB / MX100 512GB /  Crucial P1 2TB / WD Blue 3D Nand 2TB 
Sound: Saxx AS30 DSP - Beyer Dynamic Custom One Pro 
TV: Nvidia Shield 2019 Pro- Adalight 114x LEDs - Sony 65XG9505 - Kodi / Emby - Yamaha RX-V683 - Heco Victa 700/101/251a + Dynavoice Magic FX-4
Server: i3 Skylake - 8GB - OMV4 - 22TB Storage
Reply
#7
(2019-10-19, 17:25)sualfred Wrote: Yep, only works on a regular tvshow -> season -> episodes structure

Haven't had season names in mind. Does it work if you add sortby="season" to the <content> path?

Not sure I'll have to test, but your "getseasons" seems to be hard coded to only return the "Season x" format anyway Sad

From library.py

python:
def parse_seasons(li, item, append=False):
    ........
    ........
    ........
    if season == 0:
        title = '%s' % (xbmc.getLocalizedString(20381))
        special = 'true'
    else:
        title = '%s %s' % (xbmc.getLocalizedString(20373), season)
        special = 'false'

Thanks anyway, but I already have a python implementation working that get's the season names in the right order, my original question was only to see if I was missing some simple InfoLabel that already provided the season name for a given episode.
Reply
#8
Ah, now I remember. I've added ListItem.Property(season_label) for it. Kodi is always sorting it by label, that was why.

And if you are still interested, I've modified my getbydbid method to include the season label as ListItem.Property(season_label) for episodes, too:
-> plugin://script.embuary.helper/?info=getbydbid&type=episode&dbid=$INFO[ListItem.DBID]

Thanks for pointing me to this "issue". I'll adopt these changes to Embuary, too.
Main: Lancool II Mesh  - Ryzen 9 5900x - MSI x570 Unify - Zotac RTX 3080 AMP HOLO - 32GB Trident Z Neo 3600 CL16 -  EVO 960 M.2 250GB / EVO 940 250GB / MX100 512GB /  Crucial P1 2TB / WD Blue 3D Nand 2TB 
Sound: Saxx AS30 DSP - Beyer Dynamic Custom One Pro 
TV: Nvidia Shield 2019 Pro- Adalight 114x LEDs - Sony 65XG9505 - Kodi / Emby - Yamaha RX-V683 - Heco Victa 700/101/251a + Dynavoice Magic FX-4
Server: i3 Skylake - 8GB - OMV4 - 22TB Storage
Reply

Logout Mark Read Team Forum Stats Members Help
Get Season title from Episode level0