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) |
- leigh_munro - 2007-04-30 I'm lost with all this guys....is anyone able to help with something that would work with my file structure. H:\TV Shows\Heroes\Heroes - Season 1\Heroes - S01E01 - Genesis.avi H:\TV Shows\Heroes\Heroes - Season 1\Heroes - S01E02 - Don't Look Back.avi H:\TV Shows\Heroes\Heroes - Season 1\Heroes - S01E03 - One Giant Leap.avi - gzusrawx - 2007-04-30 I think that's already supported by default. Don't make any entries in AdvancedSettings.xml if it is cause it overrides the defaults - GhostDog - 2007-05-01 The problem I'm having is that sometimes it gets the show info, and episode info for shows, most of the time it doesn't. I leave the name of my shows in the default group release names i.e. Supernatural.S02E13.HDTV.XviD-XOR.avi i.e. my.name.is.earl.s02e20.hdtv.xvid-xor.[VTV].avi Here's my debug log without a customized advancesettings.xml file when it works (as I know it can pickup show names in the above format without one by default). Punkd.S08E01.DSR.XviD-SYS.avi Code: 19:40:04 M: 37933056 DEBUG: DIRECTORY::CSMBDirectory::OpenDir - Using authentication url smb://xbox:[email protected]/TV%20Shows Not working example: Painkiller.Jane.S01E01.DSR.XviD-NoTV.avi Code: 20:06:51 M: 35876864 DEBUG: CGUIMediaWindow::GetDirectory (smb://192.168.1.200/TV Shows/05 Fri/) I've tried using a customized advancedsettings.xml file as well, but there has been no change. It seems like it's hit, and miss for me. Sometimes, it works, most of the time it doesn't. I'm using the latest T3CH build. - GhostDog - 2007-05-02 I found out what the problem was. It was my folder structure. E:\TV Shows\01 Mon\Drive - Doesn't correctly scan E:\TV Shows\Mon\Drive - Doesn't correctly scan either E:\TV Shows\Drive - Works fine I'll no longer use the days of the week. - sakamoto - 2007-05-07 could someone please help me with the regexps I should use? My TV eps are stored as follows: F:\TV Series\Lost\01x01-First.Episode.Pilot.avi F:\TV Series\Lost\01x02-Second.Episode.Pilot.avi ... F:\TV Series\The Sopranos\01x01-First.Episode.Pilot.avi F:\TV Series\The Sopranos\01x02-First.Episode.Pilot.avi ... Many thanks for the help! - sakamoto - 2007-05-07 sakamoto Wrote:could someone please help me with the regexps I should use? My TV eps are stored as follows:would these be valuable options? <tvshowmatching> <regexp>[0]*([0-9]+)x[0]*([0-9]+)-[^\\/]*</regexp> </tvshowmatching> OR <tvshowmatching> <regexp>([0-9]+)x([0-9]+)-[^\\/]*</regexp> </tvshowmatching> - DonJ - 2007-05-08 Yes both should work imo. confused about regex strings - tempxbmcusr - 2007-06-18 I am not familiar with these type of strings. I have read the wiki and the other posts and have come up with the following set of strings that I had hoped would work, but sadly have not. This is what I have come up with: <tvshowmatching> <regexp>([0-9]+)([0-9][0-9])[^\\/]*</regexp> <regexp>season([0-9]+)[\\/]episode([0-9]+)[^\\/]*</regexp> <regexp>Season[\._ ]([0-9]+)[\\/]([0-9]+)[^\\/]*</regexp> <regexp>[Ss]eason([0-9]+)[\\/]episode([0-9]+)[^\\/]*</regexp> <regexp>[Ss]eason[\._ ]([0-9]+)[\\/]([0-9]+)[^\\/]*</regexp> <twopart> <regexp>\[[Ss]([0-9]+)\]_\[[Ee][0-9][0-9]\-([0-9]+)\][^\\/]*</regexp> % foo_[s01]_[e01-02] <regexp>[\._ \-][Ss]([0-9]+)[^0-9]*[Ee][0-9][0-9]\-([0-9]+)[^\\/]*</regexp> % foo.s01.e01-02 <regexp>[\._ \-][0-9]+x[0-9]+[\._ \-]*([0-9]+)x([0-9]+)[^\\/]*</regexp> % foo.1x09 1x10 </twopart> </tvshowmatching> The files are all located in the following directory structure: smb:\\TV\[Show Name]\Season #\[s#][ee] - [ep name].avi season number is one or two digits. ep number is 01-99. for example "TV\24\Season 1\101 - Series Premier.avi" Thanks for any and all help! - J_K_M_A_N - 2007-06-18 You can't have the season number be 1 or 2 numbers unless you have some way of telling it that the season number has ended. Like an x or a . like this: "TV\24\Season 1\1.01 - Series Premier.avi" or: "TV\24\Season 1\1x01 - Series Premier.avi" Otherwise it has no way of knowing if the season number is 1 to 2 digits. If you add either of those, the default setting should work (I believe). Good luck. J_K_M_A_N - tvdb-scott - 2007-06-19 Not entirely true, JKMAN... if episode is always 2 digits, then you can assume that the remaining numbers are the season: Code: [Ss]eason [0-9]+[\\/]([0-9]+)([0-9][0-9])[^\\/]* - tempxbmcusr - 2007-06-19 J_K_M_A_N and szsori: Thank you both for your responses. I never really thought about the fact that the season number on the files themselves would be causing problems. It was one of those oversights when you are too used to your way. Thanks! path for tv ep info - tempxbmcusr - 2007-06-19 I have another question. Do you know how the database sees the path for the file? If, so does it depend on where the "Set Content" flag is set? When I changed the file name to just including the ep number (see above posts) and set the TV directory (SMB:\\COMPUTER\TV\Series\Season #\## - ep name.avi) to be the content TV, it did not find the episodes. However, when TV content is set to NONE and I set the individual series folder to TV it was able to find an episode. There are too many series folders to do it individually and there has to be a way to put it higher in the path hierarchy. Therefore I thought that maybe there was a difference in the path that depends on where the content is set. So I added a *[/\/] to the beginning of the regexp so that it would ignore everything before the [Ss]eason part of the path. But this did not work. Code: <tvshowmatching> Also, does a regexp work from R->L or L->R when it is looking at a string (path)? Once I get mine working I am willing to write a xbmc regexp generator based on user defined paths and possibly "set content" flags (if that ends up being involved). Thanks! - J_K_M_A_N - 2007-06-19 szsori Wrote:Not entirely true, JKMAN... if episode is always 2 digits, then you can assume that the remaining numbers are the season: I was just basing my answer on the fact that he said the season number was 1 or 2 digits. He didn't say it was always 2. I should have been more clear. I believe the first directory below the set content folder is used as the show name. I also believe that spiff added the option to set content on the folder of the show itself. You have to watch for the 's'. One says TV Shows and I think the other says TV Show. Good luck. J_K_M_A_N - downset211 - 2007-07-21 I've been trying to figure this out on my own for awhile but have been having problems so hoping someone here might be able to help. here's what I have. So far this is working - SeriesName\Season 1\SeriesName - 08.avi all of Season 1 shows up fine in the library that way, however - SeriesName\Season 3\SeriesName_66.avi which is episode 66 of the series or episode 15 of season 3 or - SeriesName\Season 6\SeriesName_124.avi which is episode 124 of the series or episode 4 of season 6 those don't show up in the library at all. I know the naming scheme is kinda funky, is SeriesName_EpisodeNumber.xxx tv.com does use those episode numbers (season 3 episode 66 vs season 3 episode 15)so I was hoping i wouldn't have to go renaming 6 season's worth of stuff if I didn't have to. I really hope I'm making sense here but I've been racking my brain out with these expressions but I must just be completely dense and can't figure it out. Hoping someone could help if it can be done at all, or let me know if it's just not possible either. - jmarshall - 2007-07-21 You have to rename. |