Added post-download-hook configuration option#739
Merged
Conversation
Owner
|
Thanks! I've slightly refactored/extended the implementation:
|
- Replace single PostDownloadHook string with PostEpisodeDownload []*ExecHook array - Add ExecHook struct with Command []string and Timeout int fields - Change EPISODE_FEED_NAME environment variable to FEED_NAME - Use CombinedOutput() for simplified error handling with output - Replace warnings with errors for hook execution failures - Add comprehensive test suite using testify with env variable validation - Support multiple hooks per lifecycle event with numbered logging - Default timeout of 60 seconds when Timeout is 0 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
Signed-off-by: Maksym Pavlenko <pavlenko.maksym@gmail.com>
Owner
|
Merged. Pls give it a try in the next nightly build. |
Contributor
Author
|
Hi @mxpv Thanks for such a quick review & added corrections! I've built the current |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Hi there!
First of all, thanks again for such a great project, I rely on it in my day-to-day life.
Part of my setup is a podsync instance that I run for my friends. Some of them like to subscribe to feeds using RSS, others prefer listening to the audio from telegram channels where I upload feed entries.
In order to make this possible I modified podsync with a configurable per-feed option allowing to specify a script for processing episode files. A configured feed looks like this:
A script takes following environment variables:
EPISODE_FILE— a relative path to episode fileEPISODE_FEED_NAME- the name of the feedEPISODE_TITLE- the title of an episodeCloses: #502