From c8e4889ac72b4b6fa01ffd0ccf293363ca5ce744 Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Sat, 17 May 2014 00:24:10 -0400 Subject: add subtitle management page --- MediaBrowser.Api/Library/LibraryService.cs | 37 +----------------------------- 1 file changed, 1 insertion(+), 36 deletions(-) (limited to 'MediaBrowser.Api/Library/LibraryService.cs') diff --git a/MediaBrowser.Api/Library/LibraryService.cs b/MediaBrowser.Api/Library/LibraryService.cs index 0e5a3ab25..802df5cca 100644 --- a/MediaBrowser.Api/Library/LibraryService.cs +++ b/MediaBrowser.Api/Library/LibraryService.cs @@ -1,5 +1,4 @@ -using MediaBrowser.Common.Extensions; -using MediaBrowser.Controller.Channels; +using MediaBrowser.Controller.Channels; using MediaBrowser.Controller.Dto; using MediaBrowser.Controller.Entities; using MediaBrowser.Controller.Entities.Audio; @@ -35,21 +34,6 @@ namespace MediaBrowser.Api.Library public string Id { get; set; } } - [Route("/Videos/{Id}/Subtitles/{Index}", "GET")] - [Api(Description = "Gets an external subtitle file")] - public class GetSubtitle - { - /// - /// Gets or sets the id. - /// - /// The id. - [ApiMember(Name = "Id", Description = "Item Id", IsRequired = true, DataType = "string", ParameterType = "path", Verb = "GET")] - public string Id { get; set; } - - [ApiMember(Name = "Index", Description = "The subtitle stream index", IsRequired = true, DataType = "int", ParameterType = "path", Verb = "GET")] - public int Index { get; set; } - } - /// /// Class GetCriticReviews /// @@ -305,25 +289,6 @@ namespace MediaBrowser.Api.Library return ToStaticFileResult(item.Path); } - public object Get(GetSubtitle request) - { - var subtitleStream = _itemRepo.GetMediaStreams(new MediaStreamQuery - { - - Index = request.Index, - ItemId = new Guid(request.Id), - Type = MediaStreamType.Subtitle - - }).FirstOrDefault(); - - if (subtitleStream == null) - { - throw new ResourceNotFoundException(); - } - - return ToStaticFileResult(subtitleStream.Path); - } - /// /// Gets the specified request. /// -- cgit v1.2.3