Add progress and complettion indication
🏗️ Build Plugin / build (push) Successful in 1m59s
🧪 Test Plugin / test (push) Successful in 56s
🚀 Release Plugin / build-and-release (push) Successful in 1m56s

This commit is contained in:
2025-12-14 11:11:26 +01:00
parent ba497924e9
commit c1f7981ed7
7 changed files with 421 additions and 2 deletions
@@ -236,13 +236,27 @@ public class JellypodChannel : IChannel, IHasCacheKey, IRequiresMediaInfoCallbac
foreach (var episode in episodes)
{
// Build episode name with played indicator
var episodeName = episode.IsPlayed
? $"[Played] {episode.Title}"
: episode.Title;
// Build overview with progress info if partially played
var overview = episode.Description ?? string.Empty;
if (episode.PlaybackPositionTicks > 0 && !episode.IsPlayed && episode.Duration.HasValue)
{
var progressPercent = (int)((double)episode.PlaybackPositionTicks / episode.Duration.Value.Ticks * 100);
var positionTime = TimeSpan.FromTicks(episode.PlaybackPositionTicks);
overview = $"[{progressPercent}% - {positionTime:hh\\:mm\\:ss}] {overview}";
}
// Don't provide MediaSources here - this forces Jellyfin to call GetChannelItemMediaInfo
// which allows us to download-on-demand and return proper local file paths
items.Add(new ChannelItemInfo
{
Id = episode.Id.ToString("N"),
Name = episode.Title,
Overview = episode.Description,
Name = episodeName,
Overview = overview,
ImageUrl = episode.ImageUrl ?? podcast.ImageUrl,
Type = ChannelItemType.Media,
ContentType = ChannelMediaContentType.Podcast,