Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Custom Mappings: Can't filter properly #879

Closed
pannal opened this issue Jul 20, 2023 · 5 comments
Closed

Custom Mappings: Can't filter properly #879

pannal opened this issue Jul 20, 2023 · 5 comments

Comments

@pannal
Copy link

pannal commented Jul 20, 2023

Hey, thank you for this great piece of software.

I'm trying to sanitize queries containing dots, e.g.: "Any Series Name A.B.C." to "Any Series Name".

As far as I can see this currently isn't possible generally. I can add a custom mapping for every show that has dots in it, but not as a generic solution.

Am I missing something?

Thanks!

Edit: This can be used as a workaround, but is limited to three chars with dots trailing the query:
Input pattern: {title:[^.]+}\.?{trail1:[^.]*}\.?{trail2:[^.]*}\.?{trail3:[^.]*}.*
Output pattern: {title}{trail1}{trail2}{trail3}

@theotherp
Copy link
Owner

theotherp commented Jul 20, 2023 via email

@pannal
Copy link
Author

pannal commented Jul 20, 2023

Ideally I'd like to make two fallback queries all the time, even if the initial ID based query matched, and then with and without any dots in the title.

The positioning was only due to the fact that I don't know how to generalize the pattern in hydra.

And no, I want to remove any dots.

@theotherp
Copy link
Owner

So you mean "Any Series Name A.B.C." to "Any Series Name ABC" (or both).

@pannal
Copy link
Author

pannal commented Jul 20, 2023

Exactly. Or "Peter A. B. Gunther" to "Peter A B Gunther" in addition to the one with the dots.

@theotherp
Copy link
Owner

I've added a switch so that the values may only match parts of the affected string. That way you can remove anything you want from anywhere in the query or title.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants