TheTVDB.com Scraper absolute_number for Anime?
#61
chaoticmaster Wrote: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?

Found the same problem while updating my Naruto episode list. Looks like XBMC now scans episodes with forced season 1 correctly, but when doing the recursive scan for multipart episodes, it completely ignores the forced season.

Looks like this has to be fixed manually on the souce, at least until someone tracs this.

I'll stick the change here, just in case someone wants to have a go at recompiling.
Reply
#62
Also, found a bug on the TVDB scaper, when fetching specials in absolute numbering mode.

Quote:<!-- If Using "absolute ordering" then scrape episodes without absolute_number with normal season/episode numbers to match Specials and other cases
-->
- <RegExp conditional="absolutenumber" input="$$1" output="<episode><title>\2</title><url cache="$$10.xml">$$2</url><epnum>\3</epnum><season>\5</season><id>\1</id><aired>\4</aired></episode>" dest="4+">
<expression repeat="yes"><Episode>.*?<id>([0-9]+).*?<EpisodeName>([^<]*).*?<EpisodeNumber>([0-9]+)[^<]*.*?<FirstAired<([^<]*)</FirstAired>.*?<SeasonNumber>(0)</SeasonNumber>.*?<absolute_number></absolute_number>.*?</Episode></expression>
</RegExp>

the bit in red is wrong, it should be:

Quote:<!-- If Using "absolute ordering" then scrape episodes without absolute_number with normal season/episode numbers to match Specials and other cases
-->
- <RegExp conditional="absolutenumber" input="$$1" output="<episode><title>\2</title><url cache="$$10.xml">$$2</url><epnum>\3</epnum><season>\5</season><id>\1</id><aired>\4</aired></episode>" dest="4+">
<expression repeat="yes"><Episode>.*?<id>([0-9]+).*?<EpisodeName>([^<]*).*?<EpisodeNumber>([0-9]+)[^<]*.*?<FirstAired>([^<]*)</FirstAired>.*?<SeasonNumber>(0)</SeasonNumber>.*?<absolute_number></absolute_number>.*?</Episode></expression>
</RegExp>

This makes this match fail completely.
Reply
#63
TullariS Wrote:Found the same problem while updating my Naruto episode list. Looks like XBMC now scans episodes with forced season 1 correctly, but when doing the recursive scan for multipart episodes, it completely ignores the forced season.

Looks like this has to be fixed manually on the souce, at least until someone tracs this.

I'll stick the change here, just in case someone wants to have a go at recompiling.

Here is my DIFF:

Quote:Index: VideoInfoScanner.cpp
===================================================================
--- VideoInfoScanner.cpp (revision 29374)
+++ VideoInfoScanner.cpp (working copy)
@@ -885,12 +885,22 @@
{
season = reg.GetReplaceString("\\1");
episode = reg.GetReplaceString("\\2");
- myEpisode.iSeason = atoi(season);
- myEpisode.iEpisode = atoi(episode);
- myEpisode.cDate.SetValid(FALSE);
+ if (strlen(season) > 0 && strlen(episode) == 0)
+ { // no episode specification -> assume season 1
+ myEpisode.iSeason = 1;
+ if ((myEpisode.iEpisode = CUtil::TranslateRomanNumeral(season)) == -1)
+ myEpisode.iEpisode = atoi(season);
+ CLog::Log(LOGDEBUG, "adding new forced season 1, multipart episode %u", myEpisode.iEpisode);
+ }
+ else
+ { // season and episode specified
+ myEpisode.iSeason = atoi(season);
+ myEpisode.iEpisode = atoi(episode);
+ CLog::Log(LOGDEBUG, "adding new season %u, multipart episode %u", myEpisode.iSeason, myEpisode.iEpisode);
+ }
+ myEpisode.cDate.SetValid(FALSE);
free(season);
free(episode);
- CLog::Log(LOGDEBUG, "adding new season %u, multipart episode %u", myEpisode.iSeason, myEpisode.iEpisode);
episodeList.push_back(myEpisode);
free(remainder);
remainder = reg.GetReplaceString("\\3");
Reply
#64
I suggest factoring that out to a separate function rather than duplicating the code. Then post it on trac and cc spiff, AlTheKiller and myself.

Thanks!
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.


Image
Reply
#65
Where you able to scan episode 100 and above for Naruto? For me they get scanned as

#101 - Episode 1
#102 - Episode 2
Reply
#66
chaoticmaster Wrote:Where you able to scan episode 100 and above for Naruto? For me they get scanned as

#101 - Episode 1
#102 - Episode 2

Hi

I used to get similar problems (#117 scanned as #17, etc). I made my own regexp for anime:

[\._ \-]([0-9]{2,3})()([\._\ \-][^\\/]*)

Or slightly simpler:

[\._ \-]([0-9]+)()([\._\ \-][^\\/]*)

The default regexp will not work for absolute numbering so you really need to use this one, or something along these lines.
Reply
#67
jmarshall Wrote:I suggest factoring that out to a separate function rather than duplicating the code. Then post it on trac and cc spiff, AlTheKiller and myself.

Thanks!

Yes sounds good. Any suggestions on where should i place this function within VideoInfoScanner.cpp or any place will do?
Reply
#68
Anywhere in the file will do just fine.
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.


Image
Reply
#69
r30357 has a cleaned up version of your patch. Thanks.

Cheers,
Jonathan
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.


Image
Reply
#70
How do I implement this with my current SVN release? Do I have to stick all of my absolute numbered episodes into a "season 1" folder? Or do I rename all the files to season 1? or is there in option in "Set content" to enable absolute ordering?

Sorry for being such a dummy; I will pay it forward Rolleyes
Reply
#71
Nevermind; figured it out.

1. Set content>TVDB Settings>Absolute
2. Create Advancedsettings.xml
3. pull tv info again and boom. There it is.


Awesome!
Reply
#72
It worked. Thanks.
Reply
#73
TullariS Wrote:Hi

I used to get similar problems (#117 scanned as #17, etc). I made my own regexp for anime:

[\._ \-]([0-9]{2,3})()([\._\ \-][^\\/]*)

Or slightly simpler:

[\._ \-]([0-9]+)()([\._\ \-][^\\/]*)

The default regexp will not work for absolute numbering so you really need to use this one, or something along these lines.

It worked. Thanks.
Reply
#74
I started a bit of editing for the scrapers themselves to allow for querying the absolute number, however it's going to require a bit of work and fixes.... Look at bug #9723 on the xbmc trac website. However, this is work is not complete in any fashion.
Reply
#75
This is great!

..Sort of.


I'm not sure what I did, but following the suggestions in this thread to allow certain animes over 100 episodes to show up properly, I implemented:

<advancedsettings>

<tvshowmatching>
<regexp>[\._ \-]([0-9]{2,3})()([\._\ \-][^\\/]*)</regexp>
</tvshowmatching>

</advancedsettings>


Only now *every* show with more than 1 season will not show the subsequent seasons.

Is there any way for me to have my cake and eat it too?
Reply

Logout Mark Read Team Forum Stats Members Help
TheTVDB.com Scraper absolute_number for Anime?2