Kodi Community Forum

Full Version: TV Show REGEX for anime?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
I have loads of anime that I'd like to watch in XBMC, but I find that the built-in regex checks for adding tv shows to the library don't work at all. I tried to figure out how to make a regex for it myself, but I've had no luck at all--if someone wouldn't mind helping me out I'd be super appreciative. The structure could look like any of these;

Series Name/[release group] series name - 01 [some hash thing].mkv
Series Name/[release group]_series_name_-_01_[some hash thing].mkv
Series Name/[release group] series name - 01 (encoding details)[some hash thing].mkv
Series Name/[release group]_series_name_-_01_(encoding details)[some hash thing].mkv

I assume what I need to do is grab the folder name for the series and then check for any numbers followed by; " [", "_[", " (" or "_("...but I'm not sure how to do that. Sad

Also; I'm not sure if it's possible, but can OVA/OADs be scanned in too, or should I just put those in with my movies? They don't really have a specific episode number, as they exist as an aside to the actual show...
you have a number of hurdles to get over.

1. Most anime doesn't have a season but some sites say they do by artificially creating them
2. the hash in the filename often trigger false positives
3. you cant use the hash in the filename as intended as a lookup
4. sites like thetvdb have poor anime coverage


If you want help do a debug log of XBMC trying to identify them and post it complete to pastebin and I will attempt to help you.
Try Series Name\Season 01\01 - Episode name.mkv

I believe you need a season folder to scrape it right.
xexe Wrote:1. Most anime doesn't have a season but some sites say they do by artificially creating them
That kind of throws a wrench in things. >.>
xexe Wrote:2. the hash in the filename often trigger false positives
Can't regex check for numbers and require that they are followed by an opening brace, rather than a closing brace? Since the hash is pretty much always inside square braces I'd think that should be doable.
xexe Wrote:3. you cant use the hash in the filename as intended as a lookup
I was talking about grabbing the episode number before the hash. It would be pretty nice though if there was a hash-based database like what freedb is for CDs...
xexe Wrote:4. sites like thetvdb have poor anime coverage
I've actually found it's coverage to be pretty decent so far--it identified all my shows correctly and loaded thumbnails and fan art for almost all of it...it just ends up finding zero episodes, since the files themselves aren't recognized in the regex search. >.>
legendman Wrote:Try Series Name\Season 01\01 - Episode name.mkv

I believe you need a season folder to scrape it right.
I'd really rather not have to rename the files. That'd be very time consuming, considering I have 1.6TB of anime. :O
tvdb forums are discussing how "seasons" are explained in Anime. Right now, its between 1 huge season or using the DVDs as breaks. The example would be Bleach having a subtitle for each "arc" of the series and each of those being a season.
Well, currently most anime is just numbered in a one-season style, so it'd make sense to go with that.
actually, we support episode-only matching expressions these days. we automagically stuff things in season 1.

but you have to follow what tvdb uses in any case.
No one has any suggestions on how to do this? I would've thought there'd be more anime fans that'd want something like this. :S
xexe Wrote:...


If you want help do a debug log of XBMC trying to identify them and post it complete to pastebin and I will attempt to help you.

You just ignored the offer for help that all Smile
I've found thetvdb.com's anime coverage to be very good. But what I've done is gone to teh db website first, and checked for my tv shows there. Then, once I know what I've got name my files, I rename them as I get them from torrents. Its kind of a roundabout process but it works great, and I'd say 90% of the 60 odd shows I have, have db entries now.
Hi Guys. Learning a lot from this thread and the other regex threads. Just sitting at work here and whipped up something i THINK will work with my anime collection.

Quote:(?<=[\._\s\-])\d{1,3}(?=[\._\s\-])(?![\._\s\-]?\d{1,3})

I pulled it into http://www.gskinner.com/RegExr/ and it seemed to work with the following - pulling JUST the valid season name. (It seems to even ignore the 31 in Ulysses.31):

Quote:[moo-shi]_Basilisk__Kouga_Ninpou_Chou_-_09_[10BDEA90]
[LIME]_Grenadier_01
[ACX]Gun_X_Sword_01_Tuxedo_Blowing_In_The_Wind_[SS_Alternative]_[D9B9DA4E]
[AonE]_Gungrave_-_05
[Shinsen-subs]_Noein_01_[0BA3BF66]
Texhnolyze_01.DVD(H264.VORBIS)[KAA][BED9F4EE]
ulysses.31.01.vengeance.of.the.gods-dvdrip.xvid.[merchant]
[ILA] Astro Boy 2003 - 01
[V-A]_Kenran_Butou_Sai_-_The_Mars_Daybreak_-_01_[CC383E33]
PSNR.Planetes.01
[ANBU]_Mushi-shi_02_[E1CB9B66]

I haven't had a chance to test it out on my xbmc machine yet but i had a few questions anyway, so here goes:

1. I know we don't need the season number anymore, but when XBMC scrapes based on these regex statements, do they just need the ep number? so all that is being fed to the tvdb scraper is (01,12,34... etc.)?
2. Does xbmc apply advancedsettings.xml changes on reboot? or everytime the information refresh is pressed? If it's on reboot, is there a way to refresh it in a terminal?

Thanks in advanced for your insight.

p.s.

I've tried the expression in xbmc. It doesn't seem to accept it. Could it be the lookarounds? the '<' ?
Okay so i corrected my regexp to scrape correctly.

Quote:[\._\s\-](\d{1,3})[\._\s\-](?!\d{1,3})(?!.*[/\\])

now i get this though... still working on it.

Quote:18:12:30 T:3077519248 M:1436921856 DEBUG: scraper: GetEpisodeList returned <episodeguide></episodeguide>
18:12:30 T:3077519248 M:1436921856 DEBUG: No NFO file found. Using title search for 'smb://VADER/VIDEO/tv/[AHQ] Gasaraki 01-25 [Dual Audio]/[AHQ] Gasaraki - 01 - On the Age of Stone.ogm'
Chasing my own tail on this. Seems like the issue was a few bad episode guides from TVDB. other anime with similar naming schemes work. I just have to report this to TVDB and hope they fix it somehow.
CyruzDraxs Wrote:I'd really rather not have to rename the files. That'd be very time consuming, considering I have 1.6TB of anime. :O

If your only issue with renaming the episodes is having to do it yourself you can use filebot. There's also a tool on anidb.net but I think it only renames to the format that you already have yours in.
I have a grip of anime that I'd like to add to my library, but I'd like it to be kept separate from my current TV and Movies libraries. Is there any way to have TV, Movies, Anime? It would basically be a 2nd TV library.

If not, is there any workarounds such as using a 2nd profile or something like that and keeping it all under TV shows? I'd test it out but I spent so much time manicuring my library the last thing I want it to do is blow itself up.

Thanks!
Pages: 1 2