Browse Source

channel fixes

Luke Pulverenti 11 years ago
parent
commit
f8bfe596b4

+ 4 - 17
MediaBrowser.Api/Playback/Progressive/AudioService.cs

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

+ 2 - 2
MediaBrowser.Api/Playback/Progressive/VideoService.cs

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

+ 2 - 3
MediaBrowser.Controller/Library/ILibraryManager.cs

@@ -9,7 +9,6 @@ using System.Collections.Generic;
 using System.IO;
 using System.Threading;
 using System.Threading.Tasks;
-using MediaBrowser.Model.Querying;
 
 namespace MediaBrowser.Controller.Library
 {
@@ -337,10 +336,10 @@ namespace MediaBrowser.Controller.Library
         /// Gets the named folder.
         /// </summary>
         /// <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="cancellationToken">The cancellation token.</param>
         /// <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);
     }
 }

+ 4 - 6
MediaBrowser.Server.Implementations/Channels/ChannelManager.cs

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

+ 1 - 2
MediaBrowser.Server.Implementations/Library/LibraryManager.cs

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

+ 3 - 0
MediaBrowser.Server.Implementations/MediaBrowser.Server.Implementations.csproj

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

+ 6 - 2
MediaBrowser.WebDashboard/MediaBrowser.WebDashboard.csproj

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

+ 4 - 3
MediaBrowser.WebDashboard/app.config

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

+ 1 - 1
MediaBrowser.WebDashboard/packages.config

@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>
 <packages>
   <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>