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:
parent
baf9ef38a4
commit
445ca45fa9
3 changed files with 41 additions and 3 deletions
11
src/apply_rule.zig
Normal file
11
src/apply_rule.zig
Normal 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) {}
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue