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

NOT operator for --episode-regex to filter downloads #91

Closed
StevenAston opened this issue Nov 26, 2024 · 3 comments · Fixed by #94
Closed

NOT operator for --episode-regex to filter downloads #91

StevenAston opened this issue Nov 26, 2024 · 3 comments · Fixed by #94
Labels
documentation Improvements or additions to documentation enhancement New feature or request

Comments

@StevenAston
Copy link

StevenAston commented Nov 26, 2024

It would be nice if the --episode-regex function either allowed you to exclude or include episodes to download based on a flag, or if there was just a separate function like --episode-regex-exclude for example that allowed you to filter out certain entries.

Many podcasts have episode titles that have no reoccurring pattern but include [TEASER] or short promotional 'episodes' that I doubt many people want. Some feeds also carry mini series etc.

I don't think there's any closed issues that address this and I'm not a regex expert so forgive me if there's a way to do this that I've missed and thank you for the project :)

@lightpohl
Copy link
Owner

Hey! I'm also not a regex export so no need to apologize! I attempted to get something working with a negative lookahead but getting it passed in via the command line is not fun.

I'll give it another shot when I have more time and explore other options as well. 💪

@lightpohl lightpohl added documentation Improvements or additions to documentation enhancement New feature or request labels Nov 28, 2024
@StevenAston
Copy link
Author

Thanks for the response, I did actually manage to get the results I wanted with a negative lookahead after a little tinkering. I still think it might make a good feature but it is possible with the software as-is. In case anyone else is struggling with the same issue, what ended up working for me was this:

Say this is our podcast list and we want to download everything except the 'Miniseries' episodes

221 - Valora Dei Cantoros.mp3
33 - Miniseries - Fenara Vel Chroniras.mp3
222 - Thalor Im Brenivar.mp3
223 - Lorien Ves Erenthos.mp3
34 - Miniseries - Murios of Sylvenar.mp3
224 - Arvenar Nocet Lurai.mp3
225 - Trevaris Un Dianthros.mp3
35 - Miniseries - Cyranthos Am Brevalor.mp3

we can use negative lookahead like so --episode-regex="\d*\s\-\s(?!Miniseries)" where the \d*\s\-\s grabs (0-9) however many times, plus the " - " and then the (?!Miniseries) part looks for "Miniseries" and returns 'false' if it finds it, so only episodes 221, 222, etc will be grabbed. Hopefully someone finds that helpful.

@lightpohl
Copy link
Owner

I added --episode-regex-exclude to the latest release, which should make this much easier moving forward. Glad you were able to get something working in the mean time!

#94

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants