thetvdb / metadata.tvshows.thetvdb.com.v4.python

TheTVDB Official Kodi TV plugin
9 stars 3 forks source link

[TVD-3571] Fix airs afters season #34

Closed maxifwortman closed 1 year ago

Hlsgs commented 1 year ago

@maxifwortman Just FYI, here's what Kodi does when importing NFO files if it encounters the <displayafterseason> tag. This results in the episode number being 4096. As a sidenote, <displayafterseason> is not a "native" Kodi tag, but, from what I gather, it is used by some media managers, hence why Kodi supports importing NFO files that contain it, even if it neither saves it in the DB nor exports it itself.

Also, either I'm missing something or you may have misnamed you pull request as I've seen no issues with the "airs before season" logic, but rather with "airs after season".

KarellenX commented 1 year ago

The only tags Kodi uses for allocating Special episodes into seasons is...

<displayseason></displayseason> <displayepisode></displayepisode>

Hlsgs commented 1 year ago

@KarellenX When importing metadata from NFO files, it also supports the <displayafterseason> tag, whereupon <displayafterseason>X</displayafterseason> results in <displayseason>X</displayseason><displayepisode>4096</displayepisode> being saved in the DB(and exported subsequently). I thought this behavior might be useful as an example here. If you want to test this, make sure <displayafterseason> is placed after the "native" tags you've mentioned in the NFO file.

maxifwortman commented 1 year ago

@Hlsgs thanks for the info, I changed the PR to copy this behavior and avoid another api call for sorting specials. Also changed the PR title and the comment in addon.xml.