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

On-the-Fly and Placeholder Filters Fail When keep_only or discard Are Configured #144

Open
tillcash opened this issue Aug 19, 2024 · 1 comment

Comments

@tillcash
Copy link

tillcash commented Aug 19, 2024

When the keep_only or discard options are set in the configuration, the On-the-Fly and Placeholder filters fail, resulting in no feeds being returned.

  - path: /otf
    on_the_fly_filters: true
    filters:
      - keep_only:
          field: title

Could you tell me where to modify the code so that the keep_only and discard filters are applied to the title by default? Many YouTube feeds have descriptions with keywords that I don't want to filter, which often leads to false positives. To overcome this, I primarily use these filters to target titles only, so I will compile the code myself after making the changes.

@shouya
Copy link
Owner

shouya commented Aug 20, 2024

Could you tell me where to modify the code so that the keep_only and discard filters are applied to the title by default?

Sorry, but it's currently impossible use on_the_fly_filters keep_only filter and filter only by titles. This is because on_the_fly filters gets translated as normal filters with the most basic config, which defaults to match any fields.

Of course you can modify the code if you want. You can change it here:

https://github.com/shouya/rss-funnel/blob/29141c5c351f21031fb12c0b0704840076f6f3cd/src/filter/select.rs#L151C5-L151C14

Change Self::Any to Self::Title will do the trick.

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

No branches or pull requests

2 participants