mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-04-20 17:14:42 +01:00
more support for episodes directly in a series folder
This commit is contained in:
@@ -1029,6 +1029,12 @@ namespace MediaBrowser.Server.Implementations.Dto
|
||||
{
|
||||
dto.IndexNumberEnd = episode.IndexNumberEnd;
|
||||
dto.SpecialSeasonNumber = episode.AirsAfterSeasonNumber ?? episode.AirsBeforeSeasonNumber;
|
||||
|
||||
var seasonId = episode.SeasonId;
|
||||
if (seasonId.HasValue)
|
||||
{
|
||||
dto.SeasonId = seasonId.Value.ToString("N");
|
||||
}
|
||||
}
|
||||
|
||||
// Add SeriesInfo
|
||||
|
||||
@@ -391,9 +391,16 @@ namespace MediaBrowser.Server.Implementations.LiveTv
|
||||
Path = info.Path,
|
||||
Genres = info.Genres,
|
||||
IsRepeat = info.IsRepeat,
|
||||
EpisodeTitle = info.EpisodeTitle
|
||||
EpisodeTitle = info.EpisodeTitle,
|
||||
ChannelType = info.ChannelType,
|
||||
MediaType = info.ChannelType == ChannelType.Radio ? MediaType.Audio : MediaType.Video,
|
||||
CommunityRating = info.CommunityRating,
|
||||
OfficialRating = info.OfficialRating
|
||||
};
|
||||
|
||||
var duration = info.EndDate - info.StartDate;
|
||||
dto.DurationMs = Convert.ToInt32(duration.TotalMilliseconds);
|
||||
|
||||
if (!string.IsNullOrEmpty(info.ProgramId))
|
||||
{
|
||||
dto.ProgramId = GetInternalProgramIdId(service.Name, info.ProgramId).ToString("N");
|
||||
@@ -510,6 +517,9 @@ namespace MediaBrowser.Server.Implementations.LiveTv
|
||||
PostPaddingSeconds = info.PostPaddingSeconds
|
||||
};
|
||||
|
||||
var duration = info.EndDate - info.StartDate;
|
||||
dto.DurationMs = Convert.ToInt32(duration.TotalMilliseconds);
|
||||
|
||||
if (!string.IsNullOrEmpty(info.ProgramId))
|
||||
{
|
||||
dto.ProgramId = GetInternalProgramIdId(service.Name, info.ProgramId).ToString("N");
|
||||
@@ -563,5 +573,19 @@ namespace MediaBrowser.Server.Implementations.LiveTv
|
||||
|
||||
await service.CancelTimerAsync(timer.ExternalId, CancellationToken.None).ConfigureAwait(false);
|
||||
}
|
||||
|
||||
public async Task<RecordingInfoDto> GetRecording(string id, CancellationToken cancellationToken)
|
||||
{
|
||||
var results = await GetRecordings(new RecordingQuery(), cancellationToken).ConfigureAwait(false);
|
||||
|
||||
return results.Items.FirstOrDefault(i => string.Equals(i.Id, id, StringComparison.CurrentCulture));
|
||||
}
|
||||
|
||||
public async Task<TimerInfoDto> GetTimer(string id, CancellationToken cancellationToken)
|
||||
{
|
||||
var results = await GetTimers(new TimerQuery(), cancellationToken).ConfigureAwait(false);
|
||||
|
||||
return results.Items.FirstOrDefault(i => string.Equals(i.Id, id, StringComparison.CurrentCulture));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user