qBittorrent
qBittorrent copied to clipboard
Allow to create RSS rule based on selected item
Fixes #17865
Since my previous one-liner PRs took me a century to make them pass code review, I feel really confident. This newly-gained confidence made me cook up this monstrosity. Jokes aside, thank you guys for your patience.
What it does: In the RSS downloader, you can right-click to start a download, or open a new URL. Well, now you can make a new rule too! But wait, there is more!
What it can do:
- Auto-create new RSS rule using data from the feed
- Opens newly added rule
- Checks if new rule has any match (see note below), and warns user if there are no matches
Note about Must Contain field: The current title match is kinda tricky now.
- If the name contains at least two brackets (ie.: [group][1080p], it completely breaks title match. If I were to escape them with
\
AND set regex mode then the newly added title will 100% work each time. But then, user might get confused about why it's like that. - For normal torrents, this auto-add creates a perfectly fine Must Contain.
Title sanitization It is highly subjective how one would "sanitize" a title. I tried to pick something that looks OK. Please, let me know if you'd like to change this behavior to more aggressive for example. Like I could also chop very long titles. Could. But should I?
Please let me know if my "work-in-progress" commits end up in the PR, or if I should just make a vanilla, one-big-commit instead with everything in it, finalized.
Question. Is it two sets of brackets or one [set] that will break the title match? And are you referring to only brackets (square) or will a set of parentheses also break the title match? I'll test it once I can download the nightly or wherever it gets added to. I would prefer to have the titles escaped but that's just because I grab titles with multiple sets of brackets and/or parentheses. Good job!
@cagenuts One set of []
works just fine. So [GROUP] Movie title
will match. But [GROUP][720p] Movie title
will not. Most torrents I tried from public trackers worked with instant match, but anime trackers mostly failed, because they use a lot of square brackets.
We'll see what the team says, but they are hard at work now due to the new color scheme fixes and whatnot. The whole "issue" is that the Must Contain field is "smart". It's similar to regex by default, as far as I can tell. Which offers quite some features, and is way easier to use.
Me, without any insight on the whole regex topic, I'd probably set 3 states for the Must Contain field.
- plain text match -> if Article's title contains the Must Contain text anywhere, we match
- (current) not-full-regex but smart match
- regex mode (that now you can toggle)
It's easy to type this out but this would introduce another state to each rule, for example. And you can import/export them. So things can get complicated. Back to square one, we'll see what the team says.
Thanks and I appreciate the effort.
It is highly subjective how one would "sanitize" a title.
Allow to create RSS rule based on selected item
Sorry about the failed tests, I know it's broken, I just used Github to accept a few proposed changes.
This PR is stale because it has been 60 days with no activity. This PR will be automatically closed within 7 days if there is no further activity.
This PR was closed because it has been stalled for some time with no activity.