Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@UndeadKernel
Created June 9, 2017 22:47
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save UndeadKernel/835164cb57e735494e11fd9fcde6770d to your computer and use it in GitHub Desktop.
Save UndeadKernel/835164cb57e735494e11fd9fcde6770d to your computer and use it in GitHub Desktop.
Good parsing settings for Kodi
<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>
<regexp>(?i).*?[\. \-_](\d\d?)[\. \-_].*?\.(?:mkv|mp4|avi)$</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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment