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

TheTVDB Official Kodi TV plugin
9 stars 3 forks source link

Scraper does not get the "Default (Aired Order)" order #23

Closed Hlsgs closed 1 year ago

Hlsgs commented 1 year ago

Episodes and Specials are correctly scraped, but all specials are only placed as such, and not in between the episodes they are supposed to be between. I am only interested and refering to TVDBs "Default (Aired Order)", which is the default setting for the scraper.

This seems to happen for any and all series, but, if need be, I can provide a dummy file structure to replicate on and the resulting log.

KarellenX commented 1 year ago

This issue was discussed on the forum here... https://forum.kodi.tv/showthread.php?tid=370232

It relates to the Specials use of the "Airs Before", "Airs After" data. The scraper seems to ignore these fields, so the Specials are not sorted into their correct order in the normal Seasons.

I also confirmed this issue.

antheaezzell commented 1 year ago

@Hlsgs and @KarellenX this has been ticketed - https://mediamorph.atlassian.net/browse/TVD-3479 feel free to update the forums to let them know we are aware of the bug and are working to prioritize the work.

Hlsgs commented 1 year ago

@antheaezzell Quick question: is this purely on the API side or will there need to be an update to the KODI scraper as well?

antheaezzell commented 1 year ago

No, I think the API is treating this properly or we would have gotten a lot of reports of it in the v4 repo. It's possible that the scraper needs an update @Hlsgs

Hlsgs commented 1 year ago

No change in v1.1.2

antheaezzell commented 1 year ago

This is still in progress and was not part of the most recent release @Hlsgs

Hlsgs commented 1 year ago

Does https://github.com/thetvdb/metadata.tvshows.thetvdb.com.v4.python/pull/26 included in v1.1.3 address this?

maxifwortman commented 1 year ago

@Hlsgs Yes, 1.1.3 fix that issue.

Hlsgs commented 1 year ago

@maxifwortman Tested 1.1.3 and specials placement is all over the place. Taking BSG as an example:

KarellenX commented 1 year ago

I can confirm the issue by @Hlsgs using Battlestar Galactica.

In the database: https://kodi.wiki/view/Databases/MyVideos#episode c15=Season Number- Specials Sorting c16=Episode Number- Specials Sorting With some episodes the database has been filled with 0 values instead of the correct Sort Season and Sort Episode number. See image.

Looking at the log, the API seems to return two types of values that I think is connected with Sorting (I am not overly familiar with your API)... 'sortseason': 0, 'sortepisode': 0, and 'airsBeforeSeason': 1, 'airsBeforeEpisode': 1

It seems that the sortx is being used for the data and some of those entries have invalid "0" value sortx

Is the API returning invalid data?

Log... https://paste.kodi.tv/sawitukuca.kodi Line 1776 for sortseason, sortepisode Line 1777 for airsbefore data

sortseason

antheaezzell commented 1 year ago

Hi @Hlsgs and @KarellenX we are looking at these issues right now. I will get back to you with an update.

antheaezzell commented 1 year ago

@Hlsgs I believe this work has been done in our most recent release. Please let me know if you are still encountering issues.

Hlsgs commented 1 year ago

There's one more issue I can find: specials that are listed as "Airs after season X" are listed at the beginning of season X+1 instead. As a consequence(and this is the main problem), specials that follow the end of the show are not listed at the end of the last season. That used to be the case with the old scrapers and it helped with not having to seek additional info online. Still taking BSG as an example, this applies to the following:

Interestingly, thetvdb has a separate type of listing as "Airs before season X, episode 1", which now produces the same result as "Airs after season X-1". Example: Razor, listed as "Airs before season 4, episode 1"

@KarellenX can you confirm?

antheaezzell commented 1 year ago

This part still appears to be a problem. I'm going to reticket. Internal ticket here - https://mediamorph.atlassian.net/browse/TVD-3571

Hlsgs commented 1 year ago

@antheaezzell Any ETA of this?

antheaezzell commented 1 year ago

Hi @Hlsgs it's probably going to be several weeks before we can get to this. It is our highest priority, but we only have one engineer who knows the plugin and he's got a few other work commitments on a different project. It's my top priority when I get him back.

antheaezzell commented 1 year ago

@Hlsgs can you test? This work was released - https://github.com/thetvdb/metadata.tvshows.thetvdb.com.v4.python/releases/tag/1.1.5

Hlsgs commented 1 year ago

LGTM. Thank you!