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

Exit with error code 1 when no episode was downloaded #27

Merged
merged 3 commits into from
Jul 30, 2021

Conversation

bbo2adwuff
Copy link
Contributor

Just closed #26 and this is a better implementation...

As I mentioned in #17 I use a systemd timer to start podcast-dl.

But I realized that my favorite podcast is uploaded often on Thursday mornings, but quite some times on Thursday evenings or even on Friday or Saturday. Either I set my timer on Sunday than I can be sure that the podcast is uploaded already. Or I just retry to download it every three hours until it succeeds by using following:

Restart=on-failure
RestartSec=10800

However systemd's Restart=on-failure just works with exit codes other than zero. So this pull request is one way to achieve this :)

@bbo2adwuff bbo2adwuff mentioned this pull request Jul 27, 2021
Copy link
Owner

@lightpohl lightpohl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey! Thanks for the PR! 👏

This seems like it could be useful in a few situations so I would like to get a variation of this into the next release.

I have a few requested changes below — let me know if you'd like to tackle them! If not, I can make the changes when I have some time later. 👍

bin/bin.js Outdated Show resolved Hide resolved
bin/bin.js Outdated Show resolved Hide resolved
@bbo2adwuff bbo2adwuff requested a review from lightpohl July 30, 2021 10:43
Copy link
Contributor Author

@bbo2adwuff bbo2adwuff left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

@lightpohl lightpohl merged commit 4f144ae into lightpohl:main Jul 30, 2021
@lightpohl
Copy link
Owner

Awesome! Thanks again!

Merged it but going to wait for the other PR and a couple small personal todo items before publishing. 🚀

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

Successfully merging this pull request may close these issues.

2 participants