Release [MOD] AniDB.net scrapers for TV shows and Movies
(2015-10-17, 23:20)Sp4rh4wk Wrote: it works great for almost all formats.. but then tv series (not anime) scraper is fucked up..
I tried this one for tv series http://pastebin.com/UPPrk7VU but I wasnt able to implement anime one to it..
Is there a way to lock that regexp thing only for anime scraper?

if I dont have advancedsettings.xml at all, tv series are recognized fine..
but if I create advancedsettings.xml and add that regexp there, tv series arent recognized right Sad
I think thats cause that regexp is used by all scrapers and not only animdb one Sad
any way to fix this? thanks

Had a similar issue some time ago when I first started using this scraper so I figured I should just post what I did to fix it since it might help you:

Kodi has a built-in set of RegEx. You can also specify a different set of RegEx for <tvshowmatching> in your advancedsettings.xml file, and whether those are to be run before (if you add action="prepend") or after (if you add action="append") Kodi's built-in RegEx. From what I can tell, Kodi will run file names through every RegEx it has available until it finds a match. This happens with every scraper. The problem is, the RegEx you're using to handle anime episode file names is also being used when searching for TV Shows, and it's fetching information incorrectly from your TV Shows file names. This happens because you specified action="prepend" in your advancedsettings.xml file, and the TV Shows scraper finds an (incorrect) match by using your custom RegEx.
There is no way to tell Kodi or a specific scraper not to use your custom <tvshowmatching> RegEx, at least from a user perspective. However, since there's an order that Kodi obeys to when running RegEx, you can add whichever RegEx you need from the built-in RegEx set to your advancedsettings.xml file so that those are used before your custom RegEx. This obviously depends on the naming scheme you're using for your files.

For example: I don't like renaming files. I like the fact that I can simply have an organized folder structure and throw whatever files I download into their corresponding folder without having to bother with renaming. AniDB's renaming client doesn't really work as is on Chrome anymore (Google discontinued NPAPI support last month), and I like re-downloading shows if there's a better release around, so having everything with its original file name is useful in many ways. This also applies to TV Shows.
Considering this, to scrape anime, I'm using a personal version of scudlee's RegEx:

Code:
<regexp defaultseason="0">(?:[\.\] _-])()s(\d+)((?:-\d+)*)(?:v\d+)?(?:[\.\[\( _-])[^\\/]*$</regexp>
<regexp>(?:[\.\] _-])(()\d+)((?:-\d+)*)(?:v\d+)?(?:[\.\[\( _-])[^\\/]*$</regexp>

This works for pretty much every file name on my anime library, barring some specials that do not contain Sn on their file name. I deal with that by simply prepending Special S1 (for example) to their file name.
This is great and all but it obviously messes with my TV Shows scraper. The reason scudlee's original RegEx doesn't mess with TV Shows is because it searches for a specific match, which is ensured to exist if you rename your files using AniDB's client.
So to solve this, I looked at my TV Shows file names and added the following built-in RegEx, before the two RegEx I use for anime:

Code:
<regexp>[Ss]([0-9]+)[][ ._-]*[Ee]([0-9]+)([^\\/]*)$</regexp>

This works because most TV Shows files contain SnEn (for example S01E04) in their name, and the RegEx above matches that before the scraper attempts to use the two RegEx I use for anime file names. So the whole <tvshowmatching> section on my advancedsettings.xml file looks like this:

Code:
<tvshowmatching action="prepend">
  <regexp>[Ss]([0-9]+)[][ ._-]*[Ee]([0-9]+)([^\\/]*)$</regexp>
  <regexp defaultseason="0">(?:[\.\] _-])()s(\d+)((?:-\d+)*)(?:v\d+)?(?:[\.\[\( _-])[^\\/]*$</regexp>
  <regexp>(?:[\.\] _-])(()\d+)((?:-\d+)*)(?:v\d+)?(?:[\.\[\( _-])[^\\/]*$</regexp>
</tvshowmatching>

Hope this helps.
Reply


Messages In This Thread
RE: - by scudlee - 2013-10-12, 17:42
RE: [RELEASE] [MOD] AniDB.net scrapers for TV shows and Movies - by Loopeon - 2015-10-21, 05:07
Logout Mark Read Team Forum Stats Members Help
[MOD] AniDB.net scrapers for TV shows and Movies8