The Free Software Media System - Server Backend & API
updated ffmpeg
Luke Pulverenti4d4ea6e42c39
diff --git a/MediaBrowser.Api/UserLibrary/ItemsService.cs b/MediaBrowser.Api/UserLibrary/ItemsService.csindex a7f76b2f2b..464f4ba1ae 100644--- a/MediaBrowser.Api/UserLibrary/ItemsService.cs+++ b/MediaBrowser.Api/UserLibrary/ItemsService.cs@@ -49,17 +49,17 @@ namespace MediaBrowser.Api.UserLibrary/// Limit results to items containing specific genres/// </summary>/// <value>The genres.</value>- [ApiMember(Name = "Genres", Description = "Optional. If specified, results will be filtered based on genre. This allows multiple, comma delimeted.", IsRequired = false, DataType = "string", ParameterType = "query", Verb = "GET", AllowMultiple = true)]+ [ApiMember(Name = "Genres", Description = "Optional. If specified, results will be filtered based on genre. This allows multiple, pipe delimeted.", IsRequired = false, DataType = "string", ParameterType = "query", Verb = "GET", AllowMultiple = true)]public string Genres { get; set; }- [ApiMember(Name = "AllGenres", Description = "Optional. If specified, results will be filtered based on genre. This allows multiple, comma delimeted.", IsRequired = false, DataType = "string", ParameterType = "query", Verb = "GET", AllowMultiple = true)]+ [ApiMember(Name = "AllGenres", Description = "Optional. If specified, results will be filtered based on genre. This allows multiple, pipe delimeted.", IsRequired = false, DataType = "string", ParameterType = "query", Verb = "GET", AllowMultiple = true)]public string AllGenres { get; set; }/// <summary>/// Limit results to items containing specific studios/// </summary>/// <value>The studios.</value>- [ApiMember(Name = "Studios", Description = "Optional. If specified, results will be filtered based on studio. This allows multiple, comma delimeted.", IsRequired = false, DataType = "string", ParameterType = "query", Verb = "GET", AllowMultiple = true)]+ [ApiMember(Name = "Studios", Description = "Optional. If specified, results will be filtered based on studio. This allows multiple, pipe delimeted.", IsRequired = false, DataType = "string", ParameterType = "query", Verb = "GET", AllowMultiple = true)]public string Studios { get; set; }/// <summary>@@ -805,21 +805,21 @@ namespace MediaBrowser.Api.UserLibrary// Apply genre filterif (!string.IsNullOrEmpty(request.Genres)){- var vals = request.Genres.Split(',');+ var vals = request.Genres.Split('|');items = items.Where(f => vals.Any(v => f.Genres.Contains(v, StringComparer.OrdinalIgnoreCase)));}// Apply genre filterif (!string.IsNullOrEmpty(request.AllGenres)){- var vals = request.AllGenres.Split(',');+ var vals = request.AllGenres.Split('|');items = items.Where(f => vals.All(v => f.Genres.Contains(v, StringComparer.OrdinalIgnoreCase)));}// Apply studio filterif (!string.IsNullOrEmpty(request.Studios)){- var vals = request.Studios.Split(',');+ var vals = request.Studios.Split('|');items = items.Where(f => vals.Any(v => f.Studios.Contains(v, StringComparer.OrdinalIgnoreCase)));}diff --git a/MediaBrowser.Controller/LiveTv/ILiveTvService.cs b/MediaBrowser.Controller/LiveTv/ILiveTvService.csindex 491e8cbf80..1e535139ce 100644--- a/MediaBrowser.Controller/LiveTv/ILiveTvService.cs+++ b/MediaBrowser.Controller/LiveTv/ILiveTvService.cs@@ -154,5 +154,13 @@ namespace MediaBrowser.Controller.LiveTv/// <param name="cancellationToken">The cancellation token.</param>/// <returns>Task{Stream}.</returns>Task<LiveStreamInfo> GetChannelStream(string channelId, CancellationToken cancellationToken);++ /// <summary>+ /// Closes the live stream.+ /// </summary>+ /// <param name="id">The identifier.</param>+ /// <param name="cancellationToken">The cancellation token.</param>+ /// <returns>Task.</returns>+ Task CloseLiveStream(string id, CancellationToken cancellationToken);}}diff --git a/MediaBrowser.Controller/LiveTv/LiveStreamInfo.cs b/MediaBrowser.Controller/LiveTv/LiveStreamInfo.csindex ba480f6852..8e1f94178d 100644--- a/MediaBrowser.Controller/LiveTv/LiveStreamInfo.cs+++ b/MediaBrowser.Controller/LiveTv/LiveStreamInfo.cs@@ -14,5 +14,11 @@ namespace MediaBrowser.Controller.LiveTv/// </summary>/// <value>The URL.</value>public string Url { get; set; }++ /// <summary>+ /// Gets or sets the identifier.+ /// </summary>+ /// <value>The identifier.</value>+ public string Id { get; set; }}}diff --git a/MediaBrowser.Model/Web/QueryStringDictionary.cs b/MediaBrowser.Model/Web/QueryStringDictionary.csindex f6c07c2f42..905fbb2151 100644--- a/MediaBrowser.Model/Web/QueryStringDictionary.cs+++ b/MediaBrowser.Model/Web/QueryStringDictionary.cs@@ -226,6 +226,39 @@ namespace MediaBrowser.Model.Web}}+ /// <summary>+ /// Adds the specified name.+ /// </summary>+ /// <param name="name">The name.</param>+ /// <param name="value">The value.</param>+ /// <param name="delimiter">The delimiter.</param>+ /// <exception cref="System.ArgumentNullException">value</exception>+ public void Add(string name, IEnumerable<string> value, string delimiter)+ {+ if (value == null)+ {+ throw new ArgumentNullException("value");+ }++ var paramValue = string.Join(delimiter, value.ToArray());++ Add(name, paramValue);+ }++ /// <summary>+ /// Adds if not null.+ /// </summary>+ /// <param name="name">The name.</param>+ /// <param name="value">The value.</param>+ /// <param name="delimiter">The delimiter.</param>+ public void AddIfNotNull(string name, IEnumerable<string> value, string delimiter)+ {+ if (value != null)+ {+ Add(name, value, delimiter);+ }+ }+/// <summary>/// Gets the query string./// </summary>diff --git a/MediaBrowser.Mono.userprefs b/MediaBrowser.Mono.userprefsindex e5d5fa75ed..6269e1b78c 100644--- a/MediaBrowser.Mono.userprefs+++ b/MediaBrowser.Mono.userprefs@@ -1,9 +1,8 @@<Properties><MonoDevelop.Ide.Workspace ActiveConfiguration="Release Mono" />- <MonoDevelop.Ide.Workbench ActiveDocument="MediaBrowser.Server.Mono\Networking\NetworkManager.cs">+ <MonoDevelop.Ide.Workbench ActiveDocument="MediaBrowser.Server.Mono\app.config"><Files><File FileName="MediaBrowser.Server.Mono\app.config" Line="1" Column="1" />- <File FileName="MediaBrowser.Server.Mono\Networking\NetworkManager.cs" Line="7" Column="26" /></Files></MonoDevelop.Ide.Workbench><MonoDevelop.Ide.DebuggingService.Breakpoints>diff --git a/MediaBrowser.Providers/MediaInfo/BaseFFProbeProvider.cs b/MediaBrowser.Providers/MediaInfo/BaseFFProbeProvider.csindex 0fdeddb499..31eae0c977 100644--- a/MediaBrowser.Providers/MediaInfo/BaseFFProbeProvider.cs+++ b/MediaBrowser.Providers/MediaInfo/BaseFFProbeProvider.cs@@ -78,7 +78,7 @@ namespace MediaBrowser.Providers.MediaInfo{get{- return MediaEncoder.Version;+ return "ffmpeg20131209";}}diff --git a/MediaBrowser.Server.Mono/FFMpeg/FFMpegDownloadInfo.cs b/MediaBrowser.Server.Mono/FFMpeg/FFMpegDownloadInfo.csdeleted file mode 100644index 7cb7278dcc..0000000000--- a/MediaBrowser.Server.Mono/FFMpeg/FFMpegDownloadInfo.cs+++ /dev/null@@ -1,57 +0,0 @@-using System;--namespace MediaBrowser.ServerApplication.FFMpeg-{- public static class FFMpegDownloadInfo- {- public static string Version = ffmpegOsType("Version");-- public static string[] FfMpegUrls = ffmpegOsType("FfMpegUrls").Split(',');-- public static string FFMpegFilename = ffmpegOsType("FFMpegFilename");- public static string FFProbeFilename = ffmpegOsType("FFProbeFilename");-- public static string ArchiveType = ffmpegOsType("ArchiveType");-- private static string ffmpegOsType(string arg)- {- OperatingSystem os = Environment.OSVersion;- PlatformID pid = os.Platform;- switch (pid)- {- case PlatformID.Win32NT:- switch (arg)- {- case "Version":- return "ffmpeg20131221";- case "FfMpegUrls":- return "http://ffmpeg.zeranoe.com/builds/win32/static/ffmpeg-20131221-git-70d6ce7-win32-static.7z,https://www.dropbox.com/s/d38uj7857trbw1g/ffmpeg-20131209-git-a12f679-win32-static.7z?dl=1";- case "FFMpegFilename":- return "ffmpeg.exe";- case "FFProbeFilename":- return "ffprobe.exe";- case "ArchiveType":- return "7z";- }- break;- case PlatformID.Unix:- case PlatformID.MacOSX:- switch (arg)- {- case "Version":- return "ffmpeg20131221";- case "FfMpegUrls":- return "http://ffmpeg.gusari.org/static/32bit/ffmpeg.static.32bit.2013-12-21.tar.gz,https://www.dropbox.com/s/b9v17h105cps7p0/ffmpeg.static.32bit.2013-10-11.tar.gz?dl=1";- case "FFMpegFilename":- return "ffmpeg";- case "FFProbeFilename":- return "ffprobe";- case "ArchiveType":- return "gz";- }- break;- }- return "";- }- }-}diff --git a/MediaBrowser.Server.Mono/MediaBrowser.Server.Mono.csproj b/MediaBrowser.Server.Mono/MediaBrowser.Server.Mono.csprojindex d373308216..cccc75c922 100644--- a/MediaBrowser.Server.Mono/MediaBrowser.Server.Mono.csproj+++ b/MediaBrowser.Server.Mono/MediaBrowser.Server.Mono.csproj@@ -22,7 +22,6 @@<WarningLevel>4</WarningLevel><PlatformTarget>x86</PlatformTarget><Externalconsole>true</Externalconsole>- <TargetFrameworkVersion>v4.5</TargetFrameworkVersion></PropertyGroup><PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' "><DebugType>full</DebugType>@@ -32,13 +31,11 @@<WarningLevel>4</WarningLevel><PlatformTarget>x86</PlatformTarget><Externalconsole>true</Externalconsole>- <TargetFrameworkVersion>v4.5</TargetFrameworkVersion></PropertyGroup><PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "><Optimize>false</Optimize><OutputPath>bin\Release</OutputPath><WarningLevel>4</WarningLevel>- <TargetFrameworkVersion>v4.5</TargetFrameworkVersion></PropertyGroup><PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release Mono|AnyCPU' "><Optimize>false</Optimize>@@ -50,7 +47,7 @@<Reference Include="ServiceStack.Interfaces"><HintPath>..\ThirdParty\ServiceStack\ServiceStack.Interfaces.dll</HintPath></Reference>- <Reference Include="Mono.Posix" Condition=" '$(ConfigurationName)' == 'Release Mono' "/>+ <Reference Include="Mono.Posix" Condition=" '$(ConfigurationName)' == 'Release Mono' " /></ItemGroup><ItemGroup><Compile Include="..\SharedVersion.cs">@@ -78,11 +75,13 @@<Compile Include="..\MediaBrowser.ServerApplication\FFMpeg\FFMpegDownloader.cs"><Link>FFMpeg\FFMpegDownloader.cs</Link></Compile>- <Compile Include="FFMpeg\FFMpegDownloadInfo.cs" /><Compile Include="IO\FileSystemFactory.cs" /><Compile Include="..\MediaBrowser.ServerApplication\EntryPoints\WanAddressEntryPoint.cs"><Link>EntryPoints\WanAddressEntryPoint.cs</Link></Compile>+ <Compile Include="..\MediaBrowser.ServerApplication\FFMpeg\FFMpegDownloadInfo.cs">+ <Link>FFMpeg\FFMpegDownloadInfo.cs</Link>+ </Compile></ItemGroup><Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" /><ItemGroup>diff --git a/MediaBrowser.ServerApplication/FFMpeg/FFMpegDownloadInfo.cs b/MediaBrowser.ServerApplication/FFMpeg/FFMpegDownloadInfo.csindex fc50df216f..596c9d2347 100644--- a/MediaBrowser.ServerApplication/FFMpeg/FFMpegDownloadInfo.cs+++ b/MediaBrowser.ServerApplication/FFMpeg/FFMpegDownloadInfo.cs@@ -1,19 +1,81 @@-+using System;+namespace MediaBrowser.ServerApplication.FFMpeg{public static class FFMpegDownloadInfo{- public static string Version = "ffmpeg20131209";+ // Windows builds: http://ffmpeg.zeranoe.com/builds/+ // Linux builds: http://ffmpeg.gusari.org/static/++ public static string Version = ffmpegOsType("Version");++ public static string[] FfMpegUrls = GetDownloadUrls();++ public static string FFMpegFilename = ffmpegOsType("FFMpegFilename");+ public static string FFProbeFilename = ffmpegOsType("FFProbeFilename");++ public static string ArchiveType = ffmpegOsType("ArchiveType");- public static string[] FfMpegUrls = new[]- {- "http://ffmpeg.zeranoe.com/builds/win32/static/ffmpeg-20131209-git-a12f679-win32-static.7z",- "https://www.dropbox.com/s/d38uj7857trbw1g/ffmpeg-20131209-git-a12f679-win32-static.7z?dl=1"- };+ private static string ffmpegOsType(string arg)+ {+ OperatingSystem os = Environment.OSVersion;+ PlatformID pid = os.Platform;+ switch (pid)+ {+ case PlatformID.Win32NT:+ switch (arg)+ {+ case "Version":+ return "20140105";+ case "FFMpegFilename":+ return "ffmpeg.exe";+ case "FFProbeFilename":+ return "ffprobe.exe";+ case "ArchiveType":+ return "7z";+ }+ break;+ case PlatformID.Unix:+ case PlatformID.MacOSX:+ switch (arg)+ {+ case "Version":+ return "20140104";+ case "FFMpegFilename":+ return "ffmpeg";+ case "FFProbeFilename":+ return "ffprobe";+ case "ArchiveType":+ return "gz";+ }+ break;+ }+ return "";+ }- public static string FFMpegFilename = "ffmpeg.exe";- public static string FFProbeFilename = "ffprobe.exe";+ private static string[] GetDownloadUrls()+ {+ var pid = Environment.OSVersion.Platform;++ switch (pid)+ {+ case PlatformID.Win32NT:+ return new[]+ {+ "http://ffmpeg.zeranoe.com/builds/win32/static/ffmpeg-20140105-git-70937d9-win32-static.7z",+ "https://www.dropbox.com/s/oghurnp5zh292ry/ffmpeg-20140105-git-70937d9-win32-static.7z?dl=1"+ };++ case PlatformID.Unix:+ case PlatformID.MacOSX:+ return new[]+ {+ "http://ffmpeg.gusari.org/static/32bit/ffmpeg.static.32bit.2014-01-04.tar.gz",+ "https://www.dropbox.com/s/b7nkg71sil812hp/ffmpeg.static.32bit.2014-01-04.tar.gz?dl=1"+ };+ }- public static string ArchiveType = "7z";+ return new string[] {};+ }}}diff --git a/MediaBrowser.WebDashboard/MediaBrowser.WebDashboard.csproj b/MediaBrowser.WebDashboard/MediaBrowser.WebDashboard.csprojindex e4a5ad047f..52c578b97c 100644--- a/MediaBrowser.WebDashboard/MediaBrowser.WebDashboard.csproj+++ b/MediaBrowser.WebDashboard/MediaBrowser.WebDashboard.csproj@@ -91,6 +91,15 @@<Content Include="dashboard-ui\css\icons.css"><CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory></Content>+ <Content Include="dashboard-ui\css\images\clients\amazon.png">+ <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>+ </Content>+ <Content Include="dashboard-ui\css\images\clients\mediaportal.png">+ <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>+ </Content>+ <Content Include="dashboard-ui\css\images\clients\playstore.png">+ <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>+ </Content><Content Include="dashboard-ui\css\images\clients\xbmc.png"><CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory></Content>