aboutsummaryrefslogtreecommitdiff
path: root/Jellyfin.Api/Controllers/MoviesController.cs
diff options
context:
space:
mode:
Diffstat (limited to 'Jellyfin.Api/Controllers/MoviesController.cs')
-rw-r--r--Jellyfin.Api/Controllers/MoviesController.cs4
1 files changed, 2 insertions, 2 deletions
diff --git a/Jellyfin.Api/Controllers/MoviesController.cs b/Jellyfin.Api/Controllers/MoviesController.cs
index 471bcd096..11559419c 100644
--- a/Jellyfin.Api/Controllers/MoviesController.cs
+++ b/Jellyfin.Api/Controllers/MoviesController.cs
@@ -97,7 +97,7 @@ public class MoviesController : BaseJellyfinApiController
DtoOptions = dtoOptions
};
- var recentlyPlayedMovies = _libraryManager.GetItemList(query);
+ var recentlyPlayedMovies = _libraryManager.GetItemList(query)!;
var itemTypes = new List<BaseItemKind> { BaseItemKind.Movie };
if (_serverConfigurationManager.Configuration.EnableExternalContentInSuggestions)
@@ -120,7 +120,7 @@ public class MoviesController : BaseJellyfinApiController
DtoOptions = dtoOptions
});
- var mostRecentMovies = recentlyPlayedMovies.GetRange(0, Math.Min(recentlyPlayedMovies.Count, 6));
+ var mostRecentMovies = recentlyPlayedMovies.Take(Math.Min(recentlyPlayedMovies.Count, 6));
// Get recently played directors
var recentDirectors = GetDirectors(mostRecentMovies)
.ToList();