Renamed guid to id

This commit is contained in:
Greenback 2020-12-18 21:11:29 +00:00
parent 46a64deb66
commit cb793af30e
2 changed files with 9 additions and 9 deletions

View File

@ -235,7 +235,7 @@ namespace Emby.Server.Implementations.Updates
public IEnumerable<PackageInfo> FilterPackages(
IEnumerable<PackageInfo> availablePackages,
string? name = null,
Guid? guid = default,
Guid? id = default,
Version? specificVersion = null)
{
if (name != null)
@ -243,9 +243,9 @@ namespace Emby.Server.Implementations.Updates
availablePackages = availablePackages.Where(x => x.Name.Equals(name, StringComparison.OrdinalIgnoreCase));
}
if (guid != Guid.Empty)
if (id != Guid.Empty)
{
availablePackages = availablePackages.Where(x => Guid.Parse(x.Id) == guid);
availablePackages = availablePackages.Where(x => Guid.Parse(x.Id) == id);
}
if (specificVersion != null)
@ -260,11 +260,11 @@ namespace Emby.Server.Implementations.Updates
public IEnumerable<InstallationInfo> GetCompatibleVersions(
IEnumerable<PackageInfo> availablePackages,
string? name = null,
Guid? guid = default,
Guid? id = default,
Version? minVersion = null,
Version? specificVersion = null)
{
var package = FilterPackages(availablePackages, name, guid, specificVersion).FirstOrDefault();
var package = FilterPackages(availablePackages, name, id, specificVersion).FirstOrDefault();
// Package not found in repository
if (package == null)

View File

@ -41,14 +41,14 @@ namespace MediaBrowser.Common.Updates
/// </summary>
/// <param name="availablePackages">The available packages.</param>
/// <param name="name">The name of the plugin.</param>
/// <param name="guid">The id of the plugin.</param>
/// <param name="id">The id of the plugin.</param>
/// <param name="specificVersion">The version of the plugin.</param>
/// <returns>All plugins matching the requirements.</returns>
IEnumerable<PackageInfo> FilterPackages(
IEnumerable<PackageInfo> availablePackages,
string? name = null,
#pragma warning disable CA1720 // Identifier contains type name
Guid? guid = default,
Guid? id = default,
#pragma warning restore CA1720 // Identifier contains type name
Version? specificVersion = null);
@ -57,7 +57,7 @@ namespace MediaBrowser.Common.Updates
/// </summary>
/// <param name="availablePackages">The available packages.</param>
/// <param name="name">The name.</param>
/// <param name="guid">The guid of the plugin.</param>
/// <param name="id">The id of the plugin.</param>
/// <param name="minVersion">The minimum required version of the plugin.</param>
/// <param name="specificVersion">The specific version of the plugin to install.</param>
/// <returns>All compatible versions ordered from newest to oldest.</returns>
@ -65,7 +65,7 @@ namespace MediaBrowser.Common.Updates
IEnumerable<PackageInfo> availablePackages,
string? name = null,
#pragma warning disable CA1720 // Identifier contains type name
Guid? guid = default,
Guid? id = default,
#pragma warning restore CA1720 // Identifier contains type name
Version? minVersion = null,
Version? specificVersion = null);