aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuke Pulverenti <luke.pulverenti@gmail.com>2014-09-28 12:50:33 -0400
committerLuke Pulverenti <luke.pulverenti@gmail.com>2014-09-28 12:50:33 -0400
commitc05cb1dcb1bb51cadc6e413395f2adb63cbab6ad (patch)
tree1b376930053e5eaed96e24d4a8ea49c16ed419f2
parent3be25f8bfbe6286d47ab5cf400fac7673e284d61 (diff)
fix mac ffmpeg build
-rw-r--r--MediaBrowser.Common.Implementations/HttpClientManager/HttpClientManager.cs120
-rw-r--r--MediaBrowser.Common/Net/HttpRequestOptions.cs3
-rw-r--r--MediaBrowser.Model/Channels/ChannelQuery.cs4
-rw-r--r--MediaBrowser.Providers/Music/MusicBrainzAlbumProvider.cs29
-rw-r--r--MediaBrowser.Providers/Music/MusicBrainzArtistProvider.cs6
-rw-r--r--MediaBrowser.Providers/Omdb/OmdbProvider.cs4
-rw-r--r--MediaBrowser.Server.Implementations/Channels/ChannelPostScanTask.cs28
-rw-r--r--MediaBrowser.Server.Mono/Native/NativeApp.cs11
-rw-r--r--MediaBrowser.Server.Mono/Program.cs2
-rw-r--r--MediaBrowser.ServerApplication/ApplicationHost.cs21
-rw-r--r--MediaBrowser.ServerApplication/FFMpeg/FFMpegDownloadInfo.cs2
-rw-r--r--MediaBrowser.ServerApplication/MainStartup.cs2
-rw-r--r--MediaBrowser.ServerApplication/Native/NativeApp.cs27
-rw-r--r--Nuget/MediaBrowser.Common.Internal.nuspec4
-rw-r--r--Nuget/MediaBrowser.Common.nuspec2
-rw-r--r--Nuget/MediaBrowser.Model.Signed.nuspec2
-rw-r--r--Nuget/MediaBrowser.Server.Core.nuspec4
17 files changed, 196 insertions, 75 deletions
diff --git a/MediaBrowser.Common.Implementations/HttpClientManager/HttpClientManager.cs b/MediaBrowser.Common.Implementations/HttpClientManager/HttpClientManager.cs
index 5702af6d1..f761c0964 100644
--- a/MediaBrowser.Common.Implementations/HttpClientManager/HttpClientManager.cs
+++ b/MediaBrowser.Common.Implementations/HttpClientManager/HttpClientManager.cs
@@ -1,4 +1,5 @@
using MediaBrowser.Common.Configuration;
+using MediaBrowser.Common.Extensions;
using MediaBrowser.Common.IO;
using MediaBrowser.Common.Net;
using MediaBrowser.Model.Logging;
@@ -157,6 +158,20 @@ namespace MediaBrowser.Common.Implementations.HttpClientManager
}
/// <summary>
+ /// The _semaphoreLocks
+ /// </summary>
+ private readonly ConcurrentDictionary<string, SemaphoreSlim> _semaphoreLocks = new ConcurrentDictionary<string, SemaphoreSlim>(StringComparer.OrdinalIgnoreCase);
+ /// <summary>
+ /// Gets the lock.
+ /// </summary>
+ /// <param name="url">The filename.</param>
+ /// <returns>System.Object.</returns>
+ private SemaphoreSlim GetLock(string url)
+ {
+ return _semaphoreLocks.GetOrAdd(url, key => new SemaphoreSlim(1, 1));
+ }
+
+ /// <summary>
/// Gets the response internal.
/// </summary>
/// <param name="options">The options.</param>
@@ -216,6 +231,107 @@ namespace MediaBrowser.Common.Implementations.HttpClientManager
/// </exception>
public async Task<HttpResponseInfo> SendAsync(HttpRequestOptions options, string httpMethod)
{
+ if (!options.EnableUnconditionalCache)
+ {
+ return await SendAsyncInternal(options, httpMethod).ConfigureAwait(false);
+ }
+
+ var url = options.Url;
+ var urlHash = url.ToLower().GetMD5().ToString("N");
+ var semaphore = GetLock(url);
+
+ var responseCachePath = Path.Combine(_appPaths.CachePath, "httpclient", urlHash);
+
+ var response = await GetCachedResponse(responseCachePath, options.CacheLength, url).ConfigureAwait(false);
+ if (response != null)
+ {
+ return response;
+ }
+
+ await semaphore.WaitAsync(options.CancellationToken).ConfigureAwait(false);
+
+ try
+ {
+ response = await GetCachedResponse(responseCachePath, options.CacheLength, url).ConfigureAwait(false);
+ if (response != null)
+ {
+ return response;
+ }
+
+ response = await SendAsyncInternal(options, httpMethod).ConfigureAwait(false);
+
+ if (response.StatusCode == HttpStatusCode.OK)
+ {
+ await CacheResponse(response, responseCachePath).ConfigureAwait(false);
+ }
+
+ return response;
+ }
+ finally
+ {
+ semaphore.Release();
+ }
+ }
+
+ private async Task<HttpResponseInfo> GetCachedResponse(string responseCachePath, TimeSpan cacheLength, string url)
+ {
+ try
+ {
+ if (_fileSystem.GetLastWriteTimeUtc(responseCachePath).Add(cacheLength) > DateTime.UtcNow)
+ {
+ using (var stream = _fileSystem.GetFileStream(responseCachePath, FileMode.Open, FileAccess.Read, FileShare.Read, true))
+ {
+ var memoryStream = new MemoryStream();
+
+ await stream.CopyToAsync(memoryStream).ConfigureAwait(false);
+ memoryStream.Position = 0;
+
+ return new HttpResponseInfo
+ {
+ ResponseUrl = url,
+ Content = memoryStream,
+ StatusCode = HttpStatusCode.OK,
+ Headers = new NameValueCollection(),
+ ContentLength = memoryStream.Length
+ };
+ }
+ }
+ }
+ catch (FileNotFoundException)
+ {
+
+ }
+ catch (DirectoryNotFoundException)
+ {
+
+ }
+
+ return null;
+ }
+
+ private async Task CacheResponse(HttpResponseInfo response, string responseCachePath)
+ {
+ Directory.CreateDirectory(Path.GetDirectoryName(responseCachePath));
+
+ using (var responseStream = response.Content)
+ {
+ using (var fileStream = _fileSystem.GetFileStream(responseCachePath, FileMode.Create, FileAccess.Write, FileShare.Read, true))
+ {
+ var memoryStream = new MemoryStream();
+
+ await responseStream.CopyToAsync(memoryStream).ConfigureAwait(false);
+
+ memoryStream.Position = 0;
+ await memoryStream.CopyToAsync(fileStream).ConfigureAwait(false);
+
+ memoryStream.Position = 0;
+ response.Content = memoryStream;
+ }
+ }
+ }
+
+ private async Task<HttpResponseInfo> SendAsyncInternal(HttpRequestOptions options, string httpMethod)
+ {
ValidateParams(options);
options.CancellationToken.ThrowIfCancellationRequested();
@@ -236,11 +352,11 @@ namespace MediaBrowser.Common.Implementations.HttpClientManager
!string.IsNullOrEmpty(options.RequestContent) ||
string.Equals(httpMethod, "post", StringComparison.OrdinalIgnoreCase))
{
- var bytes = options.RequestContentBytes ??
+ var bytes = options.RequestContentBytes ??
Encoding.UTF8.GetBytes(options.RequestContent ?? string.Empty);
httpWebRequest.ContentType = options.RequestContentType ?? "application/x-www-form-urlencoded";
-
+
httpWebRequest.ContentLength = bytes.Length;
httpWebRequest.GetRequestStream().Write(bytes, 0, bytes.Length);
}
diff --git a/MediaBrowser.Common/Net/HttpRequestOptions.cs b/MediaBrowser.Common/Net/HttpRequestOptions.cs
index 97da49318..72c781096 100644
--- a/MediaBrowser.Common/Net/HttpRequestOptions.cs
+++ b/MediaBrowser.Common/Net/HttpRequestOptions.cs
@@ -91,6 +91,9 @@ namespace MediaBrowser.Common.Net
public bool LogErrorResponseBody { get; set; }
public bool EnableKeepAlive { get; set; }
+ public bool EnableUnconditionalCache { get; set; }
+ public TimeSpan CacheLength { get; set; }
+
private string GetHeaderValue(string name)
{
string value;
diff --git a/MediaBrowser.Model/Channels/ChannelQuery.cs b/MediaBrowser.Model/Channels/ChannelQuery.cs
index d1bf46433..cb61f358c 100644
--- a/MediaBrowser.Model/Channels/ChannelQuery.cs
+++ b/MediaBrowser.Model/Channels/ChannelQuery.cs
@@ -74,13 +74,15 @@ namespace MediaBrowser.Model.Channels
/// </summary>
/// <value>The extra types.</value>
public ExtraType[] ExtraTypes { get; set; }
-
+ public TrailerType[] TrailerTypes { get; set; }
+
public AllChannelMediaQuery()
{
ChannelIds = new string[] { };
ContentTypes = new ChannelMediaContentType[] { };
ExtraTypes = new ExtraType[] { };
+ TrailerTypes = new TrailerType[] { };
Filters = new ItemFilter[] { };
Fields = new List<ItemFields>();
diff --git a/MediaBrowser.Providers/Music/MusicBrainzAlbumProvider.cs b/MediaBrowser.Providers/Music/MusicBrainzAlbumProvider.cs
index 12ac30453..1521c323b 100644
--- a/MediaBrowser.Providers/Music/MusicBrainzAlbumProvider.cs
+++ b/MediaBrowser.Providers/Music/MusicBrainzAlbumProvider.cs
@@ -38,6 +38,7 @@ namespace MediaBrowser.Providers.Music
var releaseId = searchInfo.GetReleaseId();
string url = null;
+ var isNameSearch = false;
if (!string.IsNullOrEmpty(releaseId))
{
@@ -55,6 +56,8 @@ namespace MediaBrowser.Providers.Music
}
else
{
+ isNameSearch = true;
+
url = string.Format("http://www.musicbrainz.org/ws/2/release/?query=\"{0}\" AND artist:\"{1}\"",
WebUtility.UrlEncode(searchInfo.Name),
WebUtility.UrlEncode(searchInfo.GetAlbumArtist()));
@@ -63,7 +66,7 @@ namespace MediaBrowser.Providers.Music
if (!string.IsNullOrWhiteSpace(url))
{
- var doc = await GetMusicBrainzResponse(url, cancellationToken).ConfigureAwait(false);
+ var doc = await GetMusicBrainzResponse(url, isNameSearch, cancellationToken).ConfigureAwait(false);
return GetResultsFromResponse(doc);
}
@@ -193,7 +196,7 @@ namespace MediaBrowser.Providers.Music
WebUtility.UrlEncode(albumName),
artistId);
- var doc = await GetMusicBrainzResponse(url, cancellationToken).ConfigureAwait(false);
+ var doc = await GetMusicBrainzResponse(url, true, cancellationToken).ConfigureAwait(false);
return GetReleaseResult(doc);
}
@@ -204,7 +207,7 @@ namespace MediaBrowser.Providers.Music
WebUtility.UrlEncode(albumName),
WebUtility.UrlEncode(artistName));
- var doc = await GetMusicBrainzResponse(url, cancellationToken).ConfigureAwait(false);
+ var doc = await GetMusicBrainzResponse(url, true, cancellationToken).ConfigureAwait(false);
return GetReleaseResult(doc);
}
@@ -252,7 +255,7 @@ namespace MediaBrowser.Providers.Music
{
var url = string.Format("http://www.musicbrainz.org/ws/2/release-group/?query=reid:{0}", releaseEntryId);
- var doc = await GetMusicBrainzResponse(url, cancellationToken).ConfigureAwait(false);
+ var doc = await GetMusicBrainzResponse(url, false, cancellationToken).ConfigureAwait(false);
var ns = new XmlNamespaceManager(doc.NameTable);
ns.AddNamespace("mb", "http://musicbrainz.org/ns/mmd-2.0#");
@@ -274,9 +277,10 @@ namespace MediaBrowser.Providers.Music
/// Gets the music brainz response.
/// </summary>
/// <param name="url">The URL.</param>
+ /// <param name="isSearch">if set to <c>true</c> [is search].</param>
/// <param name="cancellationToken">The cancellation token.</param>
/// <returns>Task{XmlDocument}.</returns>
- internal async Task<XmlDocument> GetMusicBrainzResponse(string url, CancellationToken cancellationToken)
+ internal async Task<XmlDocument> GetMusicBrainzResponse(string url, bool isSearch, CancellationToken cancellationToken)
{
await _musicBrainzResourcePool.WaitAsync(cancellationToken).ConfigureAwait(false);
@@ -294,15 +298,20 @@ namespace MediaBrowser.Providers.Music
var doc = new XmlDocument();
- var userAgent = _appHost.Name + "/" + _appHost.ApplicationVersion;
-
- using (var xml = await _httpClient.Get(new HttpRequestOptions
+ var options = new HttpRequestOptions
{
Url = url,
CancellationToken = cancellationToken,
- UserAgent = userAgent
+ UserAgent = _appHost.Name + "/" + _appHost.ApplicationVersion
+ };
+
+ if (!isSearch)
+ {
+ options.EnableUnconditionalCache = true;
+ options.CacheLength = TimeSpan.FromDays(7);
+ }
- }).ConfigureAwait(false))
+ using (var xml = await _httpClient.Get(options).ConfigureAwait(false))
{
using (var oReader = new StreamReader(xml, Encoding.UTF8))
{
diff --git a/MediaBrowser.Providers/Music/MusicBrainzArtistProvider.cs b/MediaBrowser.Providers/Music/MusicBrainzArtistProvider.cs
index 12a1bdd35..9741b772a 100644
--- a/MediaBrowser.Providers/Music/MusicBrainzArtistProvider.cs
+++ b/MediaBrowser.Providers/Music/MusicBrainzArtistProvider.cs
@@ -25,7 +25,7 @@ namespace MediaBrowser.Providers.Music
{
var url = string.Format("http://www.musicbrainz.org/ws/2/artist/?query=arid:{0}", musicBrainzId);
- var doc = await MusicBrainzAlbumProvider.Current.GetMusicBrainzResponse(url, cancellationToken)
+ var doc = await MusicBrainzAlbumProvider.Current.GetMusicBrainzResponse(url, false, cancellationToken)
.ConfigureAwait(false);
return GetResultsFromResponse(doc);
@@ -37,7 +37,7 @@ namespace MediaBrowser.Providers.Music
var url = String.Format("http://www.musicbrainz.org/ws/2/artist/?query=artist:\"{0}\"", UrlEncode(nameToSearch));
- var doc = await MusicBrainzAlbumProvider.Current.GetMusicBrainzResponse(url, cancellationToken).ConfigureAwait(false);
+ var doc = await MusicBrainzAlbumProvider.Current.GetMusicBrainzResponse(url, true, cancellationToken).ConfigureAwait(false);
var results = GetResultsFromResponse(doc).ToList();
@@ -51,7 +51,7 @@ namespace MediaBrowser.Providers.Music
// Try again using the search with accent characters url
url = String.Format("http://www.musicbrainz.org/ws/2/artist/?query=artistaccent:\"{0}\"", UrlEncode(nameToSearch));
- doc = await MusicBrainzAlbumProvider.Current.GetMusicBrainzResponse(url, cancellationToken).ConfigureAwait(false);
+ doc = await MusicBrainzAlbumProvider.Current.GetMusicBrainzResponse(url, true, cancellationToken).ConfigureAwait(false);
return GetResultsFromResponse(doc);
}
diff --git a/MediaBrowser.Providers/Omdb/OmdbProvider.cs b/MediaBrowser.Providers/Omdb/OmdbProvider.cs
index 2dc3245f3..278061158 100644
--- a/MediaBrowser.Providers/Omdb/OmdbProvider.cs
+++ b/MediaBrowser.Providers/Omdb/OmdbProvider.cs
@@ -37,7 +37,9 @@ namespace MediaBrowser.Providers.Omdb
{
Url = url,
ResourcePool = ResourcePool,
- CancellationToken = cancellationToken
+ CancellationToken = cancellationToken,
+ EnableUnconditionalCache = true,
+ CacheLength = TimeSpan.FromDays(7)
}).ConfigureAwait(false))
{
diff --git a/MediaBrowser.Server.Implementations/Channels/ChannelPostScanTask.cs b/MediaBrowser.Server.Implementations/Channels/ChannelPostScanTask.cs
index 9806aab4a..6df12e669 100644
--- a/MediaBrowser.Server.Implementations/Channels/ChannelPostScanTask.cs
+++ b/MediaBrowser.Server.Implementations/Channels/ChannelPostScanTask.cs
@@ -1,10 +1,10 @@
-using System.Collections.Generic;
-using MediaBrowser.Common.Progress;
+using MediaBrowser.Common.Progress;
using MediaBrowser.Controller.Channels;
using MediaBrowser.Controller.Library;
using MediaBrowser.Model.Channels;
using MediaBrowser.Model.Logging;
using System;
+using System.Collections.Generic;
using System.Linq;
using System.Threading;
using System.Threading.Tasks;
@@ -61,6 +61,7 @@ namespace MediaBrowser.Server.Implementations.Channels
}, cancellationToken);
var numComplete = 0;
+ var numItems = channels.Items.Length;
foreach (var channel in channels.Items)
{
@@ -71,9 +72,20 @@ namespace MediaBrowser.Server.Implementations.Channels
const int currentRefreshLevel = 1;
var maxRefreshLevel = features.AutoRefreshLevels ?? 1;
+ var innerProgress = new ActionableProgress<double>();
+
+ var startingNumberComplete = numComplete;
+ innerProgress.RegisterAction(p =>
+ {
+ double innerPercent = startingNumberComplete;
+ innerPercent += (p / 100);
+ innerPercent /= numItems;
+ progress.Report(innerPercent * 100);
+ });
+
try
{
- await GetAllItems(user, channelId, null, currentRefreshLevel, maxRefreshLevel, cancellationToken).ConfigureAwait(false);
+ await GetAllItems(user, channelId, null, currentRefreshLevel, maxRefreshLevel, innerProgress, cancellationToken).ConfigureAwait(false);
}
catch (Exception ex)
{
@@ -82,7 +94,7 @@ namespace MediaBrowser.Server.Implementations.Channels
numComplete++;
double percent = numComplete;
- percent /= channels.Items.Length;
+ percent /= numItems;
progress.Report(percent * 100);
}
@@ -90,7 +102,7 @@ namespace MediaBrowser.Server.Implementations.Channels
}
- private async Task GetAllItems(string user, string channelId, string folderId, int currentRefreshLevel, int maxRefreshLevel, CancellationToken cancellationToken)
+ private async Task GetAllItems(string user, string channelId, string folderId, int currentRefreshLevel, int maxRefreshLevel, IProgress<double> progress, CancellationToken cancellationToken)
{
var folderItems = new List<string>();
@@ -119,7 +131,7 @@ namespace MediaBrowser.Server.Implementations.Channels
}, cancellationToken);
folderItems.AddRange(result.Items.Where(i => i.IsFolder).Select(i => i.Id.ToString("N")));
-
+
totalRetrieved += result.Items.Length;
totalCount = result.TotalRecordCount;
}
@@ -130,7 +142,9 @@ namespace MediaBrowser.Server.Implementations.Channels
{
try
{
- await GetAllItems(user, channelId, folder, currentRefreshLevel + 1, maxRefreshLevel, cancellationToken).ConfigureAwait(false);
+ var innerProgress = new Progress<double>();
+
+ await GetAllItems(user, channelId, folder, currentRefreshLevel + 1, maxRefreshLevel, innerProgress, cancellationToken).ConfigureAwait(false);
}
catch (Exception ex)
{
diff --git a/MediaBrowser.Server.Mono/Native/NativeApp.cs b/MediaBrowser.Server.Mono/Native/NativeApp.cs
index 1aa0f9004..f8e33e519 100644
--- a/MediaBrowser.Server.Mono/Native/NativeApp.cs
+++ b/MediaBrowser.Server.Mono/Native/NativeApp.cs
@@ -63,16 +63,5 @@ namespace MediaBrowser.ServerApplication.Native
{
}
-
- public static Task<CheckForUpdateResult> CheckForApplicationUpdate(Version currentVersion,
- PackageVersionClass updateLevel,
- IInstallationManager installationManager,
- CancellationToken cancellationToken,
- IProgress<double> progress)
- {
- var result = new CheckForUpdateResult { AvailableVersion = currentVersion.ToString(), IsUpdateAvailable = false };
-
- return Task.FromResult(result);
- }
}
}
diff --git a/MediaBrowser.Server.Mono/Program.cs b/MediaBrowser.Server.Mono/Program.cs
index d4d7b2b07..90c0729d3 100644
--- a/MediaBrowser.Server.Mono/Program.cs
+++ b/MediaBrowser.Server.Mono/Program.cs
@@ -123,7 +123,7 @@ namespace MediaBrowser.Server.Mono
// Allow all https requests
ServicePointManager.ServerCertificateValidationCallback = _ignoreCertificates;
- _appHost = new ApplicationHost(appPaths, logManager, false, false, options);
+ _appHost = new ApplicationHost(appPaths, logManager, false, false, options, "MBServer.Mono");
Console.WriteLine ("appHost.Init");
diff --git a/MediaBrowser.ServerApplication/ApplicationHost.cs b/MediaBrowser.ServerApplication/ApplicationHost.cs
index 471bc1a22..561940800 100644
--- a/MediaBrowser.ServerApplication/ApplicationHost.cs
+++ b/MediaBrowser.ServerApplication/ApplicationHost.cs
@@ -219,7 +219,8 @@ namespace MediaBrowser.ServerApplication
private ISyncRepository SyncRepository { get; set; }
private ITVSeriesManager TVSeriesManager { get; set; }
- private StartupOptions _startupOptions;
+ private readonly StartupOptions _startupOptions;
+ private readonly string _remotePackageName;
/// <summary>
/// Initializes a new instance of the <see cref="ApplicationHost" /> class.
@@ -229,14 +230,16 @@ namespace MediaBrowser.ServerApplication
/// <param name="supportsRunningAsService">if set to <c>true</c> [supports running as service].</param>
/// <param name="isRunningAsService">if set to <c>true</c> [is running as service].</param>
/// <param name="options">The options.</param>
+ /// <param name="remotePackageName">Name of the remote package.</param>
public ApplicationHost(ServerApplicationPaths applicationPaths,
ILogManager logManager,
bool supportsRunningAsService,
bool isRunningAsService,
- StartupOptions options)
+ StartupOptions options, string remotePackageName)
: base(applicationPaths, logManager)
{
_startupOptions = options;
+ _remotePackageName = remotePackageName;
_isRunningAsService = isRunningAsService;
SupportsRunningAsService = supportsRunningAsService;
}
@@ -1091,9 +1094,17 @@ namespace MediaBrowser.ServerApplication
/// <returns>Task{CheckForUpdateResult}.</returns>
public override async Task<CheckForUpdateResult> CheckForApplicationUpdate(CancellationToken cancellationToken, IProgress<double> progress)
{
- var result = await NativeApp.CheckForApplicationUpdate(ApplicationVersion,
- ConfigurationManager.CommonConfiguration.SystemUpdateLevel, InstallationManager,
- cancellationToken, progress).ConfigureAwait(false);
+ var availablePackages = await InstallationManager.GetAvailablePackagesWithoutRegistrationInfo(cancellationToken).ConfigureAwait(false);
+
+ var version = InstallationManager.GetLatestCompatibleVersion(availablePackages, _remotePackageName, null, ApplicationVersion, ConfigurationManager.CommonConfiguration.SystemUpdateLevel);
+
+ var versionObject = version == null || string.IsNullOrWhiteSpace(version.versionStr) ? null : new Version(version.versionStr);
+
+ var isUpdateAvailable = versionObject != null && versionObject > ApplicationVersion;
+
+ var result = versionObject != null ?
+ new CheckForUpdateResult { AvailableVersion = versionObject.ToString(), IsUpdateAvailable = isUpdateAvailable, Package = version } :
+ new CheckForUpdateResult { AvailableVersion = ApplicationVersion.ToString(), IsUpdateAvailable = false };
HasUpdateAvailable = result.IsUpdateAvailable;
diff --git a/MediaBrowser.ServerApplication/FFMpeg/FFMpegDownloadInfo.cs b/MediaBrowser.ServerApplication/FFMpeg/FFMpegDownloadInfo.cs
index dc20653d7..907067148 100644
--- a/MediaBrowser.ServerApplication/FFMpeg/FFMpegDownloadInfo.cs
+++ b/MediaBrowser.ServerApplication/FFMpeg/FFMpegDownloadInfo.cs
@@ -57,7 +57,7 @@ namespace MediaBrowser.ServerApplication.FFMpeg
case "FFProbeFilename":
return "ffprobe";
case "ArchiveType":
- return "gz";
+ return "7z";
}
}
if (PlatformDetection.IsX86)
diff --git a/MediaBrowser.ServerApplication/MainStartup.cs b/MediaBrowser.ServerApplication/MainStartup.cs
index 33529a31a..15fd7af74 100644
--- a/MediaBrowser.ServerApplication/MainStartup.cs
+++ b/MediaBrowser.ServerApplication/MainStartup.cs
@@ -209,7 +209,7 @@ namespace MediaBrowser.ServerApplication
/// <param name="options">The options.</param>
private static void RunApplication(ServerApplicationPaths appPaths, ILogManager logManager, bool runService, StartupOptions options)
{
- _appHost = new ApplicationHost(appPaths, logManager, true, runService, options);
+ _appHost = new ApplicationHost(appPaths, logManager, true, runService, options, "MBServer");
var initProgress = new Progress<double>();
diff --git a/MediaBrowser.ServerApplication/Native/NativeApp.cs b/MediaBrowser.ServerApplication/Native/NativeApp.cs
index 0e7dc50a9..2388b610b 100644
--- a/MediaBrowser.ServerApplication/Native/NativeApp.cs
+++ b/MediaBrowser.ServerApplication/Native/NativeApp.cs
@@ -1,10 +1,4 @@
-using System;
-using System.Runtime.InteropServices;
-using System.Threading;
-using System.Threading.Tasks;
-using MediaBrowser.Common.Updates;
-using MediaBrowser.Model.Logging;
-using MediaBrowser.Model.Updates;
+using System.Runtime.InteropServices;
namespace MediaBrowser.ServerApplication.Native
{
@@ -90,24 +84,5 @@ namespace MediaBrowser.ServerApplication.Native
EXECUTION_STATE es = SetThreadExecutionState(EXECUTION_STATE.ES_SYSTEM_REQUIRED);
}
}
-
- public static async Task<CheckForUpdateResult> CheckForApplicationUpdate(Version currentVersion,
- PackageVersionClass updateLevel,
- IInstallationManager installationManager,
- CancellationToken cancellationToken,
- IProgress<double> progress)
- {
- var availablePackages = await installationManager.GetAvailablePackagesWithoutRegistrationInfo(cancellationToken).ConfigureAwait(false);
-
- var version = installationManager.GetLatestCompatibleVersion(availablePackages, "MBServer", null, currentVersion, updateLevel);
-
- var versionObject = version == null || string.IsNullOrWhiteSpace(version.versionStr) ? null : new Version(version.versionStr);
-
- var isUpdateAvailable = versionObject != null && versionObject > currentVersion;
-
- return versionObject != null ?
- new CheckForUpdateResult { AvailableVersion = versionObject.ToString(), IsUpdateAvailable = isUpdateAvailable, Package = version } :
- new CheckForUpdateResult { AvailableVersion = currentVersion.ToString(), IsUpdateAvailable = false };
- }
}
}
diff --git a/Nuget/MediaBrowser.Common.Internal.nuspec b/Nuget/MediaBrowser.Common.Internal.nuspec
index 7d4985c25..31c6024fc 100644
--- a/Nuget/MediaBrowser.Common.Internal.nuspec
+++ b/Nuget/MediaBrowser.Common.Internal.nuspec
@@ -2,7 +2,7 @@
<package xmlns="http://schemas.microsoft.com/packaging/2011/08/nuspec.xsd">
<metadata>
<id>MediaBrowser.Common.Internal</id>
- <version>3.0.443</version>
+ <version>3.0.445</version>
<title>MediaBrowser.Common.Internal</title>
<authors>Luke</authors>
<owners>ebr,Luke,scottisafool</owners>
@@ -12,7 +12,7 @@
<description>Contains common components shared by Media Browser Theater and Media Browser Server. Not intended for plugin developer consumption.</description>
<copyright>Copyright © Media Browser 2013</copyright>
<dependencies>
- <dependency id="MediaBrowser.Common" version="3.0.443" />
+ <dependency id="MediaBrowser.Common" version="3.0.445" />
<dependency id="NLog" version="3.1.0.0" />
<dependency id="SimpleInjector" version="2.5.2" />
<dependency id="sharpcompress" version="0.10.2" />
diff --git a/Nuget/MediaBrowser.Common.nuspec b/Nuget/MediaBrowser.Common.nuspec
index c5576d9cd..1c399bd6b 100644
--- a/Nuget/MediaBrowser.Common.nuspec
+++ b/Nuget/MediaBrowser.Common.nuspec
@@ -2,7 +2,7 @@
<package xmlns="http://schemas.microsoft.com/packaging/2011/08/nuspec.xsd">
<metadata>
<id>MediaBrowser.Common</id>
- <version>3.0.443</version>
+ <version>3.0.445</version>
<title>MediaBrowser.Common</title>
<authors>Media Browser Team</authors>
<owners>ebr,Luke,scottisafool</owners>
diff --git a/Nuget/MediaBrowser.Model.Signed.nuspec b/Nuget/MediaBrowser.Model.Signed.nuspec
index 77edd0e97..24be0398f 100644
--- a/Nuget/MediaBrowser.Model.Signed.nuspec
+++ b/Nuget/MediaBrowser.Model.Signed.nuspec
@@ -2,7 +2,7 @@
<package xmlns="http://schemas.microsoft.com/packaging/2011/08/nuspec.xsd">
<metadata>
<id>MediaBrowser.Model.Signed</id>
- <version>3.0.443</version>
+ <version>3.0.445</version>
<title>MediaBrowser.Model - Signed Edition</title>
<authors>Media Browser Team</authors>
<owners>ebr,Luke,scottisafool</owners>
diff --git a/Nuget/MediaBrowser.Server.Core.nuspec b/Nuget/MediaBrowser.Server.Core.nuspec
index 585e089ac..8f850759e 100644
--- a/Nuget/MediaBrowser.Server.Core.nuspec
+++ b/Nuget/MediaBrowser.Server.Core.nuspec
@@ -2,7 +2,7 @@
<package xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd">
<metadata>
<id>MediaBrowser.Server.Core</id>
- <version>3.0.443</version>
+ <version>3.0.445</version>
<title>Media Browser.Server.Core</title>
<authors>Media Browser Team</authors>
<owners>ebr,Luke,scottisafool</owners>
@@ -12,7 +12,7 @@
<description>Contains core components required to build plugins for Media Browser Server.</description>
<copyright>Copyright © Media Browser 2013</copyright>
<dependencies>
- <dependency id="MediaBrowser.Common" version="3.0.443" />
+ <dependency id="MediaBrowser.Common" version="3.0.445" />
</dependencies>
</metadata>
<files>