new ordering system added

This commit is contained in:
2024-09-29 23:00:32 +02:00
Unverified
parent 69937f13e6
commit 450e4a2f94
19 changed files with 275 additions and 59 deletions

View File

@@ -1,5 +1,7 @@
using System.Text.Json.Serialization;
using Microsoft.AspNetCore.Mvc;
using WatchIt.Common.Model.Media;
using WatchIt.Common.Model.Series;
using WatchIt.Common.Query;
namespace WatchIt.Common.Model.Photos;
@@ -34,11 +36,11 @@ public class PhotoQueryParameters : QueryParameters<PhotoResponse>
public override bool IsMeetingConditions(PhotoResponse item) =>
(
TestString(item.MimeType, MimeType)
TestStringWithRegex(item.MimeType, MimeType)
&&
TestBoolean(item.Background is not null, IsBackground)
Test(item.Background is not null, IsBackground)
&&
TestBoolean(item.Background is not null && item.Background.IsUniversalBackground, IsUniversalBackground)
Test(item.Background is not null && item.Background.IsUniversalBackground, IsUniversalBackground)
&&
TestComparable(item.UploadDate, UploadDate, UploadDateFrom, UploadDateTo)
);