Regular Expressions - Printable Version +- Kodi Community Forum (https://forum.kodi.tv) +-- Forum: Support (https://forum.kodi.tv/forumdisplay.php?fid=33) +--- Forum: General Support (https://forum.kodi.tv/forumdisplay.php?fid=111) +---- Forum: OS independent / Other (https://forum.kodi.tv/forumdisplay.php?fid=228) +---- Thread: Regular Expressions (/showthread.php?tid=25349) |
- earthtorob - 2007-09-13 gmpasSOS Wrote:My tvshow path is: Those don't match. Season #\S## Season 1|S01 Is Season 1 a folder or is your filename contain 'Season 1'? Anyway I had tons of problems with expressions until I realised that I wasn't scanning for content correctly. - gmpasSOS - 2007-09-13 earthtorob Wrote:Those don't match.It was a typing error. The correct exemple is (...)Season 1\S01(...), "Season 1" is a folder... ANd again, thanks for the attention Also need RegExp Assistance... - TornSack - 2007-10-04 I believe I may also be having regexp problems. The following AdvancedSettings.xml was working for me several months ago: <advancedsettings> <tvshowmatching> <regexp>([0-9]+)([0-9][0-9])[^\\/]*</regexp> </tvshowmatching> </advancedsettings> However, after a recent upgraded to XBMC-SVN_2007-09-30_rev10387-T3CH I attempted to add some new files to my library, and ended up with some sort of db corruption. So I deleted /C/XBMC/UserData/Database/MyVideos34.db and restarted XBMC. Ever since I haven't been able to get the scraper to pickup my TV Shows (Movies work fine). Here's my directory structure and scraping method. Vidoes\TV\The Office\Season 1\101 - Pilot.avi Vidoes\TV\The Office\Season 1\102 - Diversity Day.avi Vidoes\TV\Heroes\Season 1\101 - Pilot.avi etc... I run 'Set Content' on the "TV" directory (Vidoes\TV\) using the Zsori TV Database scraper with Run Automated Scan checked. What I end up with is all of my TV Series directories (The Office, Heroes, etc) in the Library, but no episodes (when I click into the directories they're empty). I played around with setting the content from different directories and using each of the other tv scrapers, I delete the database and reboot XBMC between each attempt, but the results are always similar. I downgraded to XBMC-SVN_2007-09-17_rev10259-T3CH with the same results, so I'm pretty sure there's some user error. I'm assuming my regexp is the root. On a final note, I'd like to--once i get the standard regexp working--add a <twopart> for the following episode titling scenario: Vidoes\TV\The Office\Season 1\101-02 - Pilot & Diversity Day.avi (above example is season 1 ep1 and ep1 in a single AVI file) ...reading up on debug reporting now, just in case my regexp is ok. Thx -TS - djdafreund - 2007-10-04 igboo Wrote:Jumping into this thread here... spiff Wrote:yes, set the content of the tvshows folder making sure 'this folder contains a single tv show' is not ticked. that's how it is supposed to work and afaik thats how it works I just wanted to elaborate on this and add something, from doing a lot of recent testings, due to running into a glitch. Now, agrreeing with Spiff on making sure the MAIN "TV Shows" folder's 'this folder contains a single tv show' is not ticked is true, but i wanted to add that making sure the series individual folders content's 'this folder contains a single tv show' IS ticked for each show's folders (IE-Heroes, Family Guy, Hous, Simpsons,etc.). I am bringing this to attention, as when i recently reorganized some things (small tweaks), somehow 2 tv show folders got unticked (while starting from scratch a new database), and couldn't figure out (from not noticing, not thinking this kind of glitch could happen, since only 2 folders had this happen with no personal changes to have cause this, to my knowledge. ) why each series info for that show kept showing up as "Dark Season", with all series info matching. IE- Heroes- (info showed up fine.) -\Season 1- (Season info showing up as "Dark Season" show.) ....\Episode 1,etc. (All wrong info.) -\Season 2- (Season info showing up as "Dark Season" show.) ....\Episode 1,etc. (All wrong info also.) Following the wiki's scraping of 'TV Shows\(showname)\(season#)\101 - ***,and so forth. So i simply removed those folders from the database (which newest svn xbmc also now cleans in process, THANKS AGAIN for that!!! Nice!!), and MADE SURE that those 2 tv shows folders 'this folder contains a single tv show' WERE ticked this time, and rescanned again, fixing this all up again. So, i don't know how that happened (Only 2 folders of 10 had that option UNTICKED, which messed up things.), but i wanted to just add that to Spiffs info above, that when 'this folder contains a single tv show' is not ticked for main TV SHOWS folder, and if people are running into this above situation, use above to double check and fix it. Since this can possibly happen, unexpectingly. Just make sure that each shows folder's content option 'this folder contains a single tv show' IS checked. Hopefully that might straighen out SOME people's confusion, or answer questions if they've ran into this same thing. I know how this works, and would've not thought into it at 1st until looking around in each folder to double-check, and if not for that would've not noticed at 1st. Smack me on the hand for not double-checking i guess, but i really haven't had this happen before (making a setting, and instead of all 10 folders adhearing to this, 2 of them somehow changed opposite by themselves.) - TornSack - 2007-10-04 djdafreund Wrote:I just wanted to elaborate on this and add something, from doing a lot of recent testings, due to running into a glitch. Now, agrreeing with Spiff on making sure the MAIN "TV Shows" folder's 'this folder contains a single tv show' is not ticked is true, but i wanted to add that making sure the series individual folders content's 'this folder contains a single tv show' IS ticked for each show's folders (IE-Heroes, Family Guy, Hous, Simpsons,etc.). djdafreund thanks for the insight into something that helped correct your Library issue. It didn't help me...and to be honest, I hope it's not "true". Having to set a switch for every Season folder in my Library is not something I'm interested in doing. Part of the point of setting content at the TV folder level is to keep the user from having to flip switches in every folder. -TS - TornSack - 2007-10-04 I'm not sure if it was clear from my previous post, but I tried djdafreund's recommendation on one of my season folders, and it did not help my particular situation. -TS - djdafreund - 2007-10-04 I wasn't saying you HAVE to switch every season folder manually, sorry if there was a missunderstanding. I wanted to point out simply that if you DO run into problems, to double check that the season folders ARE ticked is all, Since i started myself by only unticking the option in the main TV SHOWS folder, and yet somehow 2 tv show SEASONS folders were unticked somehow without my doing. So i reticked them, and rescanned, and viola it was back to normal in my library as well as showing proper Show Info. - Gamester17 - 2007-10-04 IMHO it would be great if someone started a "Regular Expressions" article in the XBMC online manual wiki Nudge nudge, wink wink - tvdb-scott - 2007-10-04 Gamester17 Wrote:IMHO it would be great if someone started a "Regular Expressions" article in the XBMC online manual wikihttp://xboxmediacenter.com/wiki/index.php?title=TV_Shows#Custom_Directory_Structure_.26_File_Names EDIT: By the way, the "SSEE - Episode Title" (1001 - Blah) format is not a good one to rely on. Once you get a show with more than 99 episodes in a season (there are many), you're screwed. You'll be much happier using a format like "SxxEyy" (S01E01 - Pilot) or "SSxEE" (01x01 - Pilot), since the regex is simpler and ALWAYS accurate. - djdafreund - 2007-10-05 szsori Wrote:http://xboxmediacenter.com/wiki/index.php?title=TV_Shows#Custom_Directory_Structure_.26_File_Names I'm guessing he meant a more elaborate written wiki. A lot of people can read that and still not make sense of that depending on there skill level, or maybe dislexia kicks in and just plain reading TOO much into it. I only use SSEE, because i don't have any episode's in my collection that won't ever go close to 99 episode's in 1 season. And never will get one with the types of shows i like watching and buying. Only because i only watch weekly shows, and of course wouldn't have that many weeks in 1 season for that to be possible. So i'm not really personally worried about running into that problem with the shows i watch personally. But i have been aware of that problem since the beginning of scrapers when tv shows were 1st added to XBMC. But, knowing full well of who you are, if you REALLY believe overall that SSxEE format is a much better one (other then just having the 99 episode problem.) to use, i could be talked into changing to that method, if it's more accurate. It's just that so far, I haven't had any problems yet grabbing info (other then the xbmc library settings glitch with 2 folders i mentioned above), but that's not a scrapping issue, that was as it's worth a glitch only. You are the one that has one of the biggest database's, and 100% trust your opinion. - tvdb-scott - 2007-10-05 If you'll never hit the 100 episode mark within a single season, there's no reason to switch. The regex is slightly less efficient than the ones with separating characters, but it would only amount to a second or two more while scanning a few thousand episodes. The thing with regular expressions is that people are much better off just posting for help in here than trying to learn how to write them. It took me a year of working with them regularly to really get them down, and yet I still run into situations where I need to look at a reference. I normally think people should figure it out themselves, but a lot of people are going to have trouble grasping regular expressions and adjusting them as needed. With the amount of information online about regular expressions, there's no reason to duplicate that amount of information here. Instead, perhaps someone should put a few regex tutorial links into the wiki for people that are looking for more information? Google "regex tutorial" and you'll find a bunch. Here's one of the better ones (based heavily on examples): http://www.english.uga.edu/humcomp/perl/regex2a.html - djdafreund - 2007-10-05 Cool. Thanks a bunch for that info, and the link as well. That looks like some good reading info too. - zerospunk - 2007-10-05 I was hoping if someone would tell me if the default expressions will cover this: Show Name>Season X>01x01.avi Would I have to alter anything for this convention? - spiff - 2007-10-05 OKAY SERIOUSLY. what is unclear about the wiki page. there are examples that describe which filename every single default expression matches. in addition there are a ton of additionals also with examples. i'm asking so we can change it to the better. - zerospunk - 2007-10-05 The phrasing in the wiki is a bit confusing actually. Quote:The defaults will match the following structures/filenames: When looking at the examples in 'tvmatching', without knowing what the variables define it's a bit hard to tell what the dir structure should be. I understand that any convention above will work with the file name, I'm just asking if the show name/season name/episode titles are required in the file name if it already has a corresponding number. i.e. show/season _ /01x01.avi Basically I don't want to go in and add all that redundant info at the file level if it's already picked up in the directory tree, but I'm still unsure after reading the wiki and this thread. Sorry if I'm personally offending you :p (i suck at the expressions) |