Make sure that list_enabled_rules returns ALL rules

Fixes partially working scrobble rule application
This commit is contained in:
Claudio Ortolina
2026-03-28 10:07:08 +00:00
parent 5c5a523fe6
commit b2575eb802
+5 -1
View File
@@ -76,7 +76,11 @@ defmodule MusicLibrary.ScrobbleRules do
@spec list_enabled_rules() :: [ScrobbleRule.t()]
def list_enabled_rules do
list_scrobble_rules(enabled: true)
query =
from(r in ScrobbleRule)
|> filter_scrobble_rules(enabled: true)
Repo.all(query)
end
@spec apply_album_rule(ScrobbleRule.t()) :: {:ok, non_neg_integer()} | {:error, term()}