minor dashboard cleanup
This commit is contained in:
parent
bb5e6fdcad
commit
74f0d8bdbe
|
@ -1,4 +1,5 @@
|
||||||
using MediaBrowser.Controller.Dto;
|
using MediaBrowser.Common.Extensions;
|
||||||
|
using MediaBrowser.Controller.Dto;
|
||||||
using MediaBrowser.Controller.Entities;
|
using MediaBrowser.Controller.Entities;
|
||||||
using MediaBrowser.Controller.Entities.Audio;
|
using MediaBrowser.Controller.Entities.Audio;
|
||||||
using MediaBrowser.Controller.Entities.Movies;
|
using MediaBrowser.Controller.Entities.Movies;
|
||||||
|
@ -32,6 +33,21 @@ namespace MediaBrowser.Api
|
||||||
public string Id { get; set; }
|
public string Id { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[Route("/Videos/{Id}/Subtitle/{Index}", "GET")]
|
||||||
|
[Api(Description = "Gets an external subtitle file")]
|
||||||
|
public class GetSubtitle
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Gets or sets the id.
|
||||||
|
/// </summary>
|
||||||
|
/// <value>The id.</value>
|
||||||
|
[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; }
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Class GetCriticReviews
|
/// Class GetCriticReviews
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -240,6 +256,25 @@ namespace MediaBrowser.Api
|
||||||
return ToStaticFileResult(item.Path);
|
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);
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets the specified request.
|
/// Gets the specified request.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
|
@ -218,6 +218,11 @@ namespace MediaBrowser.Common.Net
|
||||||
return "image/svg+xml";
|
return "image/svg+xml";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (ext.Equals(".srt", StringComparison.OrdinalIgnoreCase))
|
||||||
|
{
|
||||||
|
return "text/plain";
|
||||||
|
}
|
||||||
|
|
||||||
throw new ArgumentException("Argument not supported: " + path);
|
throw new ArgumentException("Argument not supported: " + path);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -139,7 +139,7 @@ namespace MediaBrowser.Server.Implementations.Roku
|
||||||
|
|
||||||
return _httpClient.Post(new HttpRequestOptions
|
return _httpClient.Post(new HttpRequestOptions
|
||||||
{
|
{
|
||||||
Url = "mb/remotecontrol",
|
Url = "http://" + Session.RemoteEndPoint + "/mb/remotecontrol",
|
||||||
CancellationToken = cancellationToken,
|
CancellationToken = cancellationToken,
|
||||||
RequestContent = json,
|
RequestContent = json,
|
||||||
RequestContentType = "application/json"
|
RequestContentType = "application/json"
|
||||||
|
|
|
@ -474,7 +474,8 @@ namespace MediaBrowser.WebDashboard.Api
|
||||||
"advancedconfigurationpage.js",
|
"advancedconfigurationpage.js",
|
||||||
"advancedmetadataconfigurationpage.js",
|
"advancedmetadataconfigurationpage.js",
|
||||||
"boxsets.js",
|
"boxsets.js",
|
||||||
"clientsettings.js",
|
"appsplayback.js",
|
||||||
|
"appsweather.js",
|
||||||
"dashboardpage.js",
|
"dashboardpage.js",
|
||||||
"directorybrowser.js",
|
"directorybrowser.js",
|
||||||
"edititemmetadata.js",
|
"edititemmetadata.js",
|
||||||
|
|
|
@ -85,6 +85,9 @@
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<EmbeddedResource Include="ApiClient.js" />
|
<EmbeddedResource Include="ApiClient.js" />
|
||||||
|
<Content Include="dashboard-ui\appsplayback.html">
|
||||||
|
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||||
|
</Content>
|
||||||
<Content Include="dashboard-ui\css\icons.css">
|
<Content Include="dashboard-ui\css\icons.css">
|
||||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||||
</Content>
|
</Content>
|
||||||
|
@ -406,6 +409,9 @@
|
||||||
<Content Include="dashboard-ui\livetvrecordings.html">
|
<Content Include="dashboard-ui\livetvrecordings.html">
|
||||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||||
</Content>
|
</Content>
|
||||||
|
<Content Include="dashboard-ui\scripts\appsplayback.js">
|
||||||
|
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||||
|
</Content>
|
||||||
<Content Include="dashboard-ui\scripts\livetvchannel.js">
|
<Content Include="dashboard-ui\scripts\livetvchannel.js">
|
||||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||||
</Content>
|
</Content>
|
||||||
|
@ -1415,7 +1421,7 @@
|
||||||
</Content>
|
</Content>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Content Include="dashboard-ui\clientsettings.html">
|
<Content Include="dashboard-ui\appsweather.html">
|
||||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||||
</Content>
|
</Content>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
@ -1486,7 +1492,7 @@
|
||||||
</Content>
|
</Content>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Content Include="dashboard-ui\scripts\clientsettings.js">
|
<Content Include="dashboard-ui\scripts\appsweather.js">
|
||||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||||
</Content>
|
</Content>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
Loading…
Reference in New Issue
Block a user