xbmc / metadata.themoviedb.org.python

Other
44 stars 40 forks source link

Greatly improves addon's ability to successfully parse content with '… #132

Closed KevinBowen0 closed 1 year ago

KevinBowen0 commented 2 years ago

…messy' file/directory names not in kodi-recommended format.

For reference, as a brand new Kodi user, when I pointed it at my pre-existing movie library (entirely unsorted and unstructured), it was able to successfully scan and import fewer than half of my movies. With this patch, it gets almost 100%.

It works by just applying mostly-regex based heuristics to strip non-title/date-related junk from the title/filename it's passed.

Crucially, it only attempts heuristics if it first fails to get a match the ordinary way, so it will have no effect on users who do choose to organize their libraries in Kodi-recommended format.

rmrector commented 2 years ago

Cheers.

However, Kodi already cleans titles before passing them to scrapers. Any adjustments to that process should be applied to Kodi itself, not implemented in a single scraper.

KevinBowen0 commented 2 years ago

Thanks. Can you point me to where in the codebase it does that?

Kevin Bowen @. @.>

On Tue, Mar 8, 2022 at 7:58 PM Ryan Rector @.***> wrote:

Cheers.

However, Kodi already cleans titles before passing them to scrapers. Any adjustments to that process should be applied to Kodi itself, not implemented in a single scraper.

— Reply to this email directly, view it on GitHub https://github.com/xbmc/metadata.themoviedb.org.python/pull/132#issuecomment-1062530231, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAFZO3GBJ6BNQU7XHD3LOV3U7AOXFANCNFSM5QHTC3XQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

You are receiving this because you authored the thread.Message ID: @.***>

rmrector commented 2 years ago

It is configured with advancedsettings.xml, which is introduced to the codebase at AdvancedSettings.cpp m_videoCleanDateTimeRegExp and m_videoCleanStringRegExps.