Don't log scrobble rule update message when there are no updates

This commit is contained in:
Claudio Ortolina
2025-12-11 09:07:38 +03:00
parent cd6e2eeec9
commit 7106329814
+8 -6
View File
@@ -744,12 +744,14 @@ defmodule MusicLibrary.ScrobbleRules do
|> Enum.map(fn {:ok, {_, _, count}} -> count end)
|> Enum.sum()
Logger.info(fn ->
"Scrobble rules application completed: " <>
"applied #{total_applied} rules, " <>
"#{total_errors} errors, " <>
"#{total_tracks_updated} tracks updated"
end)
if total_tracks_updated > 0 do
Logger.info(fn ->
"Scrobble rules application completed: " <>
"applied #{total_applied} rules, " <>
"#{total_errors} errors, " <>
"#{total_tracks_updated} tracks updated"
end)
end
Enum.each(errors, fn {:error, {type, match_value, reason}} ->
Logger.error(fn ->