mirror of
https://github.com/jellyfin/jellyfin.git
synced 2024-07-11 00:01:05 +02:00
updated nuget
This commit is contained in:
parent
11de8dde82
commit
889ce81d03
|
@ -178,6 +178,16 @@ namespace MediaBrowser.Api.DefaultTheme
|
||||||
.Take(3)
|
.Take(3)
|
||||||
.ToArray();
|
.ToArray();
|
||||||
|
|
||||||
|
var romanceGenres = new[] { "romance" }.ToDictionary(i => i, StringComparer.OrdinalIgnoreCase);
|
||||||
|
|
||||||
|
view.RomanticItems = moviesWithBackdrops
|
||||||
|
.Where(i => i.Genres.Any(romanceGenres.ContainsKey))
|
||||||
|
.OrderBy(i => Guid.NewGuid())
|
||||||
|
.Select(i => GetItemStub(i, ImageType.Backdrop))
|
||||||
|
.Where(i => i != null)
|
||||||
|
.Take(3)
|
||||||
|
.ToArray();
|
||||||
|
|
||||||
view.HDItems = hdMovies
|
view.HDItems = hdMovies
|
||||||
.Where(i => i.BackdropImagePaths.Count > 0)
|
.Where(i => i.BackdropImagePaths.Count > 0)
|
||||||
.OrderBy(i => Guid.NewGuid())
|
.OrderBy(i => Guid.NewGuid())
|
||||||
|
@ -284,7 +294,8 @@ namespace MediaBrowser.Api.DefaultTheme
|
||||||
var stub = new ItemStub
|
var stub = new ItemStub
|
||||||
{
|
{
|
||||||
Id = _dtoService.GetDtoId(item),
|
Id = _dtoService.GetDtoId(item),
|
||||||
Name = item.Name
|
Name = item.Name,
|
||||||
|
ImageType = imageType
|
||||||
};
|
};
|
||||||
|
|
||||||
var imageManager = Kernel.Instance.ImageManager;
|
var imageManager = Kernel.Instance.ImageManager;
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
using System;
|
using MediaBrowser.Model.Entities;
|
||||||
|
using System;
|
||||||
|
|
||||||
namespace MediaBrowser.Api.DefaultTheme
|
namespace MediaBrowser.Api.DefaultTheme
|
||||||
{
|
{
|
||||||
|
@ -7,5 +8,6 @@ namespace MediaBrowser.Api.DefaultTheme
|
||||||
public string Name { get; set; }
|
public string Name { get; set; }
|
||||||
public string Id { get; set; }
|
public string Id { get; set; }
|
||||||
public Guid ImageTag { get; set; }
|
public Guid ImageTag { get; set; }
|
||||||
|
public ImageType ImageType { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -15,6 +15,8 @@ namespace MediaBrowser.Api.DefaultTheme
|
||||||
|
|
||||||
public ItemStub[] FamilyMovies { get; set; }
|
public ItemStub[] FamilyMovies { get; set; }
|
||||||
|
|
||||||
|
public ItemStub[] RomanticItems { get; set; }
|
||||||
|
|
||||||
public double FamilyMoviePercentage { get; set; }
|
public double FamilyMoviePercentage { get; set; }
|
||||||
|
|
||||||
public double HDMoviePercentage { get; set; }
|
public double HDMoviePercentage { get; set; }
|
||||||
|
|
|
@ -149,7 +149,7 @@ namespace MediaBrowser.Common.Implementations
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <value>The installation manager.</value>
|
/// <value>The installation manager.</value>
|
||||||
protected IInstallationManager InstallationManager { get; set; }
|
protected IInstallationManager InstallationManager { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Initializes a new instance of the <see cref="BaseApplicationHost{TApplicationPathsType}"/> class.
|
/// Initializes a new instance of the <see cref="BaseApplicationHost{TApplicationPathsType}"/> class.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -186,7 +186,7 @@ namespace MediaBrowser.Common.Implementations
|
||||||
|
|
||||||
protected virtual void OnLoggerLoaded()
|
protected virtual void OnLoggerLoaded()
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -471,7 +471,7 @@ namespace MediaBrowser.Common.Implementations
|
||||||
{
|
{
|
||||||
ConfigureAutoRunAtStartup();
|
ConfigureAutoRunAtStartup();
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Configures the auto run at startup.
|
/// Configures the auto run at startup.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -480,7 +480,7 @@ namespace MediaBrowser.Common.Implementations
|
||||||
if (ConfigurationManager.CommonConfiguration.RunAtStartup)
|
if (ConfigurationManager.CommonConfiguration.RunAtStartup)
|
||||||
{
|
{
|
||||||
//Copy our shortut into the startup folder for this user
|
//Copy our shortut into the startup folder for this user
|
||||||
File.Copy(ProductShortcutPath, Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.Startup),Path.GetFileName(ProductShortcutPath) ?? "MBstartup.lnk"), true);
|
File.Copy(ProductShortcutPath, Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.Startup), Path.GetFileName(ProductShortcutPath) ?? "MBstartup.lnk"), true);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -566,36 +566,8 @@ namespace MediaBrowser.Common.Implementations
|
||||||
/// <param name="cancellationToken">The cancellation token.</param>
|
/// <param name="cancellationToken">The cancellation token.</param>
|
||||||
/// <param name="progress">The progress.</param>
|
/// <param name="progress">The progress.</param>
|
||||||
/// <returns>Task{CheckForUpdateResult}.</returns>
|
/// <returns>Task{CheckForUpdateResult}.</returns>
|
||||||
public async Task<CheckForUpdateResult> CheckForApplicationUpdate(CancellationToken cancellationToken,
|
public abstract Task<CheckForUpdateResult> CheckForApplicationUpdate(CancellationToken cancellationToken,
|
||||||
IProgress<double> progress)
|
IProgress<double> progress);
|
||||||
{
|
|
||||||
var result = await CheckForApplicationUpdateInternal(cancellationToken, progress).ConfigureAwait(false);
|
|
||||||
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Checks for application update internal.
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="cancellationToken">The cancellation token.</param>
|
|
||||||
/// <param name="progress">The progress.</param>
|
|
||||||
/// <returns>Task{CheckForUpdateResult}.</returns>
|
|
||||||
private async Task<CheckForUpdateResult> CheckForApplicationUpdateInternal(CancellationToken cancellationToken,
|
|
||||||
IProgress<double> progress)
|
|
||||||
{
|
|
||||||
var availablePackages = await InstallationManager.GetAvailablePackagesWithoutRegistrationInfo(cancellationToken).ConfigureAwait(false);
|
|
||||||
|
|
||||||
var version = InstallationManager.GetLatestCompatibleVersion(availablePackages, ApplicationUpdatePackageName, ConfigurationManager.CommonConfiguration.SystemUpdateLevel);
|
|
||||||
|
|
||||||
return version != null ? new CheckForUpdateResult { AvailableVersion = version.version, IsUpdateAvailable = version.version > ApplicationVersion, Package = version } :
|
|
||||||
new CheckForUpdateResult { AvailableVersion = ApplicationVersion, IsUpdateAvailable = false };
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Gets the name of the application update package.
|
|
||||||
/// </summary>
|
|
||||||
/// <value>The name of the application update package.</value>
|
|
||||||
protected abstract string ApplicationUpdatePackageName { get; }
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Updates the application.
|
/// Updates the application.
|
||||||
|
@ -604,18 +576,23 @@ namespace MediaBrowser.Common.Implementations
|
||||||
/// <param name="cancellationToken">The cancellation token.</param>
|
/// <param name="cancellationToken">The cancellation token.</param>
|
||||||
/// <param name="progress">The progress.</param>
|
/// <param name="progress">The progress.</param>
|
||||||
/// <returns>Task.</returns>
|
/// <returns>Task.</returns>
|
||||||
public async Task UpdateApplication(PackageVersionInfo package, CancellationToken cancellationToken, IProgress<double> progress)
|
public abstract Task UpdateApplication(PackageVersionInfo package, CancellationToken cancellationToken,
|
||||||
{
|
IProgress<double> progress);
|
||||||
await InstallationManager.InstallPackage(package, progress, cancellationToken).ConfigureAwait(false);
|
|
||||||
|
|
||||||
EventHelper.QueueEventIfNotNull(ApplicationUpdated, this, new GenericEventArgs<Version> { Argument = package.version }, Logger);
|
|
||||||
|
|
||||||
NotifyPendingRestart();
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Shuts down.
|
/// Shuts down.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public abstract void Shutdown();
|
public abstract void Shutdown();
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Called when [application updated].
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="newVersion">The new version.</param>
|
||||||
|
protected void OnApplicationUpdated(Version newVersion)
|
||||||
|
{
|
||||||
|
EventHelper.QueueEventIfNotNull(ApplicationUpdated, this, new GenericEventArgs<Version> { Argument = newVersion }, Logger);
|
||||||
|
|
||||||
|
NotifyPendingRestart();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -29,6 +29,7 @@ using MediaBrowser.IsoMounter;
|
||||||
using MediaBrowser.Model.IO;
|
using MediaBrowser.Model.IO;
|
||||||
using MediaBrowser.Model.MediaInfo;
|
using MediaBrowser.Model.MediaInfo;
|
||||||
using MediaBrowser.Model.System;
|
using MediaBrowser.Model.System;
|
||||||
|
using MediaBrowser.Model.Updates;
|
||||||
using MediaBrowser.Providers;
|
using MediaBrowser.Providers;
|
||||||
using MediaBrowser.Server.Implementations;
|
using MediaBrowser.Server.Implementations;
|
||||||
using MediaBrowser.Server.Implementations.BdInfo;
|
using MediaBrowser.Server.Implementations.BdInfo;
|
||||||
|
@ -687,11 +688,56 @@ namespace MediaBrowser.ServerApplication
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override string ApplicationUpdatePackageName
|
/// <summary>
|
||||||
|
/// Checks for update.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="cancellationToken">The cancellation token.</param>
|
||||||
|
/// <param name="progress">The progress.</param>
|
||||||
|
/// <returns>Task{CheckForUpdateResult}.</returns>
|
||||||
|
public override async Task<CheckForUpdateResult> CheckForApplicationUpdate(CancellationToken cancellationToken,
|
||||||
|
IProgress<double> progress)
|
||||||
{
|
{
|
||||||
get { return Constants.MbServerPkgName; }
|
var result = await CheckForApplicationUpdateInternal(cancellationToken, progress).ConfigureAwait(false);
|
||||||
|
|
||||||
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Checks for application update internal.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="cancellationToken">The cancellation token.</param>
|
||||||
|
/// <param name="progress">The progress.</param>
|
||||||
|
/// <returns>Task{CheckForUpdateResult}.</returns>
|
||||||
|
private async Task<CheckForUpdateResult> CheckForApplicationUpdateInternal(CancellationToken cancellationToken,
|
||||||
|
IProgress<double> progress)
|
||||||
|
{
|
||||||
|
var availablePackages = await InstallationManager.GetAvailablePackagesWithoutRegistrationInfo(cancellationToken).ConfigureAwait(false);
|
||||||
|
|
||||||
|
var version = InstallationManager.GetLatestCompatibleVersion(availablePackages, Constants.MbServerPkgName, ConfigurationManager.CommonConfiguration.SystemUpdateLevel);
|
||||||
|
|
||||||
|
return version != null ? new CheckForUpdateResult { AvailableVersion = version.version, IsUpdateAvailable = version.version > ApplicationVersion, Package = version } :
|
||||||
|
new CheckForUpdateResult { AvailableVersion = ApplicationVersion, IsUpdateAvailable = false };
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Updates the application.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="package">The package that contains the update</param>
|
||||||
|
/// <param name="cancellationToken">The cancellation token.</param>
|
||||||
|
/// <param name="progress">The progress.</param>
|
||||||
|
/// <returns>Task.</returns>
|
||||||
|
public override async Task UpdateApplication(PackageVersionInfo package, CancellationToken cancellationToken, IProgress<double> progress)
|
||||||
|
{
|
||||||
|
await InstallationManager.InstallPackage(package, progress, cancellationToken).ConfigureAwait(false);
|
||||||
|
|
||||||
|
OnApplicationUpdated(package.version);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the HTTP message handler.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="enableHttpCompression">if set to <c>true</c> [enable HTTP compression].</param>
|
||||||
|
/// <returns>HttpMessageHandler.</returns>
|
||||||
protected override HttpMessageHandler GetHttpMessageHandler(bool enableHttpCompression)
|
protected override HttpMessageHandler GetHttpMessageHandler(bool enableHttpCompression)
|
||||||
{
|
{
|
||||||
return new WebRequestHandler
|
return new WebRequestHandler
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
<package xmlns="http://schemas.microsoft.com/packaging/2011/08/nuspec.xsd">
|
<package xmlns="http://schemas.microsoft.com/packaging/2011/08/nuspec.xsd">
|
||||||
<metadata>
|
<metadata>
|
||||||
<id>MediaBrowser.Common.Internal</id>
|
<id>MediaBrowser.Common.Internal</id>
|
||||||
<version>3.0.198</version>
|
<version>3.0.199</version>
|
||||||
<title>MediaBrowser.Common.Internal</title>
|
<title>MediaBrowser.Common.Internal</title>
|
||||||
<authors>Luke</authors>
|
<authors>Luke</authors>
|
||||||
<owners>ebr,Luke,scottisafool</owners>
|
<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>
|
<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>
|
<copyright>Copyright © Media Browser 2013</copyright>
|
||||||
<dependencies>
|
<dependencies>
|
||||||
<dependency id="MediaBrowser.Common" version="3.0.198" />
|
<dependency id="MediaBrowser.Common" version="3.0.199" />
|
||||||
<dependency id="NLog" version="2.0.1.2" />
|
<dependency id="NLog" version="2.0.1.2" />
|
||||||
<dependency id="ServiceStack.Text" version="3.9.58" />
|
<dependency id="ServiceStack.Text" version="3.9.58" />
|
||||||
<dependency id="SimpleInjector" version="2.3.2" />
|
<dependency id="SimpleInjector" version="2.3.2" />
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
<package xmlns="http://schemas.microsoft.com/packaging/2011/08/nuspec.xsd">
|
<package xmlns="http://schemas.microsoft.com/packaging/2011/08/nuspec.xsd">
|
||||||
<metadata>
|
<metadata>
|
||||||
<id>MediaBrowser.Common</id>
|
<id>MediaBrowser.Common</id>
|
||||||
<version>3.0.198</version>
|
<version>3.0.199</version>
|
||||||
<title>MediaBrowser.Common</title>
|
<title>MediaBrowser.Common</title>
|
||||||
<authors>Media Browser Team</authors>
|
<authors>Media Browser Team</authors>
|
||||||
<owners>ebr,Luke,scottisafool</owners>
|
<owners>ebr,Luke,scottisafool</owners>
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
<package xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd">
|
<package xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd">
|
||||||
<metadata>
|
<metadata>
|
||||||
<id>MediaBrowser.Server.Core</id>
|
<id>MediaBrowser.Server.Core</id>
|
||||||
<version>3.0.198</version>
|
<version>3.0.199</version>
|
||||||
<title>Media Browser.Server.Core</title>
|
<title>Media Browser.Server.Core</title>
|
||||||
<authors>Media Browser Team</authors>
|
<authors>Media Browser Team</authors>
|
||||||
<owners>ebr,Luke,scottisafool</owners>
|
<owners>ebr,Luke,scottisafool</owners>
|
||||||
|
@ -12,7 +12,7 @@
|
||||||
<description>Contains core components required to build plugins for Media Browser Server.</description>
|
<description>Contains core components required to build plugins for Media Browser Server.</description>
|
||||||
<copyright>Copyright © Media Browser 2013</copyright>
|
<copyright>Copyright © Media Browser 2013</copyright>
|
||||||
<dependencies>
|
<dependencies>
|
||||||
<dependency id="MediaBrowser.Common" version="3.0.198" />
|
<dependency id="MediaBrowser.Common" version="3.0.199" />
|
||||||
</dependencies>
|
</dependencies>
|
||||||
</metadata>
|
</metadata>
|
||||||
<files>
|
<files>
|
||||||
|
|
Loading…
Reference in a new issue