2014-04-20, 05:05
So after much time spent googling, I've found that the answer to the question "How do I import my 2TB anime folder into xbmc?" is "spend a week of your life renaming all your files!" Instead of doing that I spent an hour writing some regex that matches pretty much all anime naming conventions, including some pretty messy names such as: [Coldlight]_Mahou_Shoujo_Lyrical_Nanoha_StrikerS_10v2_DVD[H264][E4A98905].mkv
Caveats:
- You must use thetvdb scraper. It's actually pretty good for anime though, and other scrapers do some weird things with season naming.
- For shows with multiple seasons, you must have the files put into Season 1, Season 2, etc subfolders, instead of having K-ON! and K-ON!! in your Anime folder. If you have everything in one folder with absolute numbering, you can right click that particular show in the library > change content > tvdb scraper settings > use absolute ordering, then right click > tv show info > reload. (tvdb scraper limitation)
- Any specials must be thrown into a "Specials" subfolder, and will not be shown in the xbmc library. You can still view them in the files menu if you so desire. (another tvdb limitation)
Despite these downfalls, this is still significantly less effort than renaming everything. All you need to do is add this to your advancedsettings.xml:
If you aren't using nfs or smb, remove all instances of this from the code:
That should be it! Enjoy your plot spoilers and lewd fanart!
Caveats:
- You must use thetvdb scraper. It's actually pretty good for anime though, and other scrapers do some weird things with season naming.
- For shows with multiple seasons, you must have the files put into Season 1, Season 2, etc subfolders, instead of having K-ON! and K-ON!! in your Anime folder. If you have everything in one folder with absolute numbering, you can right click that particular show in the library > change content > tvdb scraper settings > use absolute ordering, then right click > tv show info > reload. (tvdb scraper limitation)
- Any specials must be thrown into a "Specials" subfolder, and will not be shown in the xbmc library. You can still view them in the files menu if you so desire. (another tvdb limitation)
Despite these downfalls, this is still significantly less effort than renaming everything. All you need to do is add this to your advancedsettings.xml:
Code:
<advancedsettings>
<video> <!-- Stop XBMC indexing some unwanted common items -->
<excludetvshowsfromscan action="prepend">
<regexp>(?i)sample</regexp> <!-- Greedy, whole path, case insensitive ignore -->
<regexp>(?i)uTorrentPartFile</regexp> <!-- Ignore common scrap files -->
<regexp>[\/\\][sS]pecials?[\/\\]</regexp>
<regexp>[\/\\][Ee]xtras?[\/\\]</regexp>
<regexp>(?i)[\. \-_](?:nc)?(?:op|ed|sp|pv)[\. \-_\(\[\d]</regexp>
</excludetvshowsfromscan>
</video>
<tvshowmatching action="prepend"> <!-- remove this if not using smb:// or nfs:// : [\\/][\\/].*? -->
<regexp>(?i)[\\/][\\/].*?[\/\\].*?Season (\d+).*?[\\/].*[\. \-_\[](?:ep)?(\d\d)(?:[_\-\. ]?v\d)?[\. \-_\(\[].*[\]\)].*$</regexp>
<regexp>(?i)[\\/][\\/].*?[\/\\].*?[\. \-_\[](?:ep)?(\d\d\d?)(?:[_\-\. ]?v\d)?[\. \-_\(\[].*[\]\)].*$</regexp>
<regexp>(?i)[\\/][\\/].*?[\/\\].*?[\. \-_](\d\d?)x(\d\d?)[\. \-_].*?\.(?:mkv|mp4|avi)$</regexp>
<regexp>(?i)[\\/][\\/].*?[\/\\].*?S(\d\d)E(\d\d).*</regexp>
</tvshowmatching>
<tvshowmatching action="append">
<!-- I didn't write this block, but it's useful -->
<regexp>(?i)[/\\](?:s|season)\W?(\d{1,2})\D*[/\\]\D+[\. _\-](\d{1,2})[\. _\-]\D+</regexp>
<regexp>(?i)[/\\](?:s|season)\W?(\d{1,2})\D*[/\\].*?\D\1(\d\d)(?!.*])</regexp>
<regexp>(?i)[/\\](?:s|season)\W?(\d{1,2})\D*[/\\](\d{1,2})\W([^/\\]*)</regexp>
<regexp>(?i)[/\\](?:s|season)\W?(\d{1,2})\D*[/\\].*?\Wep?\.?(\d{1,2})\W([^/\\]*)</regexp>
<regexp>(?i)[/\\](?:s|season)\W?(\d{1,2})\D*[/\\].*?\W?episode\W?(\d{1,2})\W([^/\\]*)</regexp>
<regexp>(?i)[/\\](?:s|season)\W?(\d{1,2})\D*[/\\].*?\Wpart\W?(\d{1,2})\W([^/\\]*)</regexp>
<regexp>(?i)[/\\](?:s|season)\W?(\d{1,2})\D*[/\\].*?\Wchapter\W?(\d{1,2})\W([^/\\]*)</regexp>
<regexp>(?i)[/\\](?:s|season)\W?(\d{1,2})\D*[/\\].*?\1\W?x\W?(\d{1,2})([^/\\]*)</regexp> >
<regexp>(?i)[/\\](?:s|season)\W?(\d{1,2})\D*[/\\].*?s0?\1[ex.]{0,2}(\d{1,2})([^/\\]*)</regexp>
<regexp>(?i)[\\/][\\/].*?[\\/].*?Season (\d+).*?[\\/].*?[\. \-_\[(?:ep)](\d\d?)v?\d?.*?\.(?:mkv|mp4|avi)$</regexp><!-- last resort -->
<regexp>(?i)[\\/][\\/].*?[\\/].*?[\. \-_\[(?:ep)](\d\d?)v?\d?.*?\.(?:mkv|mp4|avi)$</regexp><!-- last resort -->
</tvshowmatching>
</advancedsettings>
If you aren't using nfs or smb, remove all instances of this from the code:
Code:
[\\/][\\/].*?
That should be it! Enjoy your plot spoilers and lewd fanart!