Begin rule application

The more I think about this, the more I think it's gonna be super slow and bad. There must bve a good way of doing this, but I'm not sure how...
This commit is contained in:
mitteneer 2025-04-21 00:17:16 -04:00
parent baf9ef38a4
commit 445ca45fa9
3 changed files with 41 additions and 3 deletions

11
src/apply_rule.zig Normal file
View file

@ -0,0 +1,11 @@
const Scrobble = @import("types").LastFMScrobble;
const Rules = @import("types").Rules;
pub fn applyRule(scrobble: Scrobble, rules: Rules) !Scrobble {
var output_scrobble: Scrobble = scrobble;
for (rules) |rule| {
for (rule.conditionals) |cond| {
switch (cond.match_cond) {}
}
}
}