This PR solves the problem that created duplicated entries in the filters engine. The problem was found as scriptlets injected multiple times (more than intended) on YouTube. After then, the fact that those filters had preprocessors revealed. The problem was in updateFromDiff function that pushes preprocessor filters to normal filters diff. The mental model and understanding to the diff object was not clear, so this problem happened.
To prevent similar issues in future, tests and comments are added.
This PR solves the problem that created duplicated entries in the filters engine. The problem was found as scriptlets injected multiple times (more than intended) on YouTube. After then, the fact that those filters had preprocessors revealed. The problem was in
updateFromDiff
function that pushes preprocessor filters to normal filters diff. The mental model and understanding to the diff object was not clear, so this problem happened.To prevent similar issues in future, tests and comments are added.