Fix bug where stale cache causes media player to mix up episode names
🏗️ Build Plugin / build (push) Successful in 2m2s
🧪 Test Plugin / test (push) Successful in 58s

This commit is contained in:
2025-12-30 15:53:31 +01:00
parent 221a3f634d
commit c54221fba2
3 changed files with 30 additions and 4 deletions
@@ -387,10 +387,9 @@ public class JellypodChannel : IChannel, IHasCacheKey, IRequiresMediaInfoCallbac
/// <inheritdoc />
public string? GetCacheKey(string? userId)
{
// Use 5-minute time buckets for cache key
var now = DateTime.Now;
var timeBucket = new DateTime(now.Year, now.Month, now.Day, now.Hour, (now.Minute / 5) * 5, 0);
return timeBucket.ToString("yyyy-MM-dd-HH-mm", CultureInfo.InvariantCulture);
// Include database modification time so cache invalidates when podcasts/episodes change
var lastModified = _storageService.LastModified;
return lastModified.ToString("O", CultureInfo.InvariantCulture);
}
/// <inheritdoc />