TheTVDB.com Scraper absolute_number for Anime?

  Thread Rating:
  • 2 Votes - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Post Reply
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
Retired Developer
Posts: 12,386
Joined: Nov 2003
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.
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
spiff Offline
Retired Developer
Posts: 12,386
Joined: Nov 2003
Post: #51
thats only due to you sitting on your ass doing nothing. this has been supported for uhm 8 months maybe? add expressions matching only episode numbers.
find quote
Lithochasm Offline
Junior Member
Posts: 5
Joined: Jun 2009
Reputation: 0
Post: #52
Iv been running the dev builds and I have this:

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

in my advanced settings and it is not working, I was just asking for clarification. I also tried wiping my existing dev build and going back to just 9.04 and it still doesn't work.
find quote
spiff Offline
Retired Developer
Posts: 12,386
Joined: Nov 2003
Post: #53
because that expression matches season and episode number. exactly NOT what i said Wink

also i assume you have stripped the <advancedsettings> tag there
find quote
Lithochasm Offline
Junior Member
Posts: 5
Joined: Jun 2009
Reputation: 0
Post: #54
Ahh thats the expression listed in the main body of the trac ticket, I thought that was updated, oops.

Also I did have the advanced settings tag. What is the correct regex, just match on an episode number ala:

<regexp>Ep([0-9]+)</regexp> ?
find quote
spiff Offline
Retired Developer
Posts: 12,386
Joined: Nov 2003
Post: #55
yeah
find quote
Lithochasm Offline
Junior Member
Posts: 5
Joined: Jun 2009
Reputation: 0
Post: #56
Awesome thanks!
find quote
tbob19 Offline
Junior Member
Posts: 16
Joined: May 2009
Reputation: 0
Post: #57
So, do I have to build it myself (and edit the VideoInfoScanner.cpp) to get this to work properly?

With Absolute Ordering on, newer shows that have no Absolute Number do not find any episodes but without Absolute Ordering on then other longer shows with the Absolute Number (no season or just 1x(episode) in the filename) find no episodes. I'm not sure if there was a way to have it look for both at the same time, I may have missed something.

This is what I added to my Advanced settings:

<advancedsettings>
<tvshowmatching action="append">
<regexp>Ep([0-9]+)</regexp>
</tvshowmatching>
</advancedsettings>

And I downloaded the #5860 tvdb.xml..

Another option would be to just add the absolute number to the newer shows.

Thanks Big Grin
find quote
tbob19 Offline
Junior Member
Posts: 16
Joined: May 2009
Reputation: 0
Post: #58
I found out it is possible to change the source of a individual folder, so for now I set the folders for the longer shows to Absolute Order and the left the rest to the default settings.

Seems to work just fine for now. Nod
find quote
TullariS Offline
Junior Member
Posts: 7
Joined: Jan 2010
Reputation: 0
Lightbulb   
Post: #59
psorcerer Wrote: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;

Hi

I've been following the absolute numbering issue for a while now, and i have been trying some of the solutions on this forum, and at the same time learning a bit of how it all works.

The closest i got was by prepending the regexp [\._\ \-]()([0-9]{2,3})([\._\ \-][^\\/]*) - making the season blank. Also i had to change the tvdb scraper to default to season 0 with absolute numbering because the enumerator defaults to season 0 when the season is blank.

A workaround could be done for the specials (put them on a separate folder and disable absolute numbering) but that just mixes them up with all the other episodes.

With psorcerer's patch (blank seasons defaulting to season 1) things get quite good but i was thinking of an alternative.

My idea was that if the enumerator reads the scraper settings and finds that absolute numbering is enabled, it could not only set the season to 1, but also concatenate the season and episode number. The default regexp [\._ \-]([0-9]+)([0-9][0-9])([\._ \-][^\\/]*) splits the episode number into season and episode number and then the enumerator joins them back again.

As an example, the regexp above marks the file Bleach_164.avi as S1E64 and the enumerator would change it to S1E164 if absolute numbering was on.

My problem is that i don't exactly know how to read the scraper settings within the enumerator to make the changes. I have knowlege of some programing languages but not C++, not counting the size of the XBMC code.

Suggestions anyone?
find quote
chaoticmaster Offline
Junior Member
Posts: 33
Joined: Jul 2009
Reputation: 0
Post: #60
I am trying to get a multi episode Samurai jack episode scanned correctly.

The episode name is Samurai Jack - 01-02-03.avi

XBMC scans the first episode correct and then scan 02 and 03 as the specials.

Is there another naming convention i should be using?
find quote
Post Reply