From 9ac32e11b5c54b7fd25c56396962622d9a8de936 Mon Sep 17 00:00:00 2001 From: Duncan Tourolle Date: Sun, 21 Dec 2025 13:59:42 +0100 Subject: [PATCH] Added a post-download hook for applying processing of downloaded audio before adding to library. --- .../Configuration/PluginConfiguration.cs | 13 + .../Configuration/configPage.html | 27 +++ .../Services/PodcastDownloadService.cs | 229 +++++++++++++++++- README.md | 53 ++++ 4 files changed, 311 insertions(+), 11 deletions(-) diff --git a/Jellyfin.Plugin.Jellypod/Configuration/PluginConfiguration.cs b/Jellyfin.Plugin.Jellypod/Configuration/PluginConfiguration.cs index c505b2a..26d4c3f 100644 --- a/Jellyfin.Plugin.Jellypod/Configuration/PluginConfiguration.cs +++ b/Jellyfin.Plugin.Jellypod/Configuration/PluginConfiguration.cs @@ -19,6 +19,8 @@ public class PluginConfiguration : BasePluginConfiguration MaxEpisodesPerPodcast = 50; CreatePodcastFolders = true; DownloadNewEpisodesOnly = true; + PostDownloadScriptPath = string.Empty; + PostDownloadScriptTimeout = 60; } /// @@ -56,4 +58,15 @@ public class PluginConfiguration : BasePluginConfiguration /// Gets or sets a value indicating whether to only download new episodes after subscription. /// public bool DownloadNewEpisodesOnly { get; set; } + + /// + /// Gets or sets the path to post-download processing script. + /// Script is called with: script input_file output_file. + /// + public string PostDownloadScriptPath { get; set; } + + /// + /// Gets or sets the timeout in seconds for post-download script execution. + /// + public int PostDownloadScriptTimeout { get; set; } } diff --git a/Jellyfin.Plugin.Jellypod/Configuration/configPage.html b/Jellyfin.Plugin.Jellypod/Configuration/configPage.html index 1d54a6d..acee538 100644 --- a/Jellyfin.Plugin.Jellypod/Configuration/configPage.html +++ b/Jellyfin.Plugin.Jellypod/Configuration/configPage.html @@ -166,6 +166,29 @@ + +
+

Post-Download Processing

+
+ + +
+ Optional script to process episodes after download. Called as: script input_file output_file +
+
+
+ + +
+ Maximum time to wait for script completion (default: 60 seconds) +
+
+
+