Stats & More Polish on Metadata Matching (#3538)
This commit is contained in:
parent
6f3ba0948b
commit
5d6a5f0987
34 changed files with 178 additions and 124 deletions
|
@ -18,4 +18,16 @@ public static class FlurlExtensions
|
|||
.WithHeader("Content-Type", "application/json")
|
||||
.WithTimeout(TimeSpan.FromSeconds(Configuration.DefaultTimeOutSecs));
|
||||
}
|
||||
|
||||
public static IFlurlRequest WithBasicHeaders(this string request, string apiKey)
|
||||
{
|
||||
return request
|
||||
.WithHeader("Accept", "application/json")
|
||||
.WithHeader("User-Agent", "Kavita")
|
||||
.WithHeader("x-api-key", apiKey)
|
||||
.WithHeader("x-installId", HashUtil.ServerToken())
|
||||
.WithHeader("x-kavita-version", BuildInfo.Version)
|
||||
.WithHeader("Content-Type", "application/json")
|
||||
.WithTimeout(TimeSpan.FromSeconds(Configuration.DefaultTimeOutSecs));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -294,7 +294,7 @@ public static class QueryableExtensions
|
|||
MatchStateOption.NotMatched => query.
|
||||
Include(s => s.ExternalSeriesMetadata)
|
||||
.Where(s => (s.ExternalSeriesMetadata == null || s.ExternalSeriesMetadata.ValidUntilUtc == DateTime.MinValue) && !s.IsBlacklisted && !s.DontMatch),
|
||||
MatchStateOption.Error => query.Where(s => s.IsBlacklisted),
|
||||
MatchStateOption.Error => query.Where(s => s.IsBlacklisted && !s.DontMatch),
|
||||
MatchStateOption.DontMatch => query.Where(s => s.DontMatch),
|
||||
_ => query
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue