channel fixes

This commit is contained in:
Luke Pulverenti 2014-06-18 01:16:00 -04:00
parent 645640baca
commit f8bfe596b4
9 changed files with 27 additions and 36 deletions

View File

@ -4,11 +4,9 @@ using MediaBrowser.Controller.Channels;
using MediaBrowser.Controller.Configuration; using MediaBrowser.Controller.Configuration;
using MediaBrowser.Controller.Dlna; using MediaBrowser.Controller.Dlna;
using MediaBrowser.Controller.Drawing; using MediaBrowser.Controller.Drawing;
using MediaBrowser.Controller.Dto;
using MediaBrowser.Controller.Library; using MediaBrowser.Controller.Library;
using MediaBrowser.Controller.LiveTv; using MediaBrowser.Controller.LiveTv;
using MediaBrowser.Controller.MediaEncoding; using MediaBrowser.Controller.MediaEncoding;
using MediaBrowser.Controller.Persistence;
using MediaBrowser.Model.IO; using MediaBrowser.Model.IO;
using ServiceStack; using ServiceStack;
using System.Collections.Generic; using System.Collections.Generic;
@ -18,25 +16,14 @@ namespace MediaBrowser.Api.Playback.Progressive
/// <summary> /// <summary>
/// Class GetAudioStream /// Class GetAudioStream
/// </summary> /// </summary>
[Route("/Audio/{Id}/stream.mp3", "GET", Summary = "Gets an audio stream")] [Route("/Audio/{Id}/stream.{Container}", "GET", Summary = "Gets an audio stream")]
[Route("/Audio/{Id}/stream.wma", "GET", Summary = "Gets an audio stream")]
[Route("/Audio/{Id}/stream.aac", "GET", Summary = "Gets an audio stream")]
[Route("/Audio/{Id}/stream.flac", "GET", Summary = "Gets an audio stream")]
[Route("/Audio/{Id}/stream.ogg", "GET", Summary = "Gets an audio stream")]
[Route("/Audio/{Id}/stream.oga", "GET", Summary = "Gets an audio stream")]
[Route("/Audio/{Id}/stream.webm", "GET", Summary = "Gets an audio stream")]
[Route("/Audio/{Id}/stream", "GET", Summary = "Gets an audio stream")] [Route("/Audio/{Id}/stream", "GET", Summary = "Gets an audio stream")]
[Route("/Audio/{Id}/stream.mp3", "HEAD", Summary = "Gets an audio stream")] [Route("/Audio/{Id}/stream.{Container}", "HEAD", Summary = "Gets an audio stream")]
[Route("/Audio/{Id}/stream.wma", "HEAD", Summary = "Gets an audio stream")]
[Route("/Audio/{Id}/stream.aac", "HEAD", Summary = "Gets an audio stream")]
[Route("/Audio/{Id}/stream.flac", "HEAD", Summary = "Gets an audio stream")]
[Route("/Audio/{Id}/stream.ogg", "HEAD", Summary = "Gets an audio stream")]
[Route("/Audio/{Id}/stream.oga", "HEAD", Summary = "Gets an audio stream")]
[Route("/Audio/{Id}/stream.webm", "HEAD", Summary = "Gets an audio stream")]
[Route("/Audio/{Id}/stream", "HEAD", Summary = "Gets an audio stream")] [Route("/Audio/{Id}/stream", "HEAD", Summary = "Gets an audio stream")]
public class GetAudioStream : StreamRequest public class GetAudioStream : StreamRequest
{ {
[ApiMember(Name = "Container", Description = "Container", IsRequired = true, DataType = "string", ParameterType = "path", Verb = "GET")]
public string Container { get; set; }
} }
/// <summary> /// <summary>

View File

@ -4,11 +4,9 @@ using MediaBrowser.Controller.Channels;
using MediaBrowser.Controller.Configuration; using MediaBrowser.Controller.Configuration;
using MediaBrowser.Controller.Dlna; using MediaBrowser.Controller.Dlna;
using MediaBrowser.Controller.Drawing; using MediaBrowser.Controller.Drawing;
using MediaBrowser.Controller.Dto;
using MediaBrowser.Controller.Library; using MediaBrowser.Controller.Library;
using MediaBrowser.Controller.LiveTv; using MediaBrowser.Controller.LiveTv;
using MediaBrowser.Controller.MediaEncoding; using MediaBrowser.Controller.MediaEncoding;
using MediaBrowser.Controller.Persistence;
using MediaBrowser.Model.IO; using MediaBrowser.Model.IO;
using ServiceStack; using ServiceStack;
using System; using System;
@ -29,6 +27,7 @@ namespace MediaBrowser.Api.Playback.Progressive
[Route("/Videos/{Id}/stream.m4v", "GET")] [Route("/Videos/{Id}/stream.m4v", "GET")]
[Route("/Videos/{Id}/stream.mkv", "GET")] [Route("/Videos/{Id}/stream.mkv", "GET")]
[Route("/Videos/{Id}/stream.mpeg", "GET")] [Route("/Videos/{Id}/stream.mpeg", "GET")]
[Route("/Videos/{Id}/stream.mpg", "GET")]
[Route("/Videos/{Id}/stream.avi", "GET")] [Route("/Videos/{Id}/stream.avi", "GET")]
[Route("/Videos/{Id}/stream.m2ts", "GET")] [Route("/Videos/{Id}/stream.m2ts", "GET")]
[Route("/Videos/{Id}/stream.3gp", "GET")] [Route("/Videos/{Id}/stream.3gp", "GET")]
@ -44,6 +43,7 @@ namespace MediaBrowser.Api.Playback.Progressive
[Route("/Videos/{Id}/stream.m4v", "HEAD")] [Route("/Videos/{Id}/stream.m4v", "HEAD")]
[Route("/Videos/{Id}/stream.mkv", "HEAD")] [Route("/Videos/{Id}/stream.mkv", "HEAD")]
[Route("/Videos/{Id}/stream.mpeg", "HEAD")] [Route("/Videos/{Id}/stream.mpeg", "HEAD")]
[Route("/Videos/{Id}/stream.mpg", "HEAD")]
[Route("/Videos/{Id}/stream.avi", "HEAD")] [Route("/Videos/{Id}/stream.avi", "HEAD")]
[Route("/Videos/{Id}/stream.3gp", "HEAD")] [Route("/Videos/{Id}/stream.3gp", "HEAD")]
[Route("/Videos/{Id}/stream.wmv", "HEAD")] [Route("/Videos/{Id}/stream.wmv", "HEAD")]

View File

@ -9,7 +9,6 @@ using System.Collections.Generic;
using System.IO; using System.IO;
using System.Threading; using System.Threading;
using System.Threading.Tasks; using System.Threading.Tasks;
using MediaBrowser.Model.Querying;
namespace MediaBrowser.Controller.Library namespace MediaBrowser.Controller.Library
{ {
@ -337,10 +336,10 @@ namespace MediaBrowser.Controller.Library
/// Gets the named folder. /// Gets the named folder.
/// </summary> /// </summary>
/// <param name="name">The name.</param> /// <param name="name">The name.</param>
/// <param name="type">The type.</param> /// <param name="viewType">Type of the view.</param>
/// <param name="sortName">Name of the sort.</param> /// <param name="sortName">Name of the sort.</param>
/// <param name="cancellationToken">The cancellation token.</param> /// <param name="cancellationToken">The cancellation token.</param>
/// <returns>Task{Folder}.</returns> /// <returns>Task{Folder}.</returns>
Task<UserView> GetNamedView(string name, string type, string sortName, CancellationToken cancellationToken); Task<UserView> GetNamedView(string name, string viewType, string sortName, CancellationToken cancellationToken);
} }
} }

View File

@ -542,8 +542,7 @@ namespace MediaBrowser.Server.Implementations.Channels
var totalCount = results.Length; var totalCount = results.Length;
IEnumerable<Tuple<IChannel, ChannelItemInfo>> items = results IEnumerable<Tuple<IChannel, ChannelItemInfo>> items = results
.SelectMany(i => i.Item2.Items.Select(m => new Tuple<IChannel, ChannelItemInfo>(i.Item1, m))) .SelectMany(i => i.Item2.Items.Select(m => new Tuple<IChannel, ChannelItemInfo>(i.Item1, m)));
.OrderBy(i => i.Item2.Name);
if (query.ContentTypes.Length > 0) if (query.ContentTypes.Length > 0)
{ {
@ -994,10 +993,9 @@ namespace MediaBrowser.Server.Implementations.Channels
item.ProductionYear = info.ProductionYear; item.ProductionYear = info.ProductionYear;
item.ProviderIds = info.ProviderIds; item.ProviderIds = info.ProviderIds;
if (info.DateCreated.HasValue) item.DateCreated = info.DateCreated.HasValue ?
{ info.DateCreated.Value :
item.DateCreated = info.DateCreated.Value; DateTime.UtcNow;
}
} }
var channelItem = (IChannelItem)item; var channelItem = (IChannelItem)item;

View File

@ -1,5 +1,4 @@
using MediaBrowser.Common.Configuration; using MediaBrowser.Common.Extensions;
using MediaBrowser.Common.Extensions;
using MediaBrowser.Common.IO; using MediaBrowser.Common.IO;
using MediaBrowser.Common.Progress; using MediaBrowser.Common.Progress;
using MediaBrowser.Common.ScheduledTasks; using MediaBrowser.Common.ScheduledTasks;

View File

@ -52,6 +52,9 @@
<SpecificVersion>False</SpecificVersion> <SpecificVersion>False</SpecificVersion>
<HintPath>..\packages\Mono.Nat.1.2.13.0\lib\net40\Mono.Nat.dll</HintPath> <HintPath>..\packages\Mono.Nat.1.2.13.0\lib\net40\Mono.Nat.dll</HintPath>
</Reference> </Reference>
<Reference Include="Nowin">
<HintPath>..\ThirdParty\Nowin\Nowin.dll</HintPath>
</Reference>
<Reference Include="ServiceStack.Api.Swagger"> <Reference Include="ServiceStack.Api.Swagger">
<HintPath>..\ThirdParty\ServiceStack\ServiceStack.Api.Swagger.dll</HintPath> <HintPath>..\ThirdParty\ServiceStack\ServiceStack.Api.Swagger.dll</HintPath>
</Reference> </Reference>

View File

@ -57,8 +57,9 @@
<Reference Include="ServiceStack.Interfaces"> <Reference Include="ServiceStack.Interfaces">
<HintPath>..\ThirdParty\ServiceStack\ServiceStack.Interfaces.dll</HintPath> <HintPath>..\ThirdParty\ServiceStack\ServiceStack.Interfaces.dll</HintPath>
</Reference> </Reference>
<Reference Include="WebMarkupMin.Core"> <Reference Include="WebMarkupMin.Core, Version=0.8.21.0, Culture=neutral, PublicKeyToken=99472178d266584b, processorArchitecture=MSIL">
<HintPath>..\packages\WebMarkupMin.Core.0.8.18\lib\net40\WebMarkupMin.Core.dll</HintPath> <SpecificVersion>False</SpecificVersion>
<HintPath>..\packages\WebMarkupMin.Core.0.8.21\lib\net40\WebMarkupMin.Core.dll</HintPath>
</Reference> </Reference>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
@ -2138,6 +2139,9 @@
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None> </None>
<None Include="packages.config" /> <None Include="packages.config" />
<None Include="WebMarkupMin.Configuration.xsd">
<SubType>Designer</SubType>
</None>
</ItemGroup> </ItemGroup>
<ItemGroup /> <ItemGroup />
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />

View File

@ -5,6 +5,8 @@
<section name="core" type="WebMarkupMin.Core.Configuration.CoreConfiguration, WebMarkupMin.Core" /> <section name="core" type="WebMarkupMin.Core.Configuration.CoreConfiguration, WebMarkupMin.Core" />
</sectionGroup> </sectionGroup>
</configSections> </configSections>
<webMarkupMin xmlns="http://tempuri.org/WebMarkupMin.Configuration.xsd"> <webMarkupMin xmlns="http://tempuri.org/WebMarkupMin.Configuration.xsd">
<core> <core>
<css> <css>
@ -26,5 +28,4 @@
</loggers> </loggers>
</logging> </logging>
</core> </core>
</webMarkupMin> </webMarkupMin></configuration>
</configuration>

View File

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<packages> <packages>
<package id="MediaBrowser.ApiClient.Javascript" version="3.0.249" targetFramework="net45" /> <package id="MediaBrowser.ApiClient.Javascript" version="3.0.249" targetFramework="net45" />
<package id="WebMarkupMin.Core" version="0.8.18" targetFramework="net45" /> <package id="WebMarkupMin.Core" version="0.8.21" targetFramework="net45" />
</packages> </packages>