mirror of
https://github.com/jellyfin/jellyfin.git
synced 2024-09-07 06:17:14 -04:00
Fix PR issues
This commit is contained in:
parent
d529f81cd9
commit
81c135c5bb
@ -146,21 +146,23 @@ namespace Emby.Server.Implementations.Updates
|
|||||||
return availablePackages;
|
return availablePackages;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <inheridoc />
|
/// <inheritdoc />
|
||||||
public IEnumerable<PackageVersionInfo> GetCompatibleVersions(
|
public IEnumerable<PackageVersionInfo> GetCompatibleVersions(
|
||||||
IEnumerable<PackageVersionInfo> availableVersions,
|
IEnumerable<PackageVersionInfo> availableVersions,
|
||||||
Version minVersion = null,
|
Version minVersion = null,
|
||||||
PackageVersionClass classification = PackageVersionClass.Release)
|
PackageVersionClass classification = PackageVersionClass.Release)
|
||||||
{
|
{
|
||||||
var appVer = _applicationHost.ApplicationVersion;
|
var appVer = _applicationHost.ApplicationVersion;
|
||||||
availableVersions = availableVersions.Where(x => Version.Parse(x.requiredVersionStr) <= appVer);
|
availableVersions = availableVersions
|
||||||
|
.Where(x => x.classification == classification
|
||||||
|
&& Version.Parse(x.requiredVersionStr) <= appVer);
|
||||||
|
|
||||||
if (minVersion != null)
|
if (minVersion != null)
|
||||||
{
|
{
|
||||||
availableVersions = availableVersions.Where(x => x.Version >= minVersion);
|
availableVersions = availableVersions.Where(x => x.Version >= minVersion);
|
||||||
}
|
}
|
||||||
|
|
||||||
return availableVersions;
|
return availableVersions.OrderByDescending(x => x.Version);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <inheritdoc />
|
/// <inheritdoc />
|
||||||
|
Loading…
Reference in New Issue
Block a user