diff --git a/Emby.Server.Implementations/Updates/InstallationManager.cs b/Emby.Server.Implementations/Updates/InstallationManager.cs
index 09a5a0dca8..2705e0628b 100644
--- a/Emby.Server.Implementations/Updates/InstallationManager.cs
+++ b/Emby.Server.Implementations/Updates/InstallationManager.cs
@@ -141,8 +141,7 @@ namespace Emby.Server.Implementations.Updates
if (guid != Guid.Empty)
{
- var strGuid = guid.ToString("N", CultureInfo.InvariantCulture);
- availablePackages = availablePackages.Where(x => x.guid.Equals(strGuid, StringComparison.OrdinalIgnoreCase));
+ availablePackages = availablePackages.Where(x => Guid.Parse(x.guid) == guid);
}
return availablePackages;
diff --git a/MediaBrowser.Api/PackageService.cs b/MediaBrowser.Api/PackageService.cs
index b0333eb9ce..afc3e026a8 100644
--- a/MediaBrowser.Api/PackageService.cs
+++ b/MediaBrowser.Api/PackageService.cs
@@ -136,10 +136,11 @@ namespace MediaBrowser.Api
/// System.Object.
public object Get(GetPackage request)
{
- var packages = _installationManager.GetAvailablePackages().Result;
-
- var result = packages.FirstOrDefault(p => string.Equals(p.guid, request.AssemblyGuid ?? "none", StringComparison.OrdinalIgnoreCase))
- ?? packages.FirstOrDefault(p => p.name.Equals(request.Name, StringComparison.OrdinalIgnoreCase));
+ var packages = _installationManager.GetAvailablePackages().GetAwaiter().GetResult();
+ var result = _installationManager.FilterPackages(
+ packages,
+ request.Name,
+ string.IsNullOrEmpty(request.AssemblyGuid) ? default : Guid.Parse(request.AssemblyGuid)).FirstOrDefault();
return ToOptimizedResult(result);
}
@@ -184,7 +185,7 @@ namespace MediaBrowser.Api
var package = _installationManager.GetCompatibleVersions(
packages,
request.Name,
- new Guid(request.AssemblyGuid),
+ string.IsNullOrEmpty(request.AssemblyGuid) ? Guid.Empty : Guid.Parse(request.AssemblyGuid),
string.IsNullOrEmpty(request.Version) ? null : Version.Parse(request.Version),
request.UpdateClass).FirstOrDefault();
diff --git a/MediaBrowser.Api/UserLibrary/ItemsService.cs b/MediaBrowser.Api/UserLibrary/ItemsService.cs
index 81142b7289..c7b5051712 100644
--- a/MediaBrowser.Api/UserLibrary/ItemsService.cs
+++ b/MediaBrowser.Api/UserLibrary/ItemsService.cs
@@ -119,6 +119,7 @@ namespace MediaBrowser.Api.UserLibrary
var result = new QueryResult
{
+ StartIndex = request.StartIndex.GetValueOrDefault(),
TotalRecordCount = itemsResult.TotalRecordCount,
Items = returnItems
};
@@ -169,6 +170,7 @@ namespace MediaBrowser.Api.UserLibrary
return new QueryResult
{
+ StartIndex = request.StartIndex.GetValueOrDefault(),
TotalRecordCount = result.TotalRecordCount,
Items = dtoList
};
@@ -229,7 +231,8 @@ namespace MediaBrowser.Api.UserLibrary
return new QueryResult
{
Items = Array.Empty(),
- TotalRecordCount = 0
+ TotalRecordCount = 0,
+ StartIndex = 0
};
}
@@ -242,7 +245,8 @@ namespace MediaBrowser.Api.UserLibrary
return new QueryResult
{
Items = itemsArray,
- TotalRecordCount = itemsArray.Length
+ TotalRecordCount = itemsArray.Length,
+ StartIndex = 0
};
}
diff --git a/MediaBrowser.Model/Querying/QueryResult.cs b/MediaBrowser.Model/Querying/QueryResult.cs
index c007a45d6e..221645afbf 100644
--- a/MediaBrowser.Model/Querying/QueryResult.cs
+++ b/MediaBrowser.Model/Querying/QueryResult.cs
@@ -17,6 +17,12 @@ namespace MediaBrowser.Model.Querying
/// The total record count.
public int TotalRecordCount { get; set; }
+ ///
+ /// The index of the first record in Items.
+ ///
+ /// First record index.
+ public int StartIndex { get; set; }
+
public QueryResult()
{
Items = Array.Empty();
diff --git a/deployment/ubuntu-package-x64/Dockerfile b/deployment/ubuntu-package-x64/Dockerfile
index 99022891bd..21a536e5ed 100644
--- a/deployment/ubuntu-package-x64/Dockerfile
+++ b/deployment/ubuntu-package-x64/Dockerfile
@@ -1,4 +1,4 @@
-FROM microsoft/dotnet:2.2-sdk-bionic
+FROM microsoft/dotnet:3.0-sdk-bionic
# Docker build arguments
ARG SOURCE_DIR=/jellyfin
ARG PLATFORM_DIR=/jellyfin/deployment/ubuntu-package-x64