diff --git a/Shoko.Server/API/v1/Implementations/ShokoServiceImplementation/ShokoServiceImplementation_Utilities.cs b/Shoko.Server/API/v1/Implementations/ShokoServiceImplementation/ShokoServiceImplementation_Utilities.cs index 7334db789..5b90fb110 100644 --- a/Shoko.Server/API/v1/Implementations/ShokoServiceImplementation/ShokoServiceImplementation_Utilities.cs +++ b/Shoko.Server/API/v1/Implementations/ShokoServiceImplementation/ShokoServiceImplementation_Utilities.cs @@ -1313,7 +1313,7 @@ public List GetFilesByGroupAndResolution(int animeID, string r string resolution, string videoSource, int videoBitDepth, int userID) { - relGroupName = relGroupName == null || relGroupName.EqualsInvariantIgnoreCase("null") ? null : Uri.UnescapeDataString(relGroupName.Replace("+", " ")); + relGroupName = relGroupName == null || relGroupName.EqualsInvariantIgnoreCase("null") || relGroupName.Equals(string.Empty) ? null : Uri.UnescapeDataString(relGroupName.Replace("+", " ")); videoSource = videoSource == null ? null : Uri.UnescapeDataString(videoSource.Replace("+", " ")); logger.Trace($"GetFilesByGroupAndResolution -- relGroupName: {relGroupName}"); logger.Trace($"GetFilesByGroupAndResolution -- videoSource: {videoSource}"); @@ -1395,7 +1395,7 @@ public List GetFilesByGroupAndResolution(int animeID, string r [HttpGet("File/ByGroup/{animeID}/{relGroupName}/{userID}")] public List GetFilesByGroup(int animeID, string relGroupName, int userID) { - var grpName = relGroupName == null ? null : Uri.UnescapeDataString(relGroupName.Replace("+", " ")); + var grpName = relGroupName == null || "null".EqualsInvariantIgnoreCase(relGroupName) || relGroupName.Equals(string.Empty) ? null : Uri.UnescapeDataString(relGroupName.Replace("+", " ")); var vids = new List(); try