diff options
| author | Cody Robibero <cody@robibe.ro> | 2024-01-17 08:51:39 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-01-17 08:51:39 -0700 |
| commit | e7b8d45bbb0f2b832245dae7ac0d401c56cb10a4 (patch) | |
| tree | 6bf0e4b1edf5723f8e08404ac21b4fbc99f63031 /Emby.Server.Implementations/TV | |
| parent | 484ccf7f284dcd074e06ed90af6cde4864adecea (diff) | |
Use helper function to compare guid (#10825)
Diffstat (limited to 'Emby.Server.Implementations/TV')
| -rw-r--r-- | Emby.Server.Implementations/TV/TVSeriesManager.cs | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/Emby.Server.Implementations/TV/TVSeriesManager.cs b/Emby.Server.Implementations/TV/TVSeriesManager.cs index ef890aeb4..34c9e86f2 100644 --- a/Emby.Server.Implementations/TV/TVSeriesManager.cs +++ b/Emby.Server.Implementations/TV/TVSeriesManager.cs @@ -5,6 +5,7 @@ using System.Collections.Generic; using System.Linq; using Jellyfin.Data.Entities; using Jellyfin.Data.Enums; +using Jellyfin.Extensions; using MediaBrowser.Controller.Configuration; using MediaBrowser.Controller.Dto; using MediaBrowser.Controller.Entities; @@ -41,7 +42,7 @@ namespace Emby.Server.Implementations.TV } string? presentationUniqueKey = null; - if (query.SeriesId.HasValue && !query.SeriesId.Value.Equals(default)) + if (!query.SeriesId.IsNullOrEmpty()) { if (_libraryManager.GetItemById(query.SeriesId.Value) is Series series) { @@ -91,7 +92,7 @@ namespace Emby.Server.Implementations.TV string? presentationUniqueKey = null; int? limit = null; - if (request.SeriesId.HasValue && !request.SeriesId.Value.Equals(default)) + if (!request.SeriesId.IsNullOrEmpty()) { if (_libraryManager.GetItemById(request.SeriesId.Value) is Series series) { @@ -146,7 +147,7 @@ namespace Emby.Server.Implementations.TV // If viewing all next up for all series, remove first episodes // But if that returns empty, keep those first episodes (avoid completely empty view) - var alwaysEnableFirstEpisode = request.SeriesId.HasValue && !request.SeriesId.Value.Equals(default); + var alwaysEnableFirstEpisode = !request.SeriesId.IsNullOrEmpty(); var anyFound = false; return allNextUp |
