diff options
| author | Luke Pulverenti <luke.pulverenti@gmail.com> | 2014-01-04 22:50:29 -0500 |
|---|---|---|
| committer | Luke Pulverenti <luke.pulverenti@gmail.com> | 2014-01-04 22:50:29 -0500 |
| commit | 4d4ea6e42c39c20a8d8b7767dcb1bd4dc00b1bb8 (patch) | |
| tree | 1c74d66fe1c7f3e94af50d454c203d26434d8878 | |
| parent | 2788d8d201afdfdb65074fe7d922f62ec5aaf94b (diff) | |
updated ffmpeg
10 files changed, 140 insertions, 81 deletions
diff --git a/MediaBrowser.Api/UserLibrary/ItemsService.cs b/MediaBrowser.Api/UserLibrary/ItemsService.cs index a7f76b2f2..464f4ba1a 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 filter if (!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 filter if (!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 filter if (!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.cs index 491e8cbf8..1e535139c 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.cs index ba480f685..8e1f94178 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.cs index f6c07c2f4..905fbb215 100644 --- a/MediaBrowser.Model/Web/QueryStringDictionary.cs +++ b/MediaBrowser.Model/Web/QueryStringDictionary.cs @@ -227,6 +227,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> /// <returns>System.String.</returns> diff --git a/MediaBrowser.Mono.userprefs b/MediaBrowser.Mono.userprefs index e5d5fa75e..6269e1b78 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.cs index 0fdeddb49..31eae0c97 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.cs deleted file mode 100644 index 7cb7278dc..000000000 --- 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.csproj index d37330821..cccc75c92 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.cs index fc50df216..596c9d234 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.csproj index e4a5ad047..52c578b97 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>
|
