From 7106329814c258990500d0116b9f501db4088530 Mon Sep 17 00:00:00 2001 From: Claudio Ortolina Date: Thu, 11 Dec 2025 09:07:38 +0300 Subject: [PATCH] Don't log scrobble rule update message when there are no updates --- lib/music_library/scrobble_rules.ex | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/lib/music_library/scrobble_rules.ex b/lib/music_library/scrobble_rules.ex index 2c579b02..7f66e9dd 100644 --- a/lib/music_library/scrobble_rules.ex +++ b/lib/music_library/scrobble_rules.ex @@ -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 ->