Kodi Community Forum

Full Version: Ignore Filename Prefix? (cleanstrings only works for suffix)
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
The "cleanstrings" option in advancedsettings.xml lets you to ignore specified *suffixes* in filenames, before they're processed by the scraper. However, the instructions (http://kodi.wiki/view/Advancedsettings.xml#cleanstrings) state that "everything right of the match (at the end of the file name) is removed" - thus, this cannot be used to clean *prefixes*. How can we clean specific prefixes from filenames too?

This is useful because it allows more leeway in how we choose to name our files, particularly with regards to alphabetical sorting. For instance, I have a section of old Kung Fu movies, which I like to title "Kung Fu - Title (year).avi", so they all sort together when accessed via a regular file browser. However, these titles prevent them from being recognized by Kodi - so I'm stuck either having to isolate them in a separate folder, or lose the ability to preserve this alphabetic grouping. A simple rule (i.e. in advancedsettings.xml) to ignore the prefix "Kung Fu - " would solve this.

I imagine there's some way to do so, I just haven't been able to dig it up anywhere Smile