Extra REGEX for TV Show Episode matching - Printable Version +- Kodi Community Forum (https://forum.kodi.tv) +-- Forum: Support (https://forum.kodi.tv/forumdisplay.php?fid=33) +--- Forum: Tips, tricks, and step by step guides (https://forum.kodi.tv/forumdisplay.php?fid=110) +--- Thread: Extra REGEX for TV Show Episode matching (/showthread.php?tid=51614) |
- Buttink - 2010-10-31 I'm a noob and should read more posts XP - xexe - 2010-11-02 V2.2 Released Big changes in this one principally surrounding layout, order and removal of URL encoding. This needs Dharma beta 4 or later. The good news is that now that URL encoding is gone I can now support RAR packs. If things are being missed by XBMC simple turn on debug log, do a full library update and post xbmc.log to pastebin. From that I can usually fix your problems. Dont post a log and i cant Usual suspects please test the ass out of this please i really want to get a new stable done for release with Dharma. - snyft - 2010-11-04 Movies seem to work really good also tv-shows. Havent noticed anything bad yet and i have rescanned my entire archive (3100 movies, and about 5000 episodes) Anime handling dosent work at all tho. debug log for all my anime using beta 4 on win 7 and 2.2: http://data.fuskbugg.se/dipdip/xbmc.old.rar - xexe - 2010-11-05 something odd is going on. my regex passes PCRE checks but XBMC isnt agreeing. investigation underway Update: try changing line 87 the anime regex to: <regexp>(?i)()(?:[\. _-]|ep)(\d{1,3})[\. _-v].*[\[({][\da-z]{8}[\])}]</regexp> and see if it works. if it does good for you and bad for me.. will explain later - Buttink - 2010-11-07 The default captures for xbmc stopped a lot of my anime from being found. Example: [subtitlegroup] Code Geass - Lelouch of the Rebellion R2 - 01 (1280x720 h264) [64ECBBAE].mkv This took the 1280 as season and 720 as ep The anime regex should probably be made way more strict but done before xbmc. Code: <regexp>(?i)[/\\]season[^\w]?(\d{1,2})[^\d]*[/\\]\[.+?\].*(?:[\. _-]|ep)(\d{1,3})[\. _-v].*[[({][\da-z]{8}[])}]</regexp> I added a thing for seasons and a check at the beginning of the filename to search for "[subtitlegroup]". I haven't seen "[.*/]" at the beginning of normal TV shows, so yah. I don't know what the first "()" is for nor do I get how you have the group "(?:[\. _-]|ep)", so I just left these alone. It seems to work good for me. - xexe - 2010-11-08 Is that the general feeling from regex anime users.... they want my regex to operate before XBMC.? I am more than happy to do it for the next version but I will need feedback on how well it works - Buttink - 2010-11-08 As long as the regex won't capture any of the other naming conventions, this should work out quite well. I don't have a huge collection of TV, plus Sick Beard renames it for me, so I cant say how much this will interfere. From what I have though, this is miles away from ever accidentally matching. My only problem is renaming all the anime that doesn't include the CRC32 (trying to make a shell script). Side note, JUST THOUGHT OF SOMETHING I could make a python script to attach to sabnzb+ for anime to check for [\da-z{8}] and if it doesn't then do mv filename filename+[crc32] - xexe - 2010-11-08 I am not a huge fan of renaming at all TBH. If you are using sickbeard then you can easily end up with folder scene names and if some my regex + xbmc will get almost 100% match without renaming. You are right it is likely anime will not create false positives however you have to keep in mind literally thousands of users all over the world use my regex so I need to be careful. If no one renamed I could be quite confident not to get false positives but because people do I have to cater for an infinite amount of user nonsense. anyways the change is done, anime regex is prepend as of the next version. - Buttink - 2010-11-09 Your right ... renaming blows (I did make an app for that). But, I found out that (?: ) is a group that isnt captured .... I feel retarded. HERE is a super specific anime regex that is kind long winded just for my own clarity. Code: (?:[/\\]season[^\w]?(\d{1,2})[^\d]*)?[/\\]\[.+?\].*?(?:[\. _-]|ep)(\d{1,3})(?:v\d+)?[\. _-](?:[[({].*?[])}])*?(?:[[({][\da-z]{8}[])}])? It basically first checks to see if there is a "/Season ##" and if there isn't we don't care because group 1 can be null. I'm not entirely positive this works with XBMC because i have been using external regex testers for this. So, I don't know if group not found is the same as a group with no text. Then, you look for the [SUBGROUP]. After that, the name of the show we dont really care about so we just go to "- ##" and see if there is a "v#" after. After that, just searching for matching [({ with the last one being the CRC32. Granted with the matching [({ and making the CRC32 optional, the CRC32 group itself is redundant but eh whatever. The only problem I see with this is someone trying to be cute and putting ((TEXT)) or something like that. - snyft - 2010-11-09 xexe Wrote:I am not a huge fan of renaming at all TBH. If you are using sickbeard then you can easily end up with folder scene names and if some my regex + xbmc will get almost 100% match without renaming. So i just need to add the old anime regex to prepend or i should use the version you told me to test? Have been abit busy with irl issues. - Buttink - 2010-11-09 snyft Wrote:So i just need to add the old anime regex to prepend or i should use the version you told me to test? Have been abit busy with irl issues.The old one should work fairly well if you just move it to prepend. It shouldn't really interfere with any other shows. The problem was all the other xbmc ones are so loose that they could steal it before it ever got down to the anime regex. - xexe - 2010-11-09 Buttink Wrote:Your right ... renaming blows (I did make an app for that). But, I found out that (?: ) is a group that isnt captured .... I feel retarded. Looks interesting. Remember a CRC can only be 0-9a-f so that would make it even more specific. Will give it more attention after the hangover leaves my head - moeru - 2010-11-13 I'm looking for a regexp that will pick up shows with the path as \showname\<showname> - <episode number>.ext Episode numbers will go into triple digits (e.g. One Piece - 001.mp4) I have XBMC set to use Absolute numbering on the One Piece folder with the following regexp in advancedsettings.xml: Code: <tvshowmatching> XBMC does not successfully find any files using that regexp http://pastebin.com/HvHtkFsG - xexe - 2010-11-13 Happy to help but your debug log doesnt pick up any failed to enumerate lines. capture a debug of a complete library update - outleradam - 2010-11-14 I know this is for episode matching, but would you have any clue on Movie matching? I have The 40-Year-Old Virgin.. The 40-Year-Old Virgin ().mpg is not recognized The 40-Year-Old Virgin (Movie).mpg is not recognized How should it be properly formatted so that I can add a year, or not add a year without using an if-then naming convention with mythicalLibrarian? |