From 73f48f3fe86ccb22c06ee9bdaeb7e3f2a16e3d9a Mon Sep 17 00:00:00 2001 From: Kevin Jilissen Date: Sun, 12 Jan 2025 12:24:45 +0100 Subject: [PATCH] Deliver actual series and seasons from channel --- Jellyfin.Xtream/SeriesChannel.cs | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/Jellyfin.Xtream/SeriesChannel.cs b/Jellyfin.Xtream/SeriesChannel.cs index a0f1e8e..4ff603e 100644 --- a/Jellyfin.Xtream/SeriesChannel.cs +++ b/Jellyfin.Xtream/SeriesChannel.cs @@ -35,7 +35,7 @@ namespace Jellyfin.Xtream; /// The Xtream Codes API channel. /// /// Instance of the interface. -public class SeriesChannel(ILogger logger) : IChannel +public class SeriesChannel(ILogger logger) : IChannel, IDisableMediaSourceDisplay { /// public string? Name => "Xtream Series"; @@ -132,11 +132,12 @@ private ChannelItemInfo CreateChannelItemInfo(Series series) { CommunityRating = (float)series.Rating5Based, DateModified = series.LastModified, - // FolderType = ChannelFolderType.Series, + FolderType = ChannelFolderType.Series, Genres = GetGenres(series.Genre), Id = StreamService.ToGuid(StreamService.SeriesPrefix, series.CategoryId, series.SeriesId, 0).ToString(), ImageUrl = series.Cover, Name = parsedName.Title, + SeriesName = parsedName.Title, People = GetPeople(series.Cast), Tags = new List(parsedName.Tags), Type = ChannelItemType.Folder, @@ -182,10 +183,11 @@ private ChannelItemInfo CreateChannelItemInfo(int seriesId, SeriesStreamInfo ser return new() { DateCreated = created, - // FolderType = ChannelFolderType.Season, + FolderType = ChannelFolderType.Season, Genres = GetGenres(serie.Genre), Id = StreamService.ToGuid(StreamService.SeasonPrefix, serie.CategoryId, seriesId, seasonId).ToString(), ImageUrl = cover, + IndexNumber = seasonId, Name = name, Overview = overview, People = GetPeople(serie.Cast), @@ -220,11 +222,13 @@ private ChannelItemInfo CreateChannelItemInfo(SeriesStreamInfo series, Season? s Genres = GetGenres(serie.Genre), Id = StreamService.ToGuid(StreamService.EpisodePrefix, 0, 0, episode.EpisodeId).ToString(), ImageUrl = cover, + IndexNumber = episode.EpisodeNum, IsLiveStream = false, MediaSources = sources, MediaType = ChannelMediaType.Video, - Name = parsedName.Title, + Name = $"Episode {episode.EpisodeNum}", Overview = episode.Info?.Plot, + ParentIndexNumber = episode.Season, People = GetPeople(serie.Cast), Tags = new(parsedName.Tags), Type = ChannelItemType.Media,