Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Series metadata #150

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 8 additions & 6 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,10 @@ 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 @@ -219,12 +220,13 @@ private ChannelItemInfo CreateChannelItemInfo(SeriesStreamInfo series, Season? s
DateCreated = DateTimeOffset.FromUnixTimeSeconds(episode.Added).DateTime,
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
Loading