The TVDB scraper is currently broken due to upgrade works at TheTVDB site. We hope this issue will be resolved quickly.

Kodi's regex engine?
#1
Hi - I'm a noob with Kodi, but not with regex.  I am looking to re-organize my exiting video library to better conform with Kodi's naming conventions.

Is Kodi's re engine based on its own RE engine, Python's engine, or some other RE engine?

Based on a tip from @Karellen, I started using the HOW-TO:Create_Video_Library (wiki) which led me to reviewing the underlying regex patterns involved. That led to the RegEx_tutorial (wiki) which led me to my post.

Thanks!

P.S. I've stopped short of downloading Kodi's source as it's just one more thing let me  .. HEY - SQUIRREL!
Reply
#2
Plenty of people are using Kodi without any regex-added instructions when it comes to scraping your media collection into Kodi's libraries.
Good, clean folder/file naming is by far the best first step for that. So, what would you need regex for?
Got a Kodi problem? Provide us with a full Debug log (wiki) || Usefull pages: First time user (wiki) || Troubleshooting (wiki) || Free content (wiki) || Forum rules (wiki) || VPN policy (wiki)
Reply
#3
Sorry - was not asking for a need to use regex.  I'm just putting my feet on the ground on how Kodi works and was deciphering existing regex associated with scraping filenames (before doing lookups for additional info).

"Good, clean folder/file naming" is my goal.  I've used Myth for sometime with Makemkv to rip 400+ discs and several TV shows.   Living room viewing was done from a WDLive, which was retired in favor of Kodi.

Renaming those to match that Kodi expects is best suited for scripting; using regex is the key on my end.  I'm taking baby steps:  LiSt a directory's contents, and then with GVIM (and its RE engine, strikingly different from Perl, Java, MS, etc.), surround existing names with 'mv file1 something_kodi_expects'.

Not a ton to do manually once I get the gist of things.  Like I wrote, a Kodi NOOB.

In any case, I was lazy and should have simply looked at Kodi's source to sort the RE engine question out..

Hope that clarifies my ask..
 
(2019-06-13, 20:42)Klojum Wrote: Plenty of people are using Kodi without any regex-added instructions when it comes to scraping your media collection into Kodi's libraries.
Good, clean folder/file naming is by far the best first step for that. So, what would you need regex for?
Reply
#4
And to answer my own question: Looks to be a Kodi'zed (or XBMC'd) PCRE (Perl Compatible Regex Engine).  Not sure the differences, but not a big deal since it's not used outside of Kodi.. Wink

Thanks again!
 
(2019-06-13, 21:52)muddysteel Wrote: Sorry - was not asking for a need to use regex.  I'm just putting my feet on the ground on how Kodi works and was deciphering existing regex associated with scraping filenames (before doing lookups for additional info).

"Good, clean folder/file naming" is my goal.  I've used Myth for sometime with Makemkv to rip 400+ discs and several TV shows.   Living room viewing was done from a WDLive, which was retired in favor of Kodi.

Renaming those to match that Kodi expects is best suited for scripting; using regex is the key on my end.  I'm taking baby steps:  LiSt a directory's contents, and then with GVIM (and its RE engine, strikingly different from Perl, Java, MS, etc.), surround existing names with 'mv file1 something_kodi_expects'.

Not a ton to do manually once I get the gist of things.  Like I wrote, a Kodi NOOB.

In any case, I was lazy and should have simply looked at Kodi's source to sort the RE engine question out..

Hope that clarifies my ask..
 
(2019-06-13, 20:42)Klojum Wrote: Plenty of people are using Kodi without any regex-added instructions when it comes to scraping your media collection into Kodi's libraries.
Good, clean folder/file naming is by far the best first step for that. So, what would you need regex for?
Reply
#5
(2019-06-13, 21:52)muddysteel Wrote: Sorry - was not asking for a need to use regex.  I'm just putting my feet on the ground on how Kodi works and was deciphering existing regex associated with scraping filenames (before doing lookups for additional info).

"Good, clean folder/file naming" is my goal.  I've used Myth for sometime with Makemkv to rip 400+ discs and several TV shows.   Living room viewing was done from a WDLive, which was retired in favor of Kodi.
It's easy.

For movies I place each movie in a folder named MovieTitle (Year).WhateverYouWant.extension

Example:

Blade Runner (1982).BluRay.1080P.H264.DTS.mkv

And in the scraper you pick the option "Movies are in separate folders that match the movie title". This way you can have subtitles inside, posters, whatever you want.

For TV Shows, I have one folder per series and inside all the episodes (without season folders), named EpisodeTitle.SxxExx.WhateverYouWant.extension.

The wiki explains this quite clearly, anyway: Naming_video_files (wiki)
For troubleshooting and bug reporting please make sure you read this first.
Reply
#6
as you already found it's vanilla PCRE 8.42. The 3 patches are only needed to make it work on some embedded platforms.
Reply
#7
Naming_video_files (wiki)
Reply
#8
Thanks to the community for the help/pointers!

As I shared, my journey started out with an existing (large) library of video files (mostly MKV flavored).  Once I was cued into the file naming conventions expected by Kodi (AND the fact you need to differentiate between Movies vs. TV Shows!), I'm left with an in-place re-naming project.

Future RIPs / conversions will follow the Kodi best-practices.  I'll be toying around with multi-disc movies and/or TV shows (e.g., knit into one file, leave as separate files, etc) to sort out what's best for me...

Kodi's a great suite with tons of tailorability - my hat is off to the community/contributors!

I'll be leaning into bits-and-pieces to help round out what I think can use the help..
Reply
 
Thread Rating:
  • 0 Vote(s) - 0 Average



Logout Mark Read Team Forum Stats Members Help
Kodi's regex engine?00