Change nullable behavior to fix web client

This commit is contained in:
David 2020-07-04 19:05:42 +02:00
parent 31a492b2b9
commit 589add1654

View File

@ -288,7 +288,7 @@ namespace Jellyfin.Api.Controllers
MediaTypes = RequestHelpers.Split(mediaTypes, ',', true), MediaTypes = RequestHelpers.Split(mediaTypes, ',', true),
IncludeItemTypes = RequestHelpers.Split(includeItemTypes, ',', true), IncludeItemTypes = RequestHelpers.Split(includeItemTypes, ',', true),
ExcludeItemTypes = RequestHelpers.Split(excludeItemTypes, ',', true), ExcludeItemTypes = RequestHelpers.Split(excludeItemTypes, ',', true),
Recursive = recursive!.Value, Recursive = recursive ?? false,
OrderBy = RequestHelpers.GetOrderBy(sortBy, sortOrder), OrderBy = RequestHelpers.GetOrderBy(sortBy, sortOrder),
IsFavorite = isFavorite, IsFavorite = isFavorite,
Limit = limit, Limit = limit,
@ -343,10 +343,10 @@ namespace Jellyfin.Api.Controllers
ExcludeItemIds = RequestHelpers.GetGuids(excludeItemIds), ExcludeItemIds = RequestHelpers.GetGuids(excludeItemIds),
DtoOptions = dtoOptions, DtoOptions = dtoOptions,
SearchTerm = searchTerm, SearchTerm = searchTerm,
MinDateLastSaved = minDateLastSaved!.Value.ToUniversalTime(), MinDateLastSaved = minDateLastSaved?.ToUniversalTime(),
MinDateLastSavedForUser = minDateLastSavedForUser!.Value.ToUniversalTime(), MinDateLastSavedForUser = minDateLastSavedForUser?.ToUniversalTime(),
MinPremiereDate = minPremiereDate!.Value.ToUniversalTime(), MinPremiereDate = minPremiereDate?.ToUniversalTime(),
MaxPremiereDate = maxPremiereDate!.Value.ToUniversalTime(), MaxPremiereDate = maxPremiereDate?.ToUniversalTime(),
}; };
if (!string.IsNullOrWhiteSpace(ids) || !string.IsNullOrWhiteSpace(searchTerm)) if (!string.IsNullOrWhiteSpace(ids) || !string.IsNullOrWhiteSpace(searchTerm))