mirror of
https://github.com/jellyfin/jellyfin.git
synced 2025-12-23 01:05:19 +03:00
more support for episodes directly in a series folder
This commit is contained in:
@@ -1,12 +1,12 @@
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using MediaBrowser.Controller.LiveTv;
|
||||
using MediaBrowser.Controller.LiveTv;
|
||||
using MediaBrowser.Model.LiveTv;
|
||||
using MediaBrowser.Model.Querying;
|
||||
using ServiceStack.ServiceHost;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace MediaBrowser.Api.LiveTv
|
||||
{
|
||||
@@ -58,6 +58,22 @@ namespace MediaBrowser.Api.LiveTv
|
||||
public string ChannelId { get; set; }
|
||||
}
|
||||
|
||||
[Route("/LiveTv/Recordings/{Id}", "GET")]
|
||||
[Api(Description = "Gets a live tv recording")]
|
||||
public class GetRecording : IReturn<RecordingInfoDto>
|
||||
{
|
||||
[ApiMember(Name = "Id", Description = "Recording Id", IsRequired = true, DataType = "string", ParameterType = "path", Verb = "GET")]
|
||||
public string Id { get; set; }
|
||||
}
|
||||
|
||||
[Route("/LiveTv/Timers/{Id}", "GET")]
|
||||
[Api(Description = "Gets a live tv timer")]
|
||||
public class GetTimer : IReturn<TimerInfoDto>
|
||||
{
|
||||
[ApiMember(Name = "Id", Description = "Timer Id", IsRequired = true, DataType = "string", ParameterType = "path", Verb = "GET")]
|
||||
public string Id { get; set; }
|
||||
}
|
||||
|
||||
[Route("/LiveTv/Timers", "GET")]
|
||||
[Api(Description = "Gets live tv timers")]
|
||||
public class GetTimers : IReturn<QueryResult<TimerInfoDto>>
|
||||
@@ -182,6 +198,20 @@ namespace MediaBrowser.Api.LiveTv
|
||||
return ToOptimizedResult(result);
|
||||
}
|
||||
|
||||
public object Get(GetRecording request)
|
||||
{
|
||||
var result = _liveTvManager.GetRecording(request.Id, CancellationToken.None).Result;
|
||||
|
||||
return ToOptimizedResult(result);
|
||||
}
|
||||
|
||||
public object Get(GetTimer request)
|
||||
{
|
||||
var result = _liveTvManager.GetTimer(request.Id, CancellationToken.None).Result;
|
||||
|
||||
return ToOptimizedResult(result);
|
||||
}
|
||||
|
||||
public object Get(GetTimers request)
|
||||
{
|
||||
var result = _liveTvManager.GetTimers(new TimerQuery
|
||||
|
||||
Reference in New Issue
Block a user