From dce122840c5d9fb15be560ab72baf5a146ff179c Mon Sep 17 00:00:00 2001 From: DarkFighterLuke Date: Sat, 14 Sep 2024 15:31:19 +0200 Subject: [PATCH] Adjust logs levels --- .../Configuration/PluginConfiguration.cs | 4 ++-- Jellyfin.Plugin.TubeArchivistMetadata/Plugin.cs | 6 +++--- .../Tasks/JFToTubeArchivistProgressSyncTask.cs | 12 ++++++------ .../Tasks/TAToJellyfinProgressSyncTask.cs | 6 +++--- 4 files changed, 14 insertions(+), 14 deletions(-) diff --git a/Jellyfin.Plugin.TubeArchivistMetadata/Configuration/PluginConfiguration.cs b/Jellyfin.Plugin.TubeArchivistMetadata/Configuration/PluginConfiguration.cs index 1e96e3e..18b5f23 100644 --- a/Jellyfin.Plugin.TubeArchivistMetadata/Configuration/PluginConfiguration.cs +++ b/Jellyfin.Plugin.TubeArchivistMetadata/Configuration/PluginConfiguration.cs @@ -118,14 +118,14 @@ namespace Jellyfin.Plugin.TubeArchivistMetadata.Configuration { get { - _logger.LogInformation("JFUsernamesTo configured: {Message}", string.Join(", ", _jfUsernamesTo)); + _logger.LogDebug("JFUsernamesTo configured: {Message}", string.Join(", ", _jfUsernamesTo)); return string.Join(", ", _jfUsernamesTo); } set { value.Replace(" ", string.Empty, StringComparison.CurrentCulture).Split(',').ToList().ForEach(u => _jfUsernamesTo.Add(u)); - _logger.LogInformation("Set JFUsernamesTo to: {Message}", value); + _logger.LogDebug("Set JFUsernamesTo to: {Message}", value); } } diff --git a/Jellyfin.Plugin.TubeArchivistMetadata/Plugin.cs b/Jellyfin.Plugin.TubeArchivistMetadata/Plugin.cs index 3786659..2dfac7f 100644 --- a/Jellyfin.Plugin.TubeArchivistMetadata/Plugin.cs +++ b/Jellyfin.Plugin.TubeArchivistMetadata/Plugin.cs @@ -164,7 +164,7 @@ namespace Jellyfin.Plugin.TubeArchivistMetadata var statusCode = await TubeArchivistApi.GetInstance().SetProgress(videoId, progress).ConfigureAwait(true); if (statusCode != System.Net.HttpStatusCode.OK) { - Logger.LogInformation("{Message}", $"POST /video/{videoId}/progress returned {statusCode} for video {eventArgs.Item.Name} with progress {progress} seconds"); + Logger.LogCritical("{Message}", $"POST /video/{videoId}/progress returned {statusCode} for video {eventArgs.Item.Name} with progress {progress} seconds"); } } } @@ -176,7 +176,7 @@ namespace Jellyfin.Plugin.TubeArchivistMetadata if (user != null && Configuration.GetJFUsernamesToArray().Contains(user!.Username)) { var isPlayed = eventArgs.Item.IsPlayed(user); - Logger.LogInformation("User {UserId} changed watched status to {Status} for the item {ItemName}", eventArgs.UserId, isPlayed, eventArgs.Item.Name); + Logger.LogDebug("User {UserId} changed watched status to {Status} for the item {ItemName}", eventArgs.UserId, isPlayed, eventArgs.Item.Name); string itemYTId; if (eventArgs.Item is Series) { @@ -194,7 +194,7 @@ namespace Jellyfin.Plugin.TubeArchivistMetadata var statusCode = await TubeArchivistApi.GetInstance().SetWatchedStatus(itemYTId, isPlayed).ConfigureAwait(true); if (statusCode != System.Net.HttpStatusCode.OK) { - Logger.LogInformation("POST /watched returned {StatusCode} for item {ItemName} ({VideoYTId}) with watched status {IsPlayed}", statusCode, eventArgs.Item.Name, itemYTId, isPlayed); + Logger.LogCritical("POST /watched returned {StatusCode} for item {ItemName} ({VideoYTId}) with watched status {IsPlayed}", statusCode, eventArgs.Item.Name, itemYTId, isPlayed); } } } diff --git a/Jellyfin.Plugin.TubeArchivistMetadata/Tasks/JFToTubeArchivistProgressSyncTask.cs b/Jellyfin.Plugin.TubeArchivistMetadata/Tasks/JFToTubeArchivistProgressSyncTask.cs index 0a14bc0..16b550c 100644 --- a/Jellyfin.Plugin.TubeArchivistMetadata/Tasks/JFToTubeArchivistProgressSyncTask.cs +++ b/Jellyfin.Plugin.TubeArchivistMetadata/Tasks/JFToTubeArchivistProgressSyncTask.cs @@ -91,7 +91,7 @@ namespace Jellyfin.Plugin.TubeArchivistMetadata.Tasks IncludeItemTypes = new[] { BaseItemKind.Series } }); _logger.LogInformation("Analyzing collection {Id} with name {Name}", collectionItem.Id, collectionItem.Name); - _logger.LogInformation("Found {Message} channels", channels.Count); + _logger.LogDebug("Found {Message} channels", channels.Count); foreach (Series channel in channels) { @@ -100,7 +100,7 @@ namespace Jellyfin.Plugin.TubeArchivistMetadata.Tasks { IncludeItemTypes = new[] { BaseItemKind.Season } }); - _logger.LogInformation("Found {Years} years in channel {ChannelName}", years.Count, channel.Name); + _logger.LogDebug("Found {Years} years in channel {ChannelName}", years.Count, channel.Name); foreach (Season year in years) { @@ -108,7 +108,7 @@ namespace Jellyfin.Plugin.TubeArchivistMetadata.Tasks { IncludeItemTypes = new[] { BaseItemKind.Episode } }); - _logger.LogInformation("Found {Videos} videos in year {YearName} of the channel {ChannelName}", videos.Count, year.Name, channel.Name); + _logger.LogDebug("Found {Videos} videos in year {YearName} of the channel {ChannelName}", videos.Count, year.Name, channel.Name); videosCount += videos.Count; } } @@ -171,7 +171,7 @@ namespace Jellyfin.Plugin.TubeArchivistMetadata.Tasks var statusCode = await taApi.SetProgress(videoYTId, playbackProgress).ConfigureAwait(true); if (statusCode != System.Net.HttpStatusCode.OK) { - _logger.LogInformation("{Message}", $"POST /video/{videoYTId}/progress returned {statusCode} for video {video.Name} with progress {progress} seconds"); + _logger.LogCritical("{Message}", $"POST /video/{videoYTId}/progress returned {statusCode} for video {video.Name} with progress {progress} seconds"); } if (!isChannelCheckedForWatched && channel.IsPlayed(user)) @@ -180,7 +180,7 @@ namespace Jellyfin.Plugin.TubeArchivistMetadata.Tasks statusCode = await taApi.SetWatchedStatus(channelYTId, isChannelPlayed).ConfigureAwait(true); if (statusCode != System.Net.HttpStatusCode.OK) { - _logger.LogInformation("{Message}", $"POST /watched returned {statusCode} for channel {channel.Name} ({channelYTId}) with wacthed status {isChannelPlayed}"); + _logger.LogCritical("{Message}", $"POST /watched returned {statusCode} for channel {channel.Name} ({channelYTId}) with wacthed status {isChannelPlayed}"); } else { @@ -196,7 +196,7 @@ namespace Jellyfin.Plugin.TubeArchivistMetadata.Tasks statusCode = await taApi.SetWatchedStatus(videoYTId, isVideoPlayed).ConfigureAwait(true); if (statusCode != System.Net.HttpStatusCode.OK) { - _logger.LogInformation("{Message}", $"POST /watched returned {statusCode} for video {video.Name} ({videoYTId}) with wacthed status {isVideoPlayed}"); + _logger.LogCritical("{Message}", $"POST /watched returned {statusCode} for video {video.Name} ({videoYTId}) with wacthed status {isVideoPlayed}"); } } diff --git a/Jellyfin.Plugin.TubeArchivistMetadata/Tasks/TAToJellyfinProgressSyncTask.cs b/Jellyfin.Plugin.TubeArchivistMetadata/Tasks/TAToJellyfinProgressSyncTask.cs index 919d6cb..d42678b 100644 --- a/Jellyfin.Plugin.TubeArchivistMetadata/Tasks/TAToJellyfinProgressSyncTask.cs +++ b/Jellyfin.Plugin.TubeArchivistMetadata/Tasks/TAToJellyfinProgressSyncTask.cs @@ -91,7 +91,7 @@ namespace Jellyfin.Plugin.TubeArchivistMetadata.Tasks IncludeItemTypes = new[] { BaseItemKind.Series } }); _logger.LogInformation("Analyzing collection {Id} with name {Name}", collectionItem.Id, collectionItem.Name); - _logger.LogInformation("Found {Message} channels", channels.Count); + _logger.LogDebug("Found {Message} channels", channels.Count); foreach (Series channel in channels) { @@ -99,7 +99,7 @@ namespace Jellyfin.Plugin.TubeArchivistMetadata.Tasks { IncludeItemTypes = new[] { BaseItemKind.Season } }); - _logger.LogInformation("Found {Years} years in channel {ChannelName}", years.Count, channel.Name); + _logger.LogDebug("Found {Years} years in channel {ChannelName}", years.Count, channel.Name); foreach (Season year in years) { @@ -107,7 +107,7 @@ namespace Jellyfin.Plugin.TubeArchivistMetadata.Tasks { IncludeItemTypes = new[] { BaseItemKind.Episode } }); - _logger.LogInformation("Found {Videos} videos in year {YearName} of the channel {ChannelName}", videos.Count, year.Name, channel.Name); + _logger.LogDebug("Found {Videos} videos in year {YearName} of the channel {ChannelName}", videos.Count, year.Name, channel.Name); videosCount += videos.Count; }