Allow multiple conditions in rules.

Scrobble processing appears noticeably slower (according to the logs), so I think rules are going to be something to optimize later. Fortunately, they shouldn't need to be applied too often
This commit is contained in:
mitteneer 2025-04-22 13:50:39 -04:00
parent 77170a1e28
commit e9c72041a5
6 changed files with 67 additions and 97 deletions

View file

@ -35,8 +35,9 @@ pub const SpotifyScrobble = struct {
incognito_mode: ?bool,
};
const Rule = struct {
pub const Rule = struct {
name: []const u8,
cond_req: enum { any, all },
conditionals: []struct {
match_on: ScrobbleFields,
match_cond: enum { is, contains },