umputun / feed-master

Pulls multiple podcast feeds (RSS) and republishes as a common feed, properly sorted and podcast-client friendly.
https://feed-master.umputun.dev
MIT License
118 stars 26 forks source link

"Include" filter to add only those entries that match regex #89

Closed romangr closed 2 years ago

romangr commented 2 years ago

I have a use-case when there are a lot of videos on the channel but only some of them are relevant for my feed. These videos are not in a separate playlist so it's not possible to use playlist-based feed. Is it reasonable to add "include" filter as an alternative to the existing "skip" filter?

umputun commented 2 years ago

this is a valid use case for sure. However, adding an "include" regex to feed settings to address youtube's side filtering may not be the best idea. In this case, yt part won't have a clue about filtering and will download, process, and store potentially useless episodes.

The better solution will be to add a "filter" parameter to youtube.channels. I think it may have both "include" and exclude elements, smth like this

 channels:
  - {id: UCWAIvx2yYLK_xTYD4F2mUNw, name: "Живой Гвоздь", lang: "ru-ru", keep: 5, filter:{include:"Особое мнение", exclude: "Леонид Радзиховский"}
}

In this case, we will download and store only those episodes matching include regex and at the same time, non-matching exclude. All we need to do is a couple of matches into youtube.service code to put those mismatched items to ignored.