• 1
  • 22
  • 23
  • 24(current)
  • 25
  • 26
  • 42
Release TheMovieDB - TV Show scraper (XML)
Great. Thanks @teriyaki Smile
My Signature
Links to : Official:Forum rules (wiki) | Official:Forum rules/Banned add-ons (wiki) | Debug Log (wiki)
Links to : HOW-TO:Create Music Library (wiki) | HOW-TO:Create_Video_Library (wiki)  ||  Artwork (wiki) | Basic controls (wiki) | Import-export library (wiki) | Movie sets (wiki) | Movie universe (wiki) | NFO files (wiki) | Quick start guide (wiki)
Reply
I believe I've found a bug in the scraper when using episode groups. I'm using version 3.4.1 on Kodi 18.5. Certain episodes won't be scraped when using an episode group in the parsing NFO file. This can be seen with SpongeBob SquarePants and Monogatari. Looking at the logs, it seems like the scraper can't even see the episodes in the episode guide.

Here is a log excerpt from SpongeBob: https://paste.kodi.tv/suwurafaqe.kodi. And here's the episode group: https://www.themoviedb.org/tv/387-sponge...001994b027. As you can see, it only finds the first 20 episodes in season 4, even though it actually has 38 episodes. However, it seems to find all of the other episodes in all of the seasons, although I only have the first five, and I haven't checked anything after that. All of the episodes are in the JSON response from TMDB: https://api.themoviedb.org/3/tv/387/seas...en,en,null

Same thing for Monogatari: https://paste.kodi.tv/qesifagiqa.kodi. Episode group: https://www.themoviedb.org/tv/46195/epis...303f00d84d. Many seasons are completely absent, and others are missing episodes. Again, TMDB's JSON API shows these episodes.

I've been able to reproduce this on 2 different devices.
Reply
@scarletwatch

I tested your SpongeBob example and can confirm that Season 4 scrapes upto episode 20 and ignores the remaining 18 episodes.

I cannot see why this happens, so it will take some investigating. Maybe @olympia might see the issue.

This feature is not available in v17 of Kodi, so cannot test an older scraper version, and v19 uses the same scraper and it exhibits the same behaviour.
My Signature
Links to : Official:Forum rules (wiki) | Official:Forum rules/Banned add-ons (wiki) | Debug Log (wiki)
Links to : HOW-TO:Create Music Library (wiki) | HOW-TO:Create_Video_Library (wiki)  ||  Artwork (wiki) | Basic controls (wiki) | Import-export library (wiki) | Movie sets (wiki) | Movie universe (wiki) | NFO files (wiki) | Quick start guide (wiki)
Reply
The issue is in the regex on Line 245, which splits off the episodes for a specific "season" in an Episode Group.
Unlike aired order, all the episodes for an Episode Group are in a single file, rather than separate season files, but unfortunately you can't just repeat over each episode individually in one go for the episode list, because the order (the "season" number) only appears once per grouping.  You have to pick an order value, then grab all the episodes associated with it, and only then iterate over those, using the order value for the season.

But that regex stops short at season 4 episode 20 for Spongebob because it simply assumes there are no closing square brackets between the start of an episodes block and the end, but the plot for episode 21 contains "So he sells every single thing he owns [plus his clothes]", so it cuts off right there.  Episode 20 is then the last fully captured episode that still matches the next regex.
Similarly for the Nisemonogatari grouping, all the episode titles there have a number in square brackets, so no episode gets fully captured.

Try replacing that line with:
Code:
<expression>"order":$$1,"episodes":(.*?)\],"locked"</expression>
That should more reliably capture all the episodes within the grouping. 
(I've only tested it with an online regex checker and the Spongebob Episode Group file, though, so it stills needs checking with Kodi and other examples to make sure it's a valid fix.)
Reply
Thanx for a real good scrapper.

If there any chance you will add a fallback language option just like TheTVDB scrapper has?
When there is no episode info in my language I would like to get the english info instead...

best regards,
Bodozer
Reply
@scudlee

I can't tell whether or not this regex fixes SpongeBob, since the TMDB entry was edited to change the brackets to parentheses (which does fix scraping the rest of the season), but it seems to completely break Monogatari. Now nothing gets matched: https://paste.kodi.tv/icaguqowuf.kodi
Reply
Bleh.  So the "locked" field isn't guaranteed to be there...

Let's try:
Code:
<expression>"order":$$1,"episodes":(.*?)\](?:,"locked"|\})</expression>
and hope there's no plot summaries with a "]}" in them.
Reply
@scudlee

That seems to work! Everything gets scraped now. Thanks!
Reply
I have this tv-show called Exit that will not get scrapped correctly from TMDB.
When I try to locate it manually in TMDB, through Kodi, it is not available in the suggested list. I find many other tv-shows called "Exit" or something "Exit", but for some reason the correct "Exit" from 2019 is not in the list through Kodi Confused .
Reply
(2020-02-24, 18:47)sallenko Wrote: I have this tv-show called Exit that will not get scrapped correctly from TMDB.
When I try to locate it manually in TMDB, through Kodi, it is not available in the suggested list. I find many other tv-shows called "Exit" or something "Exit", but for some reason the correct "Exit" from 2019 is not in the list through Kodi Confused .

you can try to name the movie "exit (2019)" to specify the year.
Reply
(2020-02-24, 18:59)Kurn415 Wrote:
(2020-02-24, 18:47)sallenko Wrote: I have this tv-show called Exit that will not get scrapped correctly from TMDB.
When I try to locate it manually in TMDB, through Kodi, it is not available in the suggested list. I find many other tv-shows called "Exit" or something "Exit", but for some reason the correct "Exit" from 2019 is not in the list through Kodi Confused .

you can try to name the movie "exit (2019)" to specify the year.

Thank you for the idea.
I have tried that and unfortunately it will not work. Another tv-show (Last Exit 2019) is scrapped Undecided.
The weird thing is that the tv-show Exit does exist on TMDB and if it does I should be able to choose it manually through Scan to library, but it is not listed in that list.

Am I looking at the right link or what am I doing wrong?
Reply
(2020-02-24, 20:59)sallenko Wrote: The weird thing is that the tv-show Exit does exist on TMDB and if it does I should be able to choose it manually through Scan to library, but it is not listed in that list.
Whoever entered the English translation at TheMovieDB did not complete the entry. I have fixed the missing items and it should scrape into the library now (it does here).

You might need to wait up to 24 hours for the changes to reach your local server though and your local cache to be cleared.
My Signature
Links to : Official:Forum rules (wiki) | Official:Forum rules/Banned add-ons (wiki) | Debug Log (wiki)
Links to : HOW-TO:Create Music Library (wiki) | HOW-TO:Create_Video_Library (wiki)  ||  Artwork (wiki) | Basic controls (wiki) | Import-export library (wiki) | Movie sets (wiki) | Movie universe (wiki) | NFO files (wiki) | Quick start guide (wiki)
Reply
The simplest way here would be to use a parsing NFO file (wiki).

Just make a text file in the show folder called "tvshow.nfo" and in that just put the reference url for TMDB (https://www.themoviedb.org/tv/94137-exit?language=en).

Then move the show folder somewhere out of the way (somewhere not in your library tree), do a clean library (to remove any incorrect reference to the show), move it back and scrape again. The NFO file (wiki) should be picked up and will point the scraper at the correct show.
|Banned add-ons (wiki)|Forum rules (wiki)|VPN policy (wiki)|First time user (wiki)|FAQs (wiki) Troubleshooting (wiki)|Add-ons (wiki)|Free content (wiki)|Debug Log (wiki)|

Kodi Blog Posts
Reply
(2020-02-24, 23:05)Karellen Wrote:
(2020-02-24, 20:59)sallenko Wrote: The weird thing is that the tv-show Exit does exist on TMDB and if it does I should be able to choose it manually through Scan to library, but it is not listed in that list.
Whoever entered the English translation at TheMovieDB did not complete the entry. I have fixed the missing items and it should scrape into the library now (it does here).

You might need to wait up to 24 hours for the changes to reach your local server though and your local cache to be cleared.

Ok. So that was the missing link. Thank you for correcting it. I will try try again tomorrow.
Reply
(2020-02-24, 23:06)DarrenHill Wrote: The simplest way here would be to use a parsing NFO file (wiki).

Just make a text file in the show folder called "tvshow.nfo" and in that just put the reference url for TMDB (https://www.themoviedb.org/tv/94137-exit?language=en).

Then move the show folder somewhere out of the way (somewhere not in your library tree), do a clean library (to remove any incorrect reference to the show), move it back and scrape again. The NFO file (wiki) should be picked up and will point the scraper at the correct show.

Thank you for the info. I will try that as well.
Reply
  • 1
  • 22
  • 23
  • 24(current)
  • 25
  • 26
  • 42

Logout Mark Read Team Forum Stats Members Help
TheMovieDB - TV Show scraper (XML)2