Add a retention timer for podcast
This commit is contained in:
@@ -180,6 +180,11 @@ public class JellypodController : ControllerBase
|
||||
podcast.MaxEpisodesToKeep = request.MaxEpisodesToKeep.Value;
|
||||
}
|
||||
|
||||
if (request.MaxEpisodeAgeDays.HasValue)
|
||||
{
|
||||
podcast.MaxEpisodeAgeDays = request.MaxEpisodeAgeDays.Value;
|
||||
}
|
||||
|
||||
await _storageService.UpdatePodcastAsync(podcast).ConfigureAwait(false);
|
||||
return Ok(podcast);
|
||||
}
|
||||
|
||||
@@ -14,4 +14,9 @@ public class UpdatePodcastRequest
|
||||
/// Gets or sets the maximum episodes to keep.
|
||||
/// </summary>
|
||||
public int? MaxEpisodesToKeep { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the maximum age in days for episodes (0 = use global, -1 = unlimited).
|
||||
/// </summary>
|
||||
public int? MaxEpisodeAgeDays { get; set; }
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user