Kodi Community Forum

Full Version: episode incorrectly scraped as special
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I'm trying to scrape a correctly named episode but I get the associated tv special information instead of the correct episode information from thetvdb.com

I'm scraping for season 3 episode 1 and dvd ordering is turned on in thetvdb settings.

It would seem that <Combined_episodenumber> and <Combined_season> are being parsed even though <SeasonNumber> is equal to 0.

Anyone have a clue as to why this is happening?

I'm currently running Dharma 10.1 and thetvdb.com scraper v1.2.3.

Pertinent information from thetvdb.com scrape:

Code:
<Episode>
  <id>542191</id>
  <Combined_episodenumber>1</Combined_episodenumber>
  <Combined_season>3</Combined_season>
  <DVD_chapter></DVD_chapter>
  <DVD_discid></DVD_discid>
  <DVD_episodenumber></DVD_episodenumber>
  <DVD_season>3</DVD_season>
  <Director>Roy Ward Baker</Director>
  <EpImgFlag>1</EpImgFlag>
  <EpisodeName>Crypt Jam</EpisodeName>
  <EpisodeNumber>1</EpisodeNumber>
  <FirstAired></FirstAired>
  <GuestStars></GuestStars>
  <IMDB_ID></IMDB_ID>
  <Language>en</Language>
  <Overview>Music video from the season three set which features the Crypt Keeper doing a goofy rap parody over clips of the show.</Overview>
  <ProductionCode></ProductionCode>
  <Rating></Rating>
  <RatingCount>0</RatingCount>
  <SeasonNumber>0</SeasonNumber>
  <Writer></Writer>
  <absolute_number></absolute_number>
  <airsafter_season></airsafter_season>
  <airsbefore_episode>1</airsbefore_episode>
  <airsbefore_season>1</airsbefore_season>
  <filename>episodes/73029/542191.jpg</filename>
  <lastupdated>1283074392</lastupdated>
  <seasonid>20494</seasonid>
  <seriesid>73029</seriesid>
</Episode>
I actually think this is a bug with thetvdb.com as their other specials are appearing with a value of 0 for <Combined_season>. Only the first result is incorrect.
What is the the show name and what is the exact filename of the episode you are scraping? I'm wondering if it is something to do with dvd ordering being set and specials not scraping because of that.
tales.from.the.crypt/tales.from.the.crypt.s03e01.avi

the issue is that the scraper thinks that s03e01 is actually s00e01 since <Combined_episodenumber> is equal to 1 and <Combined_season> is equal to 3.

I've noticed that within tvdb.xml under the dvd order section it doesn't take the <SeasonNumber> tag into consideration so that is most likely the issue. Usually people don't fill out the dvd season field at thetvdb.com but this entry is filled.
I ended up modifying the tvdb.xml dvd order section. There needs to be some special handling in this section.

This seems to be scraping correctly now. Haven't had time to extensively test it though.

Code:
<!-- DVD order -->        
               <RegExp conditional="dvdorder" input="$$1" output="&lt;episode&gt;&lt;title&gt;\4&lt;/title&gt;&lt;url cache=&quot;$$10.xml&quot;&gt;$$2&lt;/url&gt;&lt;epnum&gt;\2&lt;/epnum&gt;&lt;season&gt;\3&lt;/season&gt;&lt;id&gt;\1&lt;/id&gt;&lt;aired&gt;\5&lt;/aired&gt;&lt;/episode&gt;" dest="4+">                  
                    <expression repeat="yes">&lt;Episode&gt;.*?&lt;id&gt;([0-9]+).*?&lt;DVD_episodenumber&gt;([^&lt;]*).*?&lt;DVD_season&gt;([^&lt;]*).*?&lt;EpisodeName&gt;([^&lt;]*).*?&lt;FirstAired&gt;([^&lt;]*)&lt;/FirstAired&gt;.*?&lt;/Episode&gt;</expression>
                    <expression repeat="yes">&lt;Episode&gt;.*?&lt;id&gt;([0-9]+).*?&lt;Combined_episodenumber&gt;([^&lt;]*).*?&lt;Combined_season&gt;([^&lt;]*).*?&lt;EpisodeName&gt;([^&lt;]*).*?&lt;FirstAired&gt;([^&lt;]*)&lt;/FirstAired&gt;.*?&lt;/Episode&gt;</expression>                                        
               </RegExp>
               <!-- Specials (DVD order) !-->
               <RegExp conditional="dvdorder" input="$$1" output="&lt;episode&gt;&lt;title&gt;\4&lt;/title&gt;&lt;url cache=&quot;$$10.xml&quot;&gt;$$2&lt;/url&gt;&lt;epnum&gt;\2&lt;/epnum&gt;&lt;season&gt;0&lt;/season&gt;&lt;id&gt;\1&lt;/id&gt;&lt;aired&gt;\5&lt;/aired&gt;&lt;/episode&gt;" dest="4+">                  
                    <expression repeat="yes">&lt;Episode&gt;.*?&lt;id&gt;([0-9]+).*?&lt;Combined_episodenumber&gt;([^&lt;]*).*?&lt;SeasonNumber&gt;([^&lt;]*).*?&lt;EpisodeName&gt;([^&lt;]*).*?&lt;FirstAired&gt;([^&lt;]*)&lt;/FirstAired&gt;.*?&lt;/Episode&gt;</expression>                                        
               </RegExp>
               <expression noclean="1"/>