Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[gmdfalk#36] Replace prefix search with substring search
In a few rare situations the best blocklist filter string is not a prefix of the song. A substring search will handle these anomalies correctly, with the caveat that it is inevitably much less conservative. At least four instances of a pattern similar to the following have been observed: FRESH LIGE NU Filtr KLIK & LYT Filtr Here, "Filtr" is the desired filter string but isn't a prefix. The real issue here is that the prefix filter is trivially bypassed in theory. While I have only one example of this, the pattern is straight-forward. An alternative could be to optionally try either a substring search or a suffix search after a failed prefix search, letting users opt in to the more dangerous behaviour. Personally I have had no issues with substrings but my music consumption simply isn't big enough for my experience to have much weight. Note that I don't remember if "Filtr" is actually a suffix in the examples above. That is, I have forgotten if anything comes after it.
- Loading branch information