2012-03-27, 06:12
I do apologize in advance if there is a better place to post this, or if there is a similar thread for it which I was unable to locate.
This page (and this) detail how XBMC stacks files using regular expressions, e.g. movie-title-part1.mpg movie-title-part2.mpg becomes a single 'movie-title' in the XBMC interface when stacking is enabled.
Here's an example of the regular expression as it is documented (and I do not know if this documentation is up-to-date for v11):
This expression (and the letter variant) does not handle file names which provide the stacking portion inside parenthesis such as this: Fight Club (1999) [Part 1].avi
Here's an example of an updated RegEx to handle all 3 types of parentheses, although personally I only wish to add ][ bracket matching.
The change is relatively simple and I do not believe it will allow for any additional false-positives, since the parentheses delimit the 'field' nicely. I have been using this updated expression in my advancedsettings.xml file for a while now and it works well, so I was hoping it could be included in XBMC as the default so I don't have to keep sending people a subset of my xml file.
This page (and this) detail how XBMC stacks files using regular expressions, e.g. movie-title-part1.mpg movie-title-part2.mpg becomes a single 'movie-title' in the XBMC interface when stacking is enabled.
Here's an example of the regular expression as it is documented (and I do not know if this documentation is up-to-date for v11):
Quote:<regexp>(.*?)([ _.-]*(?:cd|dvd|p(?:ar)?t|dis[ck]|d)[ _.-]*[0-9]+)(.*?)(\.[^.]+)$</regexp>
This expression (and the letter variant) does not handle file names which provide the stacking portion inside parenthesis such as this: Fight Club (1999) [Part 1].avi
Here's an example of an updated RegEx to handle all 3 types of parentheses, although personally I only wish to add ][ bracket matching.
Quote:<regexp>(.*?)([ _.-]*(?:[\(\[\{])?(?:cd|dvd|p(?:ar)?t|dis[ck]|d)[ _.-]*[0-9]+(?:[\)\]\}])?)(.*?)(\.[^.]+)$</regexp>
The change is relatively simple and I do not believe it will allow for any additional false-positives, since the parentheses delimit the 'field' nicely. I have been using this updated expression in my advancedsettings.xml file for a while now and it works well, so I was hoping it could be included in XBMC as the default so I don't have to keep sending people a subset of my xml file.