20 Nov 2019 - TVDB Scraper v3.2.0 is now available which reinstates scraping. TVDB are still in the process of fixing a number of bugs so there may still be further breakages. See this post. 2901570 (post)

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.
Embuary | Skin | Helper | Info | Repo | GitHub
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.
Embuary | Skin | Helper | Info | Repo | GitHub
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?
Embuary | Skin | Helper | Info | Repo | GitHub
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

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.
Embuary | Skin | Helper | Info | Repo | GitHub
Reply
 
Thread Rating:
  • 0 Vote(s) - 0 Average



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