mirror of
https://github.com/jellyfin/jellyfin.git
synced 2024-11-16 02:18:54 -07:00
remove hardcoded stream params
This commit is contained in:
parent
0a1ae62559
commit
60bf0edbde
@ -25,9 +25,15 @@ namespace MediaBrowser.Api.Library
|
|||||||
public int? Limit { get; set; }
|
public int? Limit { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[Route("/Library/FileOrganizations", "DELETE")]
|
||||||
|
[Api(Description = "Clears the activity log")]
|
||||||
|
public class ClearOrganizationLog : IReturnVoid
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
[Route("/Library/FileOrganizations/{Id}/File", "DELETE")]
|
[Route("/Library/FileOrganizations/{Id}/File", "DELETE")]
|
||||||
[Api(Description = "Deletes the original file of a organizer result")]
|
[Api(Description = "Deletes the original file of a organizer result")]
|
||||||
public class DeleteOriginalFile : IReturn<QueryResult<FileOrganizationResult>>
|
public class DeleteOriginalFile : IReturnVoid
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or sets the id.
|
/// Gets or sets the id.
|
||||||
@ -48,7 +54,30 @@ namespace MediaBrowser.Api.Library
|
|||||||
[ApiMember(Name = "Id", Description = "Result Id", IsRequired = true, DataType = "string", ParameterType = "path", Verb = "POST")]
|
[ApiMember(Name = "Id", Description = "Result Id", IsRequired = true, DataType = "string", ParameterType = "path", Verb = "POST")]
|
||||||
public string Id { get; set; }
|
public string Id { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[Route("/Library/FileOrganizations/{Id}/Episode/Organize", "POST")]
|
||||||
|
[Api(Description = "Performs an organization")]
|
||||||
|
public class OrganizeEpisode
|
||||||
|
{
|
||||||
|
[ApiMember(Name = "Id", Description = "Result Id", IsRequired = true, DataType = "string", ParameterType = "path", Verb = "POST")]
|
||||||
|
public string Id { get; set; }
|
||||||
|
|
||||||
|
[ApiMember(Name = "SeriesId", Description = "Series Id", IsRequired = true, DataType = "string", ParameterType = "query", Verb = "POST")]
|
||||||
|
public string SeriesId { get; set; }
|
||||||
|
|
||||||
|
[ApiMember(Name = "SeasonNumber", IsRequired = true, DataType = "int", ParameterType = "query", Verb = "POST")]
|
||||||
|
public int SeasonNumber { get; set; }
|
||||||
|
|
||||||
|
[ApiMember(Name = "EpisodeNumber", IsRequired = true, DataType = "int", ParameterType = "query", Verb = "POST")]
|
||||||
|
public int EpisodeNumber { get; set; }
|
||||||
|
|
||||||
|
[ApiMember(Name = "EndingEpisodeNumber", IsRequired = false, DataType = "int", ParameterType = "query", Verb = "POST")]
|
||||||
|
public int? EndingEpisodeNumber { get; set; }
|
||||||
|
|
||||||
|
[ApiMember(Name = "RememberCorrection", Description = "Whether or not to apply the same correction to future episodes of the same series.", IsRequired = false, DataType = "bool", ParameterType = "query", Verb = "POST")]
|
||||||
|
public bool RememberCorrection { get; set; }
|
||||||
|
}
|
||||||
|
|
||||||
public class FileOrganizationService : BaseApiService
|
public class FileOrganizationService : BaseApiService
|
||||||
{
|
{
|
||||||
private readonly IFileOrganizationService _iFileOrganizationService;
|
private readonly IFileOrganizationService _iFileOrganizationService;
|
||||||
@ -76,11 +105,33 @@ namespace MediaBrowser.Api.Library
|
|||||||
Task.WaitAll(task);
|
Task.WaitAll(task);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void Delete(ClearOrganizationLog request)
|
||||||
|
{
|
||||||
|
var task = _iFileOrganizationService.ClearLog();
|
||||||
|
|
||||||
|
Task.WaitAll(task);
|
||||||
|
}
|
||||||
|
|
||||||
public void Post(PerformOrganization request)
|
public void Post(PerformOrganization request)
|
||||||
{
|
{
|
||||||
var task = _iFileOrganizationService.PerformOrganization(request.Id);
|
var task = _iFileOrganizationService.PerformOrganization(request.Id);
|
||||||
|
|
||||||
Task.WaitAll(task);
|
Task.WaitAll(task);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void Post(OrganizeEpisode request)
|
||||||
|
{
|
||||||
|
var task = _iFileOrganizationService.PerformEpisodeOrganization(new EpisodeFileOrganizationRequest
|
||||||
|
{
|
||||||
|
EndingEpisodeNumber = request.EndingEpisodeNumber,
|
||||||
|
EpisodeNumber = request.EpisodeNumber,
|
||||||
|
RememberCorrection = request.RememberCorrection,
|
||||||
|
ResultId = request.Id,
|
||||||
|
SeasonNumber = request.SeasonNumber,
|
||||||
|
SeriesId = request.SeriesId
|
||||||
|
});
|
||||||
|
|
||||||
|
Task.WaitAll(task);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1062,7 +1062,6 @@ namespace MediaBrowser.Api.Playback
|
|||||||
state.ReadInputAtNativeFramerate = recording.RecordingInfo.Status == RecordingStatus.InProgress;
|
state.ReadInputAtNativeFramerate = recording.RecordingInfo.Status == RecordingStatus.InProgress;
|
||||||
state.AudioSync = 1000;
|
state.AudioSync = 1000;
|
||||||
state.DeInterlace = true;
|
state.DeInterlace = true;
|
||||||
state.InputFormat = "mpegts";
|
|
||||||
}
|
}
|
||||||
else if (item is LiveTvChannel)
|
else if (item is LiveTvChannel)
|
||||||
{
|
{
|
||||||
@ -1091,9 +1090,6 @@ namespace MediaBrowser.Api.Playback
|
|||||||
state.ReadInputAtNativeFramerate = true;
|
state.ReadInputAtNativeFramerate = true;
|
||||||
state.AudioSync = 1000;
|
state.AudioSync = 1000;
|
||||||
state.DeInterlace = true;
|
state.DeInterlace = true;
|
||||||
state.InputFormat = "mpegts";
|
|
||||||
|
|
||||||
await Task.Delay(1000, cancellationToken).ConfigureAwait(false);
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -14,7 +14,7 @@ namespace MediaBrowser.Api.Playback
|
|||||||
|
|
||||||
public VideoStreamRequest VideoRequest
|
public VideoStreamRequest VideoRequest
|
||||||
{
|
{
|
||||||
get { return (VideoStreamRequest) Request; }
|
get { return Request as VideoStreamRequest; }
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
Loading…
Reference in New Issue
Block a user