SHARE
TWEET

Untitled

a guest Sep 8th, 2010 543 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <!--
  2. V1.9
  3. http://forum.xbmc.org/showthread.php?t=51614
  4.  
  5. #######################################################################################
  6. This REGEX is UNOFFICIAL/EXPERIMENTAL and may require a strict folder structure.
  7.  
  8. *Use at your own risk*
  9.  
  10. We use multiple REGEX rather than try to build one REGEX to rule them all.
  11. This wastes CPU cycles but allows easier bug finding, refining and end user understanding.
  12. The order they run is important. It will never catch all episodes.
  13. Since were trying to deal with bad naming it could result in false positives.
  14. Comments and submissions welcomed but try to keep it simple. If in doubt use two simple REGEX rather than one complex one.
  15.  
  16. To install see: http://www.xbmc.org/wiki/?title=AdvancedSettings.xml
  17.  
  18. Tested against Dharma onwards only but may be backwards compatible.
  19. ########################################################################################
  20. -->
  21.  
  22. <advancedsettings>
  23.  
  24.         <!--
  25.         #######################################################################################
  26.         Customise/remove/comment this section to your personal preferences.
  27.         #######################################################################################
  28.         -->
  29.  
  30.         <navigatevirtualkeyboard>true</navigatevirtualkeyboard> <!-- Activates virtual keyboard navigation, default is false -->
  31.         <lcd>
  32.                 <rows>2</rows>
  33.                 <columns>16</columns>
  34.                 <scrolldelay>2</scrolldelay>
  35.         </lcd>
  36.  
  37.         <videolibrary>
  38.                 <hideallitems>true</hideallitems>  <!-- Remove the "*All" items from the video library -->
  39.                 <hideemptyseries>false</hideemptyseries>  <!-- Dont hide empty series in the video library -->
  40.                 <hiderecentlyaddeditems>false</hiderecentlyaddeditems>  <!-- Dont remove the "Recently added ..." items from the video library. -->
  41.                 <recentlyaddeditems>250</recentlyaddeditems> <!-- Increase number of recently added items from default 25 -->
  42.         </videolibrary>
  43.  
  44.         <myvideos>
  45.                 <extractthumb>false</extractthumb> <!-- Dont create random thumbnails. Either scrape them from the internet or dont have them -->
  46.         </myvideos>
  47.  
  48.         <sorttokens>
  49.     <token separators="">&quot;</token> <!-- Ignore " when sorting. Senisble due to IMDB naming policy -->
  50.         </sorttokens>
  51.  
  52.         <!--
  53.         #######################################################################################
  54.         Stop XBMC indexing some unwanted common items
  55.         #######################################################################################
  56.         -->
  57.  
  58.         <video>
  59.                 <excludefromscan action="prepend">
  60.                         <regexp>(?i)[[/\\]extras[\//]</regexp> <!-- Any movies in a folder called extras (recursive and case insensitive) will be ignored -->
  61.                         <regexp>(?i)[sample</regexp> <!-- Any movies called sample. are ignored. This is VERY greedy but works for me. Post in forum if you need refinements -->
  62.                         <regexp>(?i)[uTorrentPartFile</regexp>  <!-- For people silly enough to use this client :) -->
  63.                 </excludefromscan>
  64.                 <excludetvshowsfromscan action="prepend">
  65.                         <regexp>(?i)[[/\\]extras[\//]</regexp> <!-- Any TV in a folder called extras (recursive and case insensitive) will be ignored) -->
  66.                         <regexp>(?i)[sample</regexp> <!-- Any TV called sample. are ignored. This is VERY greedy but works for me. Post in forum if you need refinements -->
  67.                         <regexp>(?i)[uTorrentPartFile</regexp>  <!-- For people silly enough to use this client :) -->
  68.                 </excludetvshowsfromscan>
  69.         </video>
  70.  
  71.  
  72.         <!--
  73.         #######################################################################################
  74.         XBMC catches a few files incorrectly so we will catch them befroe XBMC trys.
  75.         #######################################################################################
  76.         -->
  77.  
  78.         <tvshowmatching action="prepend">
  79.  
  80.                 <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 -->
  81.                 <regexp>(?i)[/\\]tpz-[^\d]*(\d)(\d{2})(\d{2})?(?:r|fix|dc|-repack|int|d)?\.</regexp> <!-- tzp-show12324.avi     -->
  82.  
  83.                 <!--
  84.                 #######################################################################################
  85.                 File only REGEX matching in an attempt to cater for ultra lame TPZ Topaz naming scheme.
  86.                 99%+ accuracy. The remaining are TPZ releases that dont follow their own naming scheme.
  87.                 The order they run in is VITAL. To be safe run them all or none.
  88.                 #######################################################################################
  89.                 -->
  90.  
  91.                 <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 -->
  92.                 <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-->
  93.                 <regexp>(?i)[/\\]tpz-[^\d]*(\d)(\d{2})(\d{2})?(?:r|fix|dc|-repack|int|d)?\.</regexp> <!-- tzp-show12324.avi     -->
  94.  
  95.                 <!--
  96.                 #######################################################################################
  97.                 Courtesy of Grum, this REGEX will extract info from scene RARs.
  98.                 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.
  99.                 #######################################################################################
  100.                 -->
  101.  
  102.                 <regexp>(?x)rar://.*%(?:2f|5c).*%(?:5f|2[ed]) Episode           (?:%(?:5f|2[ed]))? (\d+)                                                         %(?:5f|2[ed]).*%(?:2f|5c).*%2erar/[^/]+[.](?:avi|ogm|mkv)</regexp>
  103.                 <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>
  104.                 <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>
  105.                 <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>
  106.                 <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>
  107.                 <regexp>(?x)rar://.*%(?:2f|5c).*%(?:5f|2[ed])  (\d+)                              x(\d+)                                                         %(?:5f|2[ed]).*%(?:2f|5c).*%2erar/[^/]+[.](?:avi|ogm|mkv)</regexp>
  108.                 <regexp>(?x)rar://.*%(?:2f|5c).*%(?:5f|2[ed]) part              (?:%(?:5f|2[ed]))? (\d+)                                                         %(?:5f|2[ed]).*%(?:2f|5c).*%2erar/[^/]+[.](?:avi|ogm|mkv)</regexp>
  109.                 <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>
  110.                 <regexp>(?x)rar://.*%(?:2f|5c).*%(?:5f|2[ed]) E(?:P(?:isode)?)?                    (\d+)                                                         %(?:5f|2[ed]).*%(?:2f|5c).*%2erar/[^/]+[.](?:avi|ogm|mkv)</regexp>
  111.  
  112.         </tvshowmatching>
  113.  
  114.         <!--
  115.         #######################################################################################
  116.         Now that XBMC has had a shot we will try a few more les reliable REGEX
  117.         #######################################################################################
  118.         -->
  119.  
  120.         <tvshowmatching action="append">
  121.  
  122.         <!--
  123.         #######################################################################################
  124.         Takes the season number from the folder name and ep number from video file.
  125.         For best results use the tvshow.nfo method along with show/season x/episodes
  126.         #######################################################################################
  127.         -->
  128.  
  129.         <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  -->
  130.         <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 -->
  131.         <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  -->
  132.         <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  -->
  133.         <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  -->
  134.         <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 -->
  135.         <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  -->
  136.         <regexp>(?i)[/\\]season[^\w]?(\d{1,2})[^\d]*[/\\].*?\1[^\w]?x[^\w]?(\d\d?)([^/\\]*)</regexp> <!-- /season 5/Lost - 5 x 05.mkv  -->
  137.         <regexp>(?i)[/\\]season[^\w]?(\d{1,2})[^\d]*[/\\].*?s0?\1[ex]{0,2}(\d{1,2})([^/\\]*)</regexp> <!-- /Season 1/Grange Hill S01xE01.avi  -->
  138.         <regexp>(?i)[.a-z](\d\d?)(\d\d)-notv([^/\\]*)</regexp> <!-- frng101-notv.avi  -->
  139.         <regexp>(?i)[/\\]\w+-\w+(\d)(\d\d)\.</regexp> <!-- mtn-tts104.avi  --> 
  140.         </tvshowmatching>
  141.  
  142. </advancedsettings>
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top