Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!--
- V2.0
- http://forum.xbmc.org/showthread.php?t=51614
- #######################################################################################
- This REGEX is UNOFFICIAL/EXPERIMENTAL and may require a strict folder structure.
- *Use at your own risk*
- We use multiple REGEX rather than try to build one REGEX to rule them all.
- This wastes CPU cycles but allows easier bug finding, refining and end user understanding.
- The order they run is important. It will never catch all episodes.
- Since were trying to deal with bad naming it could result in false positives.
- Comments and submissions welcomed but try to keep it simple. If in doubt use two simple REGEX rather than one complex one.
- To install see: http://www.xbmc.org/wiki/?title=AdvancedSettings.xml
- Tested against Dharma onwards only but MAY be backwards compatible.
- ########################################################################################
- -->
- <advancedsettings>
- <!--
- #######################################################################################
- Customise/remove/comment this section to your personal preferences.
- #######################################################################################
- -->
- <useddsfanart>true</useddsfanart> <!-- Enable GPU accelerated fanart-->
- <navigatevirtualkeyboard>true</navigatevirtualkeyboard> <!-- Activates virtual keyboard navigation, default is false -->
- <lcd>
- <rows>2</rows>
- <columns>16</columns>
- <scrolldelay>2</scrolldelay>
- </lcd>
- <videolibrary>
- <hideallitems>true</hideallitems> <!-- Remove the "*All" items from the video library -->
- <hideemptyseries>false</hideemptyseries> <!-- Dont hide empty series in the video library -->
- <hiderecentlyaddeditems>false</hiderecentlyaddeditems> <!-- Dont remove the "Recently added ..." items from the video library. -->
- <recentlyaddeditems>250</recentlyaddeditems> <!-- Increase number of recently added items from default 25 -->
- <backgroundupdate>false</backgroundupdate> <!-- set to hide the video scanner dialog from the gui -->
- <flattentvshows>0</flattentvshows> <!-- Flatten TV show seasons, 0=never 1=if one season (default) 2=all -->
- </videolibrary>
- <musiclibrary>
- <backgroundupdate>false</backgroundupdate> <!-- set to hide the music scanner dialog from the gui -->
- </musiclibrary>
- <myvideos>
- <extractthumb>false</extractthumb> <!-- Dont create random thumbnails. Either scrape them from the internet or dont have them -->
- </myvideos>
- <sorttokens>
- <token separators="">"</token> <!-- Ignore " when sorting. Senisble due to IMDB naming policy -->
- </sorttokens>
- <!--
- #######################################################################################
- Stop XBMC indexing some unwanted common items
- #######################################################################################
- -->
- <video>
- <excludefromscan action="prepend">
- <regexp>(?i)extras/regexp> <!-- Anything with extras in the path (recursive and case insensitive) will be ignored.This is VERY greedy but works for me. Post in forum if you need refinements-->
- <regexp>(?i)sample</regexp> <<!-- Anything with sample in the path (recursive and case insensitive) will be ignored.This is VERY greedy but works for me. Post in forum if you need refinements-->
- <regexp>(?i)uTorrentPartFile</regexp> <!-- For people silly enough to use this client :) -->
- </excludefromscan>
- <excludetvshowsfromscan action="prepend">
- <regexp>(?i)extras</regexp> <!-- Anything with extras in the path (recursive and case insensitive) will be ignored.This is VERY greedy but works for me. Post in forum if you need refinements-->
- <regexp>(?i)sample</regexp> <!-- Anything with sample in the path (recursive and case insensitive) will be ignored.This is VERY greedy but works for me. Post in forum if you need refinements-->
- <regexp>(?i)uTorrentPartFile</regexp> <!-- For people silly enough to use this client :) -->
- </excludetvshowsfromscan>
- </video>
- <!--
- #######################################################################################
- XBMC catches a few files incorrectly so we will catch them befroe XBMC trys.
- #######################################################################################
- -->
- <tvshowmatching action="prepend">
- <regexp>(?i)[/\\]tpz-(?:24|30rock|4400)(\d)(\d{2})(\d{2})?(?:r|fix|dc|-repack|int|d)?\.</regexp> <!-- tzp-SPECIFICSHOW12324.avi Caters for some show specific odditys -->
- <regexp>(?i)[/\\]tpz-[^\d]*(\d)(\d{2})(\d{2})?(?:r|fix|dc|-repack|int|d)?\.</regexp> <!-- tzp-show12324.avi -->
- <regexp>(?i)[\. _-]s(\d{1,2})[\. _-]?e(\d{1,2})[\. _-](?=.*dirfix)</regexp> <!-- First try at handling NON RAR dirfix naming show.name.S01E10.ep.name.here.DiRFiX.PROPER.HDTV.XviD-XEE-->
- <regexp>(?i)[\. _-]s(\d{1,2})[\. _-]?e(\d{1,2})(.*)dirfix</regexp> <!-- First try at handling NON RAR dirfix naming show.name.S01E10E11.ep.name.here.DiRFiX.PROPER.HDTV.XviD-XEE-->
- <!--
- #######################################################################################
- File only REGEX matching in an attempt to cater for ultra lame TPZ Topaz naming scheme.
- 99%+ accuracy. The remaining are TPZ releases that dont follow their own naming scheme.
- The order they run in is VITAL. To be safe run them all or none.
- #######################################################################################
- -->
- <regexp>(?i)[/\\]tpz-(?:24|30rock|4400)(\d)(\d{2})(\d{2})?(?:r|fix|dc|-repack|int|d)?\.</regexp> <!-- tzp-SPECIFICSHOW12324.avi This attempts to cater for some odditys -->
- <regexp>(?i)[/\\]tpz-johnadams(\d).avi</regexp> <!-- tpz-johnadams2.avi. Another TPX divergence from their own naming scheme. XBMC will assume Season 1 if only one match-->
- <regexp>(?i)[/\\]tpz-[^\d]*(\d)(\d{2})(\d{2})?(?:r|fix|dc|-repack|int|d)?\.</regexp> <!-- tzp-show12324.avi -->
- <!--
- #######################################################################################
- Courtesy of Grum, this REGEX will extract info from scene RARs.
- I will not be able to offer support on this section as I have no suitable files, but by all accounts it will work exceptionally well.
- #######################################################################################
- IMPORTANT URL ENCODING BEING DEPRECATED. THIS RAR REGEX WILL BE EOL FROM DHARMA ON
- -->
- <regexp>(?x)rar://.*%(?:2f|5c).*%(?:5f|2[ed]) Episode (?:%(?:5f|2[ed]))? (\d+) %(?:5f|2[ed]).*%(?:2f|5c).*%2erar/[^/]+[.](?:avi|ogm|mkv)</regexp>
- <regexp>(?x)rar://.*%(?:2f|5c).*%(?:5f|2[ed]) S(\d+) (?:%(?:5f|2[ed]))?E(\d+) %(?:5f|2[ed]) S(?:\d+) (?:%(?:5f|2[ed]))?E(\d+)%(?:5f|2[ed]).*%(?:2f|5c).*%2erar/[^/]+[.](?:avi|ogm|mkv)</regexp>
- <regexp>(?x)rar://.*%(?:2f|5c).*%(?:5f|2[ed]) S(\d+) (?:%(?:5f|2[ed]))?E(\d+)(?:%(?:5f|2[ed]))? E (\d+) %(?:5f|2[ed]).*%(?:2f|5c).*%2erar/[^/]+[.](?:avi|ogm|mkv)</regexp>
- <regexp>(?x)rar://.*%(?:2f|5c).*%(?:5f|2[ed]) (\d+) x(\d+) %(?:5f|2[ed]) (?:\d+)x(\d+) %(?:5f|2[ed]).*%(?:2f|5c).*%2erar/[^/]+[.](?:avi|ogm|mkv)</regexp>
- <regexp>(?x)rar://.*%(?:2f|5c).*%(?:5f|2[ed]) S(\d+) (?:%(?:5f|2[ed]))?E(\d+) %(?:5f|2[ed]).*%(?:2f|5c).*%2erar/[^/]+[.](?:avi|ogm|mkv)</regexp>
- <regexp>(?x)rar://.*%(?:2f|5c).*%(?:5f|2[ed]) (\d+) x(\d+) %(?:5f|2[ed]).*%(?:2f|5c).*%2erar/[^/]+[.](?:avi|ogm|mkv)</regexp>
- <regexp>(?x)rar://.*%(?:2f|5c).*%(?:5f|2[ed]) part (?:%(?:5f|2[ed]))? (\d+) %(?:5f|2[ed]).*%(?:2f|5c).*%2erar/[^/]+[.](?:avi|ogm|mkv)</regexp>
- <regexp>(?x)rar://.*%(?:2f|5c).*%(?:5f|2[ed]) E(?:P(?:isode)?)? (\d+)(?:%(?:5f|2[ed]))? E(?:P(?:isode)?)? (\d+)%(?:5f|2[ed]).*%(?:2f|5c).*%2erar/[^/]+[.](?:avi|ogm|mkv)</regexp>
- <regexp>(?x)rar://.*%(?:2f|5c).*%(?:5f|2[ed]) E(?:P(?:isode)?)? (\d+) %(?:5f|2[ed]).*%(?:2f|5c).*%2erar/[^/]+[.](?:avi|ogm|mkv)</regexp>
- </tvshowmatching>
- <!--
- #######################################################################################
- Now that XBMC has had a shot we will try a few more les reliable REGEX
- #######################################################################################
- -->
- <tvshowmatching action="append">
- <!--
- #######################################################################################
- Takes the season number from the folder name and ep number from video file.
- For best results use the tvshow.nfo method along with show/season x/episodes
- #######################################################################################
- -->
- <regexp>(?i)[/\\]season[^\w]?(\d{1,2})[^\d]*[/\\][^\d]+[\. _-](\d{1,2})[\. _-][^\d]+</regexp> <!-- /Season 1/the_episode_8.avi HUGE potential for false positives. Comment out if you are unsure -->
- <regexp>(?i)[/\\]season[^\w]?(\d{1,2})[^\d]*[/\\].*?\D\1(\d\d)(?!.*])</regexp> <!-- /Action/Season 1/Action101 Pilot.avi Last (?!.*]) helps with anime false positives. not a perfect solution -->
- <regexp>(?i)[/\\]season[^\w]?(\d{1,2})[^\d]*[/\\](\d\d?)[^\w]([^/\\]*)</regexp> <!-- /UFO/Season 1/02.Computer.Affair.divx e.g. lame sequntial numbering witout season -->
- <regexp>(?i)[/\\]season[^\w]?(\d{1,2})[^\d]*[/\\].*?[^\w]ep?\.?(\d\d?)[^\w]([^/\\]*)</regexp> <!-- /Ulysses 31/Season 1/Ulysses 31 E12 Trapped.avi e.g. lame sequntial numbering witout season -->
- <regexp>(?i)[/\\]season[^\w]?(\d{1,2})[^\d]*[/\\].*?[^\w]?episode[^\w]?(\d\d?)[^\w]([^/\\]*)</regexp> <!-- /The Chronicles/Season 1/Chronicles.Of.01.The.episode.6.DVDRip.DivX-movies.avi -->
- <regexp>(?i)[/\\]season[^\w]?(\d{1,2})[^\d]*[/\\].*?[^\w]part[^\w]?(\d\d?)[^\w]([^/\\]*)</regexp> <!-- /NASA Missions/Season 1/nasa.missions.part.3.hdtv.xvid-fqm.avi -->
- <regexp>(?i)[/\\]season[^\w]?(\d{1,2})[^\d]*[/\\].*?[^\w]chapter[^\w]?(\d\d?)[^\w]([^/\\]*)</regexp> <!-- /The Young /Season 1/The.Young.Chapter.01.My.First.Adventure.DVDRip.XviD-SAiNTS.avi -->
- <regexp>(?i)[/\\]season[^\w]?(\d{1,2})[^\d]*[/\\].*?\1[^\w]?x[^\w]?(\d\d?)([^/\\]*)</regexp> <!-- /season 5/Lost - 5 x 05.mkv -->
- <regexp>(?i)[/\\]season[^\w]?(\d{1,2})[^\d]*[/\\].*?s0?\1[ex]{0,2}(\d{1,2})([^/\\]*)</regexp> <!-- /Season 1/Grange Hill S01xE01.avi -->
- <regexp>(?i)[.a-z](\d\d?)(\d\d)-notv([^/\\]*)</regexp> <!-- frng101-notv.avi -->
- <regexp>(?i)[/\\]\w+-\w+(\d)(\d\d)\.</regexp> <!-- mtn-tts104.avi -->
- </tvshowmatching>
- </advancedsettings>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement