TheTVDB.com Scraper absolute_number for Anime?

  Thread Rating:
  • 2 Votes - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Post Reply
WorldWide01 Offline
Junior Member
Posts: 5
Joined: Mar 2009
Reputation: 0
Post: #41
LOL! Okay. It's obvious I'm not making any sense, so scrap what I've said and let me know how you'd solve the following:

Without altering the filenames or separating them out into different folders, I'd like to have the anime series split into seasons as according to theTVDB.com.

The query to theTVDB would be by absolute episode number (177, for example). Once it finds the episode, it also now has the Season and corresponding episode number as well. I'd then like to use the season and episode number returned from the scrape to sort the series into my library.

Does that make any more sense? If so, would you mind giving me the junior dev treatment and laying out the process for me?


Thanks for your continued responsiveness.
find quote
spiff Offline
Grumpy Bastard Developer
Posts: 12,187
Joined: Nov 2003
Reputation: 82
Post: #42
hi,

what is needed is a change in the enumeration code itself. currently, as i said, it uses a map with a pair of season,episodenr as key. what would be needed is

1) a set of regexp'es to enumerate episode-only filenames
2) code in the enumerator to use these regexp's and which puts the season number at some random number (1 being the logical)
3) code in the scraper to return the episode guide using absolute numberings and with the season set to the one chosen over
4) backend support for translation - currently there is none. if you request absolute numbering you only get those returned iirc.

Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.
find quote
edward.81 Offline
Junior Member
Posts: 2
Joined: May 2009
Reputation: 0
Post: #43
I cant get absolute numbering to work.
I try to scrape bleach.
From the log the episode number is detected correctly [serie 01 episode 001] from log (s01e001)

but the xbmc detect it as special episode 01
I have make some try by putting 2 file in the folder with following names:
xxx_s01e001.avi
xxx_s00e001.avi
When i scan i see in top right corner the msg telling me that are searching the episodes number 0x01 and 1x01 but both in library have the tittle of special 01.
find quote
edward.81 Offline
Junior Member
Posts: 2
Joined: May 2009
Reputation: 0
Post: #44
Ok i found why appen this.
The problem is the regexp in tvdb.xmb (line 189)
<Episode>.*?<id>([0-9]*)</id>.*?<EpisodeName>([^<]*)</EpisodeName>.*?<absolute_number>([0-9]+)</absolute_number>.*?</Episode>

If the special episodes are on top of the xml file downloaded from tvdb this found the absolute number of the first item that are not empty and ignore the empty <absolute_number></absolute_number>

This regExp instead work...for now..
<Episode>.*?<id>([0-9]*)</id>.*?<EpisodeName>([^<]*)</EpisodeName>.*?<absolute_number>((?:[^<]?)+)

encoded version.
PHP Code:
<Episode>.*?<id>([0-9]*)</id>.*?<EpisodeName>([^<]*)</EpisodeName>.*?<absolute_number>((?:[^<]?)+) 
(This post was last modified: 2009-05-03 19:43 by edward.81.)
find quote
spiff Offline
Grumpy Bastard Developer
Posts: 12,187
Joined: Nov 2003
Reputation: 82
Post: #45
do NOT abuse report post. this is NOT what it is for. you just spammed ALL the forum operators and all of them thought there was something wrong with a post.

if you want our attention you do things the proper way and submit a diff on trac.

Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.
find quote
psorcerer Offline
Junior Member
Posts: 7
Joined: Nov 2007
Reputation: 0
Post: #46
spiff Wrote:hi,

what is needed is a change in the enumeration code itself. currently, as i said, it uses a map with a pair of season,episodenr as key. what would be needed is

1) a set of regexp'es to enumerate episode-only filenames
2) code in the enumerator to use these regexp's and which puts the season number at some random number (1 being the logical)
3) code in the scraper to return the episode guide using absolute numberings and with the season set to the one chosen over
4) backend support for translation - currently there is none. if you request absolute numbering you only get those returned iirc.

Sounds quite complicated to me.
Meanwhile I've done a quick hack to make it work using empty regexp for the season value (e.g. something like ([0-9]*) and append="yes" in advanced settings)

Code:
@@ -830,7 +829,12 @@
           if (season && episode)
           {
             CLog::Log(LOGDEBUG,"found match %s (s%se%s) [%s]",strLabel.c_str(),season,episode,expression[j].c_str());
-            myEpisode.iSeason = atoi(season);
+            if (season[0] != '\0')
+            {
+              myEpisode.iSeason = atoi(season);
+            }
+            else
+            { myEpisode.iSeason = 1; }
             myEpisode.iEpisode = atoi(episode);
             episodeList.push_back(myEpisode);
             bMatched = true;
find quote
spiff Offline
Grumpy Bastard Developer
Posts: 12,187
Joined: Nov 2003
Reputation: 82
Post: #47
hmm, that isnt a bad idea at all Smile it solves part of the puzzle in a not too shabby way. you still only have a single season of course, but it sure scratches the anime itch.

trac it please.

Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.
find quote
psorcerer Offline
Junior Member
Posts: 7
Joined: Nov 2007
Reputation: 0
Post: #48
spiff Wrote:hmm, that isnt a bad idea at all Smile it solves part of the puzzle in a not too shabby way. you still only have a single season of course, but it sure scratches the anime itch.

trac it please.

http://trac.xbmc.org/ticket/6508

I think it's good enough if combined with absolute numbering hack for thetvdb.com You get all the episodes inside one season but with the correct info and numbering.
find quote
Lithochasm Offline
Junior Member
Posts: 5
Joined: Jun 2009
Reputation: 0
Post: #49
Hello everyone. I'm new here but i'v been using XBMC for awhile and I cant get the absolute numbering to identify any of my anime.

I enabled absolute numbering in the tvdb options, and I also tried the hack psourcer posted since none of my anime has a season number: ( it looks like Darker Than Black 01[001A3f5].mkv )

Edit:// Didn't see that i needed the <advancedsettings> tag. Now it only found one episode for three anime series out of 15. Ie, it found episode two of cowboy bebop. This sounds like a regex problem. Let me see if I can pinpoint whats going on.

Yeah it looks like its matching season 0 for all of the series and only returning the specials. I guess the only fix so far that doesn't require me to rename everything is to use an .nfo file. Any other ideas?
(This post was last modified: 2009-06-26 00:34 by Lithochasm.)
find quote
Lithochasm Offline
Junior Member
Posts: 5
Joined: Jun 2009
Reputation: 0
Post: #50
Sorry to beat a dead horse, but has there been any progress with anime scraping and the TVDB? Its been five months and I still haven't gotten my anime to be scraped correctly.
find quote
Post Reply