XBMC Community Forum
[WIP] AniDB.net Anime Video Scraper - Printable Version

+- XBMC Community Forum (http://forum.xbmc.org)
+-- Forum: Help and Support (/forumdisplay.php?fid=33)
+--- Forum: Add-ons Help and Support (/forumdisplay.php?fid=27)
+---- Forum: Metadata scrapers (/forumdisplay.php?fid=147)
+---- Thread: [WIP] AniDB.net Anime Video Scraper (/showthread.php?tid=64587)

Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37


- snyft - 2010-08-14 18:06

So i just used your scraper and sure it finds the shows and info but when im librarymode i cant see any episodes when i enter the show? Folder setup:

\Amagami SS 01-07\[Eclipse] Amagami SS - 01 (1280x720 h264) [4876C56A]

What do i need to change to get it to work?


- salival - 2010-08-14 19:36

You need to add an episode filter to your XBMC setup, because without that it doesn't recognize the episode format.

To add a filter, create a text file in your userdata folder* and rename it to advancedsettings.xml

In that file you put the following lines:

If your episode number format is epxx:
Code:
<advancedsettings>
    <tvshowmatching action="prepend">
        <regexp>ep([0-9]+)</regexp>
    </tvshowmatching>
</advancedsettings>

Or, in your case, if your episode number format is - xx or -_xx:
Code:
<advancedsettings>
    <tvshowmatching action="prepend">
        <regexp>[-_ ]{1,2}([0-9]+)</regexp>
    </tvshowmatching>
</advancedsettings>


Since you have no real unique identifier before your episode number you might get a lot of false readings due to the numbers in the resolution info.
I would suggest to add a prefix before the episode number, e.g. e or ep, so xbmc knows what to look for more easily. For more information on this check the article on the wiki

Specials always need the following episode numbering format: S00Exx. Since the scraper assumes every episode without a specific season number are in season 1 and specials need to be in season 0 for thetvdb.org to recognize them as such and get the proper info.

(* to find out where your userdata folder is check the FAQ of your system on this page)


- Scorpius - 2010-08-14 20:00

I include my own personal advancedsettings.xml that has worked for me really well so far. Since I have both anime and series, I needed regexps that would work for both:
Code:
    <tvshowmatching>
        <!-- Match anime episodes that end with a CRC value -->
        <!-- The "v" is for episodes like 101v2             -->
        <!-- This will match most of anime episodes         -->
        <regexp>[\._ \-]([0-9]{2,3})[v\._ \-\[\(].*[\[\(][0-9A-F]{8}[\)\]][/\._ \-\[\(]</regexp>
        
        <!-- Match anime episodes that have screen resolution in the filename -->
        <!-- This is to avoid bad enumerating season x episode             -->
        <regexp>[\._ \-]([0-9]{2,3})[v/\._ \-\[\(].*[\[\(].*[0-9]{3,4}x[0-9]{3,4}.*[\)\]][/\._ \-\[]</regexp>        

        <!-- Old styles anime episodes -->
        <regexp>Episode[\._ \-]([0-9]{2,3})[v\._ \-\[\(]</regexp>
        <regexp>Ep[\._ \-]*([0-9]{2,3})[v\._ \-\[\(]</regexp>
        <regexp>[/\\]([0-9]{2,3})[v\._ \-\[\(]</regexp>

        <!-- These are the default regexp for XBMC         --->
            <regexp>\[[Ss]([0-9]+)\]_\[[Ee]([0-9]+)([^\\/]*)</regexp>  <!-- foo_[s01]_[e01] -->
            <regexp>[\._ \-]([0-9]+)x([0-9]+)([^\\/]*)</regexp>  <!-- foo.1x09 -->
            <regexp>[\._ \-][Ss]([0-9]+)[\.\-]?[Ee]([0-9]+)([^\\/]*)</regexp>  <!-- foo s01e01, foo.s01.e01, foo.s01-e01 -->
            <regexp>[\._ \-]([0-9]+)([0-9][0-9])([\._ \-][^\\/]*)</regexp>  <!-- foo.103 -->
            <regexp>[\._ \-]p(?:ar)?t[._ -]()([ivxlcdm]+)([\._ \-][^\\/]*)</regexp>  <!-- Pt.I, Part XIV -->

        <!-- If nothing else is matched, then it's a normal anime episode -->
        <regexp>[\._ \-]()([0-9]{2,3})([\&\-][0-9]{2,3})?[v\._ \-\[\(]</regexp>
    </tvshowmatching>



- snyft - 2010-08-14 21:27

Thanks alot for the help people!
Scorpius do i need to change the advanced setting when i scan regular tv or anime? Or its just save your setting file and run regular shows and anime?

I mean i dont do Seasons for my anime i just put them in a folder like:
O:\anime\tv\Code Geass\Code_Geass_Ep01_The_Day_the_Demon_was_Born_[720p,BluRay,x264]_-_gg-THORA.mkv
O:\anime\tv\Code Geass Lelouch of the Rebellion R2\Code_Geass_R2_Ep01_The_Day_a_Demon_Awakens_[720p,BluRay,x264]_-_THORA.mkv

I more or less just want the show information from library mode and then being able to view it in library.
Maybe it would be easier to just use some rename program that renames all the different episodes. Any tip on a good tool that does this for anime?


- Scorpius - 2010-08-14 21:36

It works for both. I still haven't found a show that doesn't work with my settings, but they always show up from time to time. Then I add or modify a line or two.


- salival - 2010-08-14 22:37

kraaa Wrote:I mean i dont do Seasons for my anime i just put them in a folder like:
O:\anime\tv\Code Geass\Code_Geass_Ep01_The_Day_the_Demon_was_Born_[720p,BluRay,x264]_-_gg-THORA.mkv
O:\anime\tv\Code Geass Lelouch of the Rebellion R2\Code_Geass_R2_Ep01_The_Day_a_Demon_Awakens_[720p,BluRay,x264]_-_THORA.mkv

That's about the same as I have my structure set up, be it a little different episode naming structure (seriesname ep## - episode_title[1280x720][hdtv][groupname].ext --I rename them with the Java applet on the frontpage of anidb.net. It lets you set a custom naming scheme and adds the episode to your mylist if you wish)

As long as you have the "ep" before the episode number my first snippet works flawlessly. Normal tv-series are taken care of by the xbmc default settings. Only specials need the explicit s00e## treatment, all the others are assumed to be season 1.

If you don't want to rename, you should try Scorpius' code. I assume it handles seasons the same way.

kraaa; Wrote:Maybe it would be easier to just use some rename program that renames all the different episodes. Any tip on a good tool that does this for anime?
As I mentioned I use the anidb applet for this. It does an almost perfect job.
The only downside is that occasionally some episodes are not yet added to the system. In that case you either have to wait until someone adds the file or you have to add the file yourself (which is, once you know how, only a few minutes of work)
Also, if you need help setting up a naming filter to rename your episodes with the applet feel free to ask.


- Scorpius - 2010-08-14 22:51

I'm kinda against renaming. I'm just "renaming" the specials adding a _S00E01 at the end of the filename so the scraper can recognize them too.


- salival - 2010-08-14 23:09

I was at first, but I couldn't figure out a working regexp Blush.
Then I found the applet which has now found it's place in my "anime download workflow". Now it takes only a few seconds to open the folder(s) from utorrent, open the applet (link is in a bookmark), drag the file(s) on to the applet and hit start.


- snyft - 2010-08-14 23:10

Scorpius Wrote:I'm kinda against renaming. I'm just "renaming" the specials adding a _S00E01 at the end of the filename so the scraper can recognize them too.

For some reason you regexp dont work for me (latest nightly build). http://forum.xbmc.org/showthread.php?tid=51614 worked for me but when i deleted everything in the xml and added your settings, it dident find anything. Any ideas? Tried alot of different animes as well.


- Scorpius - 2010-08-15 03:07

Post your debug log (use pastebin or something) where you scan one of the shows and we can figure it out.


- snyft - 2010-08-15 15:52

Scorpius Wrote:Post your debug log (use pastebin or something) where you scan one of the shows and we can figure it out.

http://pastebin.com/N6fiwhP8
There you go Smile


- Scorpius - 2010-08-15 18:25

Well I can't see the beginning of the log where the advancedsettings.xml is parsed. Those filenames are parsed with no problems using the settings I posted.

I don't use the "Season x" for anime folders and maybe that's a difference, and in that case http://forum.xbmc.org/showthread.php?tid=51614 would work better.


- snyft - 2010-08-15 19:17

Scorpius Wrote:Well I can't see the beginning of the log where the advancedsettings.xml is parsed. Those filenames are parsed with no problems using the settings I posted.

I don't use the "Season x" for anime folders and maybe that's a difference, and in that case http://forum.xbmc.org/showthread.php?tid=51614 would work better.

Nah it works now, i forgot to add the <advancedsettings> tags >_<.
Btw i noticied it had some difficulty picking up double episodes anyway to mark them some way?

[gg]_Aoi_Bungaku_-_07-08_[E179D65A] etc


- Scorpius - 2010-08-15 19:22

Yeah and that's a problem. That one will be recognized as episode 08 only. That happens to me too. The wiki says if you add a third pair of parenthesis at the end you can recognize multi-episodes.

http://wiki.xbmc.org/index.php?title=Advancedsettings.xml#.3Ctvshowmatching.3E
Quote:NOTE: for multi-episode matching to work, there needs to be a third set of parentheses on the end. This part is fed back into the regexp engine.

I think I have tried it with no success. For your Aoi Bungaku episode you would have to add before the first line something like:
Code:
<regexp>[\._ \-]()([0-9]{2,3})[\._ \-]([0-9]{2,3})[v\._ \-\[\(].*[\[\(][0-9A-F]{8}[\)\]][/\._ \-\[\(]</regexp>

Tell me if it works! I have some multi-episodes not recognized as such.


- snyft - 2010-08-15 20:50

Scorpius Wrote:Yeah and that's a problem. That one will be recognized as episode 08 only. That happens to me too. The wiki says if you add a third pair of parenthesis at the end you can recognize multi-episodes.

http://wiki.xbmc.org/index.php?title=Advancedsettings.xml#.3Ctvshowmatching.3E


I think I have tried it with no success. For your Aoi Bungaku episode you would have to add before the first line something like:
Code:
<regexp>[\._ \-]()([0-9]{2,3})[\._ \-]([0-9]{2,3})[v\._ \-\[\(].*[\[\(][0-9A-F]{8}[\)\]][/\._ \-\[\(]</regexp>

Tell me if it works! I have some multi-episodes not recognized as such.

I just added your regexp to the top of your other settings and it dident find the episode as a multi-episode