Complete preliminary find and replace rules

Tested by replacing AJR with John Van Derwood. Need to test on albums and artists, as well as matching on one piece of metadata, and replacing another
This commit is contained in:
mitteneer 2025-04-21 12:23:20 -04:00
parent 445ca45fa9
commit 87a2fe2d34
4 changed files with 41 additions and 15 deletions

View file

@ -38,23 +38,23 @@ pub const SpotifyScrobble = struct {
const Rule = struct {
name: []const u8,
conditionals: []struct {
match_on: MatchOn,
match_on: ScrobbleFields,
match_cond: enum { is, contains },
match_txt: []const u8,
},
actions: []struct {
action: []const u8,
action_on: enum { is, contains },
action: enum { replace, add },
action_on: ScrobbleFields,
action_txt: []const u8,
},
};
const Rules = struct {
pub const Rules = struct {
rules: []const Rule,
};
const MatchOn = enum {
pub const ScrobbleFields = enum {
artist,
album,
song,
track,
};