Kodi Community Forum
Solved TV scraping help - 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: Solved TV scraping help (/showthread.php?tid=342759)



TV scraping help - nitro322 - 2019-04-06

Hi.  Have two separate problems with scraping TV shows and adding them to my library that I'm hoping to get a little guidance on.

Quick background relevant to both:  I prefer to name my shows with each season in one folder and the episode names prefixed.  So:
Code:
Dark Angel/
  Season 01/
    01a-01b-Pilot.mkv
    03-Heat.mkv
    04-Flushed.mkv
    05-C.R.E.A.M..mkv
etc.

To compensate, I have the following patterns defined in my advancedsettings.xml:
Code:
   <tvshowmatching action="prepend">
        <regexp>Season[\._ ]([0-9]+)[\\/]([0-9]+([a-i]-[0-9]+[a-i]+)?)([^\\/]*)$</regexp>
        <regexp defaultseason="0">Specials[\\/]()([0-9]+)([^\\/]*)$</regexp>
        <regexp>[^\\/]* Collection[\\/]([^\\/]*)$</regexp>
        <regexp>[\\/]()([0-9]+)([^\\/]*)$</regexp>
    </tvshowmatching>

I've been using (and tweaking) these patterns for a number of years now, but I recently re-ripped and added a number of new shows and ran into some issues that should already be addressed.

Here's my full advancedsettings.xml, plus my full kodi.log showing the debug results from scanning for content on the shows listed below.

Problem 1 - That Dark Angel example shows a double-length pilot episode. While that's recognized, the remaining episodes from the season are indexed out of order. My kodi library shows me:

01. Pilot
03. Flushed
04. C.R.E.A.M.
etc.

The Pilot is correct, but 03. Flushed as shown in kodi plays 03-Heat, and on through the end of the season. Playing the season finale in kodi actually plays the second to last episode file, and it's not actually possible to play the final episode file.

I first ran into this long ago and the person at the time showed me how to use that "01a-01b-Pilot" naming to indicate that it's two parts. Worked fine back then, but failing now. Simply naming it "01-Pilot" fails the same way.

This appear to be happening to all of my shows with multi-part episodes now. Any suggestions on how to fix that now?

Problem 2 - This is specific to Game of Thrones. I previously ripped and added all seven seasons from blu-ray in 720p, but I re-ripped and have been replacing them with 1080p copies. However, Kodi only picks up seasons 6 and 7 - it ignores the first 5 seasons, despite all of them being named according to the same convention. Eg.:
Code:
Game of Thrones/
  Season 01/
    01-Winter Is Coming.mkv
    02-The Kingsroad.mkv
  Season 02/
    01-The North Remembers.mkv
  Season 06/
    01-The Red Woman.mkv
  Season 07/
    01-Dragonstone.mkv

Again, all episodes from 6 and 7 show up perfectly in my library, but I see nothing from seasons 1-5. Weirdest damn thing.

Any suggestions?

Thanks, all. Sorry for the longish post, just wanted to make sure I provided all the details. Been banging my head against these for a few days now; any help would be appreciated.


RE: TV scraping help - Karellen - 2019-04-06

Problem 1
I do not see how you are telling Kodi that 01a-01b-Pilot.mkv is a double episode, and should be episode 1 and 2? But following the MySQL transactions, episode 3 in the library seems to be mapped to the correct file.

Problem 2
xml:
VideoInfoScanner: Skipping dir '/home/media/data/videos/Television/Game of Thrones/Season 01/' due to no change
VideoInfoScanner: Skipping dir '/home/media/data/videos/Television/Game of Thrones/Season 02/' due to no change
VideoInfoScanner: Skipping dir '/home/media/data/videos/Television/Game of Thrones/Season 03/' due to no change
Looks like they have been previously scanned. You will need to remove them from Kodi, and from the Source, Clean Library, Update Library then put them back and Update Library again. Don't know why, probably a MySQL issue.

Don't expect too much help here. Your setup and naming is a fringe case and members (including me) won't spend hours figuring out your setup Smile


RE: TV scraping help - nitro322 - 2019-04-06

(2019-04-06, 04:05)Karellen Wrote: Problem 1
I do not see how you are telling Kodi that 01a-01b-Pilot.mkv is a double episode, and should be episode 1 and 2? But following the MySQL transactions, episode 3 in the library seems to be mapped to the correct file.

Problem 2
xml:
VideoInfoScanner: Skipping dir '/home/media/data/videos/Television/Game of Thrones/Season 01/' due to no change
VideoInfoScanner: Skipping dir '/home/media/data/videos/Television/Game of Thrones/Season 02/' due to no change
VideoInfoScanner: Skipping dir '/home/media/data/videos/Television/Game of Thrones/Season 03/' due to no change
Looks like they have been previously scanned. You will need to remove them from Kodi, and from the Source, Clean Library, Update Library then put them back and Update Library again. Don't know why, probably a MySQL issue.

Don't expect too much help here. Your setup and naming is a fringe case and members (including me) won't spend hours figuring out your setup Smile

Thank you for the honest feedback, and noted.  Just trying to get a little direction right now.

For Problem 1, should I use the tvmultipartmatching tag for that?

For Problem 2, I've tried that.  Multiple times.  Except maybe for the "from the Source" part.  Do you mean removing the files themselves from the filesystem and then putting them back?  I haven't tried that.  Will give it a shot and report back.


RE: TV scraping help - nitro322 - 2019-04-07

I got problem 2 resolved by additional moving the files to another location on the filesystem after the cleanup stage, outside of kodi's visibility.  Even after doing that and then moving it back and re-scanning, it still only picked up seasons 1 and 2.  I had to repeat the process again for the directories containing seasons 3-5, at which point it seems to finally have picked them all up.  Odd.

I'm still having trouble problem 1, though.  I found an example similar to what I'm trying to do on the wiki:
https://kodi.wiki/view/Naming_video_files/TV_shows#Examples

Specifically, this:

Code:
\Season #\##
    Season [season#] at the end of the directory name, file name starts with [episode#]

     <tvshowmatching action="prepend">
         <regexp>Season[\._ ]([0-9]+)[\\/]([0-9]+)([^\\/]*)$</regexp>
     </tvshowmatching>

    Example : \Battlestar Galactica (2003)\Season 3\01 - Occupation.avi (Season 3, Episode 1)
    Again we use three groups here to allow for multi-episode, but in this case (obviously) only the shorter multi-episode pattern can occur, e.g. Season 1\01x02 - Episode title.ext.

I set that regexp, renamed the first episode to "01x02-Pilot.mkv", and scanning now pulls in all episodes. Unfortunately, I'm still not getting correct behavior. I get this in kodi:

01. Pilot
02. Heat
03. Flushed
etc.

So, looks right, but playing both "01. Pilot" and "02. Heat" both play the first episode. Playing "03. Flushed" actually plays the second episode, and as before all other episodes play the one before it.

If anyone has any additional suggestions about what I may be missing here, that'd be appreciated.


RE: TV scraping help - Karellen - 2019-04-07

(2019-04-07, 01:36)nitro322 Wrote: So, looks right, but playing both "01. Pilot" and "02. Heat" both play the first episode.
Yes, that is normal. You need to set episode bookmarks. See wiki.

(2019-04-07, 01:36)nitro322 Wrote: Playing "03. Flushed" actually plays the second episode
What do you mean the second episode? The second episode is 02 Heat which is combined with episode 01.

Go to your episode 3 and see where Kodi is pointing to...
Image


RE: TV scraping help - Karellen - 2019-04-07

Oh, I just noticed the problem. You have named the episodes wrong...
xml:
VideoInfoScanner: Found episode match /home/media/data/videos/Television/Dark Angel/Season 01/01a-01b-Pilot.mkv (s1e1) [Season[\._ ]([0-9]+)[\\/]([0-9]+([a-i]-[0-9]+[a-i]+)?)([^\\/]*)$]
VideoInfoScanner: Found episode match /home/media/data/videos/Television/Dark Angel/Season 01/03-Heat.mkv (s1e3) [Season[\._ ]([0-9]+)[\\/]([0-9]+([a-i]-[0-9]+[a-i]+)?)([^\\/]*)$]
VideoInfoScanner: Found episode match /home/media/data/videos/Television/Dark Angel/Season 01/04-Flushed.mkv (s1e4) [Season[\._ ]([0-9]+)[\\/]([0-9]+([a-i]-[0-9]+[a-i]+)?)([^\\/]*)$]
VideoInfoScanner: Found episode match /home/media/data/videos/Television/Dark Angel/Season 01/05-C.R.E.A.M..mkv (s1e5) [Season[\._ ]([0-9]+)[\\/]([0-9]+([a-i]-[0-9]+[a-i]+)?)([^\\/]*)$]
VideoInfoScanner: Found episode match /home/media/data/videos/Television/Dark Angel/Season 01/06-411 on the DL.mkv (s1e6) [Season[\._ ]([0-9]+)[\\/]([0-9]+([a-i]-[0-9]+[a-i]+)?)([^\\/]*)$]
VideoInfoScanner: Found episode match /home/media/data/videos/Television/Dark Angel/Season 01/07-Prodigy.mkv (s1e7) [Season[\._ ]([0-9]+)[\\/]([0-9]+([a-i]-[0-9]+[a-i]+)?)([^\\/]*)$]

You have 03-Heat.mkv (s1e3) as episode 3, but that is episode 2. And so on for each episode. You are out by one.


RE: TV scraping help - nitro322 - 2019-04-08

Ugh, yeah, that was it.  That one's totally on me.  I was using Wikipedia's episode numbering, which lists the Pilot as a two-part episode.  I didn't realize that thetvdb treats the Pilot as a single episode, with the Heat being the second numbered episode.  Re-ordering as you suggested fixed the problem.

Thanks for the assistance.  All good now.  :-)


TV scraping help - Karellen - 2019-04-08

Thread marked solved.