Skip to content

Commit

Permalink
Deliver actual series and seasons from channel
Browse files Browse the repository at this point in the history
  • Loading branch information
Kevinjil committed Jan 12, 2025
1 parent fe01107 commit 73f48f3
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions Jellyfin.Xtream/SeriesChannel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ namespace Jellyfin.Xtream;
/// The Xtream Codes API channel.
/// </summary>
/// <param name="logger">Instance of the <see cref="ILogger"/> interface.</param>
public class SeriesChannel(ILogger<SeriesChannel> logger) : IChannel
public class SeriesChannel(ILogger<SeriesChannel> logger) : IChannel, IDisableMediaSourceDisplay
{
/// <inheritdoc />
public string? Name => "Xtream Series";
Expand Down Expand Up @@ -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<string>(parsedName.Tags),
Type = ChannelItemType.Folder,
Expand Down Expand Up @@ -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),
Expand Down Expand Up @@ -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,
Expand Down

0 comments on commit 73f48f3

Please sign in to comment.