Talk:Advancedsettings.xml

From Official Kodi Wiki
Revision as of 04:42, 3 November 2009 by >Sbonds (New page: This forum user has come up with a very comprehensive regex for matching TV shows: http://forum.xbmc.org/showpost.php?p=347183&postcount=4 By default, XBMC's matching leaves much to...)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

This forum user has come up with a very comprehensive regex for matching TV shows:

http://forum.xbmc.org/showpost.php?p=347183&postcount=4

By default, XBMC's matching leaves much to be desired. Should this example be included in the main page?

<advancedsettings>  
  <tvshowmatching append="yes">
  	
		<!-- 
		########################################################################################
		V0.1 - 05/05/2009 - Initial Upload
		V0.2 - 08/05/2009 - TPZ matches now require season folder. Fixes some false positives.
		V0.3 - 16/05/2009 - Support for /season 5/Lost - 5 x 05.mkv
		V0.4 - 28/05/2009 - Cater for cross platform difference in paths \/
		V0.5 - 03/06/2009 - Added in regex to match some awfulTV naming that has no season.
												This release marks 99% complete of the google scraped 10,000+ missed eps by XBMC default.
												This will always be the last regex in the list and may product false positives. 
												Use with care.
		V0.6 - 06/06/2009 - New component. Commonly missed movie stacking REGEX.												
												
		########################################################################################
		This REGEX is EXPERIMENTAL and may in places require a strict folder structure.
																Use at your own risk.
		I specifically uses multiple REGEX rather than try to build one REGEX to rule the 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 welcome but where posible try to keep it simple.
		If in doubt use two simple REGEX rather than one complex one.
		########################################################################################
		To install this REGEX create a text file called advancedsettings.xml
		Copy the contents of this into this file and place it in the Userdata folder
		########################################################################################
		-->
  	 
  	<!--
		#######################################################################################
		This section uses a traditional file only based approach and catches some common names
		#######################################################################################
		-->	  	

		
		<!--  File name format: frng101-notv.avi  -->
		<regexp>[.a-z](\d\d?)(\d\d)-notv([^/\\]*)</regexp>
  	 
  	  
		<!--
		#######################################################################################
		This section takes the season number from the folder name and ep number from video file
		For best results use tvshow.nfo method along with show/season x/episodes
		#######################################################################################
		-->

		<!--  File name format: tzp-show123.avi  -->
		<regexp>[/\\]season[^\w]?(\d{1,2})[^\d]*[/\\]tpz-.*?\1(\d\d)([^/\\]*)</regexp>
		
		<!--  File name format: /UFO/Season 1/02.Computer.Affair.divx e.g. lame sequntial numbering witout season  -->
		<regexp>[/\\]season[^\w]?(\d{1,2})[^\d]*[/\\](\d\d?)[^\w]([^/\\]*)</regexp>		
		
		<!--  File name format: /Ulysses 31/Season 1/Ulysses 31 E12 Trapped Between Fire And Ice.avi e.g. lame sequntial numbering witout season  -->
		<regexp>[/\\]season[^\w]?(\d{1,2})[^\d]*[/\\].*?[^\w]ep?\.?(\d\d?)[^\w]([^/\\]*)</regexp>		
		
		<!--  File name format: /The Chronicles of Narnia/Season 1/Chronicles.Of.Narnia.01.The.Lion.The.Witch.And.The.Wardrobe.episode.6.DVDRip.DivX-moviesfreak.avi  -->
		<regexp>[/\\]season[^\w]?(\d{1,2})[^\d]*[/\\].*?[^\w]episode[^\w]?(\d\d?)[^\w]([^/\\]*)</regexp>	

		<!--  File name format: /When We Left Earth The NASA Missions/Season 1/when.we.left.earth.the.nasa.missions.part.3.hdtv.xvid-fqm.avi -->
		<regexp>[/\\]season[^\w]?(\d{1,2})[^\d]*[/\\].*?[^\w]part[^\w]?(\d\d?)[^\w]([^/\\]*)</regexp>	
		
		<!--  File name format: /The Young Indiana Jones Chronicles/Season 1/The.Young.Indiana.Jones.Chronicles.Chapter.01.My.First.Adventure.DVDRip.XviD-SAiNTS.avi  -->
		<regexp>[/\\]season[^\w]?(\d{1,2})[^\d]*[/\\].*?[^\w]chapter[^\w]?(\d\d?)[^\w]([^/\\]*)</regexp>	
		
		<!--  File name format: /Action/Season 1/Action101 Pilot.avi  -->
		<!--  Last (?!.*]) to deal with anime numbering producing false positives. not a perfect solution  -->
		<regexp>[/\\]season[^\w]?(\d{1,2})[^\d]*[/\\].*?\1(\d\d)(?!.*])</regexp>

		<!--  File name format: /season 5/Lost - 5 x 05.mkv  -->
		<regexp>[/\\]season[^\w]?(\d{1,2})[^\d]*[/\\].*?\1[^\w]?x[^\w]?(\d\d?)([^/\\]*)</regexp>
		
		<!--  File name format: /Season 1/Grange Hill S01xE01.avi  -->
		<regexp>[/\\]season[^\w]?(\d{1,2})[^\d]*[/\\].*?s0?\1[ex]{0,2}(\d{1,2})([^/\\]*)</regexp>		
		
		<!--  File name format: /Season 1/the_scene_xvid_episode_8.avi
					This REGEX has huge potential for false positives but catches alot of the left over dross.
					Suggest commenting it out if you are unsure  -->
		<regexp>[/\\]season[^\w]?(\d{1,2})[^\d]*[/\\][^\d]+[\. _-](\d{1,2})[\. _-][^\d]+</regexp>	
  </tvshowmatching>
  
  <moviestacking append="yes">
  	
  	<!--  XBMC does an excellent job on stacking natively so this extra list will likely always be short.
  				Essentially it caters for a few edge cases only. It should be relatively safe to add regardless. -->
					
    <regexp>done[ _\.-](\d)[ _\.-]</regexp>
  </moviestacking>
  
</advancedsettings>