Kodi Community Forum
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)

Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17


- matthuisman - 2008-08-26

Also, can anyone tell me how season thumbs etc are located.
At the moment i have this structure:

Family Guy/folder.jpg (main wide icon for family guy)
Family Guy/Season 1/folder.jpg (icon for that season)
Family Guy/Season 1/01 - Foo.tbn (icon for that episode)


- kraqh3d - 2008-08-26

im not sure, but i think season thumbs can only be scraped. and i believe the show thumb is gotten as the folder.jpg within the named tv show folder.

(and your filesystem structure is not supported by default. do you have a custom regexp defined to support it?)


- matthuisman - 2008-08-27

im using: <regexp>Season[\._ ]([0-9]+)[\\/]([0-9]+)[^\\/]*</regexp>
Family Guy/Season 2/02 - Holy Crap.avi


- matthuisman - 2008-08-27

You can manually select season thumbs.
I think it should be built in tho to look for folder.jpg within the season folder
or look for season 1.jpg in the main tv show folder eg:

TV/Family Guy/folder.jpg (main show icon)
TV/Family Guy/season 1.jpg (season 1 thumb)
or:
TV/Family Guy/folder.jpg (main show icon)
TV/Family Guy/Season 1/folder.jpg (season thumb)

then for episode thumbs, keep the .tbn's :-)

The 2nd way would be good so i get the nice lil icons on the folders when browsing my NAS via windows


- kraqh3d - 2008-08-27

a "season folder" is not required, and is honestly meaningless. xbmc doesnt care about the folders in between the tv show named folder, and the files. there can be anything in between such as this:

\tvshows\family guy\foo\bar\bat\baz\xxx\yyy\zzz\file.s01e01.avi

though, looking for "season_#.jpg" or something along those lines directly beneath the folder used for the show name would work. feel free to submit a patch.

(and yes, you can manually set the thumb, but it is manual.)


- matthuisman - 2008-08-27

Cool, been awhile since I made a patch for xbmc.. think it was the additem(pos) thing...
Will have a look tho :-)

Oh, i had regex, can you confirm that:

<regexp>Season[\._ ]([0-9]+)[\\/]([0-9]+)[^\\/]*</regexp>
Family Guy/Season 2/02 - Holy Crap.avi

should work....


- kraqh3d - 2008-08-27

that looks about right... there are many free pcre based graphical regexp testers that you can download. one that i've used in the past is regexp coach. google. you'll find a bunch. give them a try. there's also some that are purely online.


- matthuisman - 2008-08-27

Sounds great!
Thanks for the help.

Stay off the Kraqh!


- spiff - 2008-08-27

/show/season1.tbn
/show/season2.tbn
...

for local season thumbs


- kraqh3d - 2008-08-27

good to know.


- sho - 2008-08-27

http://wiki.xbmc.org/?title=Thumbnails#Examples_for_User-Defined_Thumbnails:


- matthuisman - 2008-08-28

Ok, my TV shows all add fine APART from:

Episode 1 of Trailer Park Boys Season 1
Epidode 1 or Trailer Park Boys Season 2

But, episode 1 of seasons 3 and 4 work fine.

See my previouse posts for my regex and file structure.

Only TPB does this.

Maybe an issue with http://www.thetvdb.com (scraper i use is this)


- kraqh3d - 2008-08-28

debug log. and make sure you add a dummy file so that you override the content hash.


- matthuisman - 2008-08-28

kraqh3d Wrote:debug log. and make sure you add a dummy file so that you override the content hash.


I will just copy my db's and then delete them.
Then just add in Trailer Park Boys FRESH.
I will set the debug log level to 3.
And post the log when I get home from work.

I did not know that XBMC outputed to the log when loading the library!
Cool!


- kraqh3d - 2008-08-28

you dont need loglevel 3. loglevel 1 is plenty. and yes, xbmc produces a ton of debugging output because otherwise it would be impossible to help users Smile

** edit **
i'm making that change for the 1x01 default regexp so that it'll match as the start of a filename, right now before i forget!

** edit **
done... its now in svn. (i didnt make the change for "111" to match as the beginning of a filename because of jmarshalls observation that it could screw up things like "4400.s01e01.avi". technically it wouldn't as the s01e01 regexp is evaluated first, but i didnt want to take the chance of some other accidental matches.)