Kodi Community Forum
Episode displayseason and displayepisode tags in nfo - Printable Version

+- Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Support (https://forum.kodi.tv/forumdisplay.php?fid=33)
+--- Forum: General Support (https://forum.kodi.tv/forumdisplay.php?fid=111)
+---- Forum: OS independent / Other (https://forum.kodi.tv/forumdisplay.php?fid=228)
+---- Thread: Episode displayseason and displayepisode tags in nfo (/showthread.php?tid=343498)

Pages: 1 2


Episode displayseason and displayepisode tags in nfo - scott967 - 2019-05-01

This is an FYI concerning the use of <displayseason> and <displayepisode> tags in tvshow episode nfo files.

I looked in the wiki on tvshow nfo files, and it shows their existence, but provides no guidance (that I could find at least) on how to use them.  There is an example nfo file with both set to "-1" but no explanation.  So I examined these by test in Kodi 18.2 and also inspected VideoInfoTag.cpp in the code.

Findings:

1.  These tags are used for placing special episodes into the media container lists for episodes sorted by episode.  First, it is important that the video files (and corresponding nfos) be named using the "S00" (or analog) season identifier.  The E01 episode identifier can also be significant as explained further below.

2.  The setting media/video "flatten tv show seasons" controls in part where these specials are displayed.  If "Never" there will be a tvshow media view for seasons with a "specials" season (followed by any other seasons) and when selected will show all the special episodes ordered by E01 episode number.  This is always true.  If "Always" the view for seasons doesn't exist and there will be no "specials" season listing.  Instead the default is for all the specials to be displayed first ordered by E01 episode number.

3.  The <displayseason> and <displayepisode> tags will force the special episodes to appear within a season even when the "flatten tv show seasons" is set to "Never" (in this case they will display within a season in addition to within the "specials" season).

4.  The <displayseason> tag determines in which season folder (when tv show flatten" is "never")  or the season/episode order (if "always") the special appears.  Setting it to null, 0, or -1 (as in the wiki example) all cause the special NOT to show in a season folder ("never") or at the top of the episode list ("always").  The <displayepisode> tag determines which regular episode the special will sort BEFORE.  So setting <displayepisode> to 5 will result in the special sorting before regular episode 5.  Multiple specials can use the same <displayseason> and <displayepisode> setting.  In that case they will be displayed in E01 episode order BEFORE the regular episode number in the tag.  Setting the <displayepisode> tag to null, 1, 0, or -1 (as in the wiki example) will cause the special to order FIRST within the season.

5.  There is another tag available that is not documented in the wiki:  <displayafterseason>.  This tag is a shorthand way of forcing the special to sort at the END of the season.  For example <displayafterseason>2</displayafterseaon> will cause that special to sort as the LAST episode of the season 2 (it is the same as using <displayseason>2</displayseason> <displayepisode>1000</displayepisode>).  There's no reason to use both displayseason/displayepisode and displayafterseason in the nfo file (but if you do the last one "wins").

I hope this is helpful for other users.

scott s.
.


RE: Episode displayseason and displayepisode tags in nfo - ungrown - 2022-05-17

unfortunately, these tags are ignored by kodi, not working at all.

according to https://kodi.wiki/view/Naming_video_files/Episodes
kodi doesn't extract episode numbering inside NFO files, only search for those valid pattern in the filename, such as s1e1, 1x01, etc.

and my practice verified this.
i renamed a episode video with its valid NFO, stripping those numbering part from their filename.
in the NFO xml, it's E00S34 and displayed as E01S19, as shown below:
xml:

<season>0</season>
<episode>34</episode>
<displayseason>1</displayseason>
<displayepisode>19</displayepisode>
but kodi was unable to scan this episode.
then i added a "1x19" into the filename, and kodi recognized it as S01E19.
then i replaced 1x19 with 0x34 and did a remove-and-re-scan, this time kodi showed it as S00E34, not S01E19.
then i put both 1x19 AND 0x34 into the filename, kodi displayed this single episode as two episodes: S00E34 AND S01E19.

so, forget about those tags listed in the tv show nfo wiki page. kodi doesn't use them, instead kodi only cares about those numbering in filename.
btw, my kodi version is 19.4

p.s.
i dig into this thing because i encountered an episode file, which has a "1920x1080" in its filename, but without episode numbering pattern. i kept trying but kodi took this file as S1920E1080, then i had to add a numbering pattern into the filename but kodi resulted into two episode (yeah the great episode 1080 of season 1920 still there). i had to remove that 1920x1080 part to get it done correctly.


RE: Episode displayseason and displayepisode tags in nfo - Karellen - 2022-05-17

Forget about these tags as they are ignored...
xml:
<season>0</season>
<episode>34</episode>

But these tags are used by Kodi as they perform a different function...
xml:
<displayseason>1</displayseason>
<displayepisode>19</displayepisode>


(ps. I keep telling members that, but I don't know why some members disagree with me. Glad you figured it out Smile )


RE: Episode displayseason and displayepisode tags in nfo - Chalklands - 2022-08-25

Thank you. This worked for me.

I had a prequel episode called 'prequel S00E02' saved in Series 0 folder. I wanted to show it at the beginning of series 2 in Kodi,
Changed the file name to 'prequel S00E02 S02E01' and it's now showing correctly! What a revelation!!


RE: Episode displayseason and displayepisode tags in nfo - Karellen - 2022-08-25

Might be helpful... https://kodi.wiki/view/Convert_movie_to_episode


RE: Episode displayseason and displayepisode tags in nfo - vonson - 2023-02-20

Hello,

from what I found is that with displayseason and displayepisode tags the sorting of those episodes can be tweaked.
But: is there a way to hide some specials and show others? Because there are shows with special episodes which ARE episodes of the show but for some reason are not included in the episode counting, those I'd surely like to have displayed in the season folder, while others (bloopers, additional lore, background info etc.) I'd like to keep away from the season folder and be restricted to the 'Specials' folder. Is there any way to do that?


RE: Episode displayseason and displayepisode tags in nfo - Karellen - 2023-02-20

(2023-02-20, 13:30)vonson Wrote: Is there any way to do that?
Yes, using those "display" tags detailed above.
You will need to edit your nfo files to add them in, then scan them back into the library.


RE: Episode displayseason and displayepisode tags in nfo - vonson - 2023-02-20

I do not understand how this is supposed to work. I can manipulate to have the specials at the top of the season episodes or at the bottom. that's it.

I use
  <season>0</season>
  <episode>1</episode>

but whatever values I use for  <displayseason>  I cannot get them to disappear from the seasons folder. with 0 they are at the top, with -1 they are at the bottom of the list.
<displayepisode> also does not make any difference in that regard

but actually it just got weirder:
I found one single series in which it works as intended, the specials are in the specials folder and do not get displayed in the season folders. but i do not understand, why.  (<displayseason> and <displayepisode> both are set to -1 in this one case).
I then copied one of the nfos that appears to be working with this one series over to one other series, kept it unchanged (just renamed it to match the series) and again the special is in the season folder.

I am lost here.

Edit:
btw, "flatten tv show seasons" is set to the default 'If only one season', if that should be of any importance...


RE: Episode displayseason and displayepisode tags in nfo - Karellen - 2023-02-20

These tags are used in nfo files. I assume you have those available to you.

xml:
<season>0</season>
<episode>1</episode>
These tags do nothing in an nfo file. They are there for the sake of completeness only, as the entire database is exported. Changing them does nothing.

xml:
<displayseason>1</displayseason>
<displayepisode>19</displayepisode>
These tags will allow you to sort Specials episodes into regular seasons. The episode will be listed in the Specials list in addition to also listing them in regular seasons
You can't remove Specials from the Specials listing.
The above example will display a Special in Season 1 before Episode 19.

If you want to remove episodes from Specials completely, then use "Reorganise Episodes'... https://kodi.wiki/view/Convert_movie_to_episode


RE: Episode displayseason and displayepisode tags in nfo - vonson - 2023-02-21

yes, surely we are talking about editing the nfo files.

just to understand, the <season> and <episode> tags are ignored completely? the season and episode info is only parsed from the video filename?
 
Quote:You can't remove Specials from the Specials listing.

no, it's the other way around. I want to keep them in specials, I want to remove them from the regular seasons.


to give examples:


Restrict to 'Specials:
There are some nice and informative featurettes accompanying the 'Chernobyl' episodes. Or bloopers of each 'IT Crowd' Season. Those should be restricted to the 'Specials' folder and NOT be shown in the regular Seasons.

Show in Seasons:
For 'Black Mirror' there is the 'White Christmas' episode, which is a full, regular episode that was aired between season 2 and 3, which for some reason is regarded as a special (and listed as such on the thetvdb). This one should be listed at the end of Season 2 (and in 'Specials').



but whatever i set <displayseason> and <displayepisode> to, or remove them completely, the respective special episode is always present in the regular season. (with the one weird exception mentioned in my earlier post above...)


RE: Episode displayseason and displayepisode tags in nfo - Karellen - 2023-02-21

(2023-02-21, 00:49)vonson Wrote: the season and episode info is only parsed from the video filename?
Correct. It comes from the filename.

(2023-02-21, 00:49)vonson Wrote: no, it's the other way around. I want to keep them in specials, I want to remove them from the regular seasons.
Oh, that is easy. Delete those two <display...> tags out of the nfo files and scan back into the library.
If you have them, that means you are using TVDB scraper. TVDB is the only site that provides this feature via scraping.

(2023-02-21, 00:49)vonson Wrote: For 'Black Mirror' there is the 'White Christmas' episode, which is a full, regular episode that was aired between season 2 and 3, which for some reason is regarded as a special (and listed as such on the thetvdb). This one should be listed at the end of Season 2.
Easy. But you need nfo files to do this and artwork for the episode.
Delete the episode from the Library.
Rename the White Christmas episode to S02E04 and move it into your Season 2 folder.
Also rename the nfo file and the artwork and move them as well.
Scan back into the library.


RE: Episode displayseason and displayepisode tags in nfo - vonson - 2023-02-21

no, that's not it.


To stick to the examples:
Having the White Christmas episode in the season is not the problem. It is numbered as S00E01, <displayseason> is set to 2, and this behaves as intended. It is shown in Season 2 and in Specials. No problems here, just for illustration.

It's the other example.
The Chernobyl featurettes appear in 'Specials' AND in the Season, but I do not want them in the Season.
I have set <displayseason> to -1, to 0, to 1, i have removed <displayseason> and <displayepisode> from the nfo. The featurette always is listed in the season, no matter what.


Usually I create my nfos with Ember Media Manager, but I edit them manually sometimes. The <displayseason> and <displayepisode> entries I have added (and changed) manually using notepad.


Edit:
I noticed something else that is weird:
In the actual Specials folder on my hd, where the special episodes are stored (in the example: /Chernobyl/Specials/), there is a .nomedia file present (I don't remember why). Still these special episodes are added when I scan the Series folder for new content, which should not be the case with this file present, or am I missing something?


RE: Episode displayseason and displayepisode tags in nfo - Karellen - 2023-02-21

(2023-02-21, 01:22)vonson Wrote: The Chernobyl featurettes appear in 'Specials' AND in the Season, but I do not want them in the Season.
I have set <displayseason> to -1, to 0, to 1, i have removed <displayseason> and <displayepisode> from the nfo. The featurette always is listed in the season, no matter what.
Did you refresh the episode back into the library?
Provide a Debug Log that captures you scanning it back into the library.

(2023-02-21, 01:22)vonson Wrote: In the actual Specials folder on my hd, where the special episodes are stored (in the example: /Chernobyl/Specials/), there is a .nomedia file present (I don't remember why). Still these special episodes are added when I scan the Series folder for new content, which should not be the case with this file present, or am I missing something?
It shouldn't. But on some platforms I have noticed the .nomedia does not always work.


RE: Episode displayseason and displayepisode tags in nfo - vonson - 2023-02-21

Yes, i did refresh the data, or remove the Episode and add it again.

While the playback device is a fire stick, I usually do the scanning from my windows maschine. I actually have to test if scanning on the fire stick would have different results, never thought about that...

I have to see into creating a Debug.log, I have never done it. For now I have to call it a day, I will report back in a day or two, hopefully with a logfile Smile

Thank you for your help so far, I'll be back (no joke intended)


RE: Episode displayseason and displayepisode tags in nfo - vonson - 2023-02-22

So,
I  switched on the log and imported the special (which I had removed from the library before).
(Note:  It's a dummy series entry as well as a dummy special, a trailer in this case, it's just for testing; I prefer to leave the regular content, that my family has access to, untouched by my testing.)
No <displayseason> and <displayepisode> in the nfo.

The link is: https://paste.kodi.tv/dozezewopa.kodi
I hope that was correct procedure...