Adjust logs levels
This commit is contained in:
@@ -118,14 +118,14 @@ namespace Jellyfin.Plugin.TubeArchivistMetadata.Configuration
|
|||||||
{
|
{
|
||||||
get
|
get
|
||||||
{
|
{
|
||||||
_logger.LogInformation("JFUsernamesTo configured: {Message}", string.Join(", ", _jfUsernamesTo));
|
_logger.LogDebug("JFUsernamesTo configured: {Message}", string.Join(", ", _jfUsernamesTo));
|
||||||
return string.Join(", ", _jfUsernamesTo);
|
return string.Join(", ", _jfUsernamesTo);
|
||||||
}
|
}
|
||||||
|
|
||||||
set
|
set
|
||||||
{
|
{
|
||||||
value.Replace(" ", string.Empty, StringComparison.CurrentCulture).Split(',').ToList().ForEach(u => _jfUsernamesTo.Add(u));
|
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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -164,7 +164,7 @@ namespace Jellyfin.Plugin.TubeArchivistMetadata
|
|||||||
var statusCode = await TubeArchivistApi.GetInstance().SetProgress(videoId, progress).ConfigureAwait(true);
|
var statusCode = await TubeArchivistApi.GetInstance().SetProgress(videoId, progress).ConfigureAwait(true);
|
||||||
if (statusCode != System.Net.HttpStatusCode.OK)
|
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))
|
if (user != null && Configuration.GetJFUsernamesToArray().Contains(user!.Username))
|
||||||
{
|
{
|
||||||
var isPlayed = eventArgs.Item.IsPlayed(user);
|
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;
|
string itemYTId;
|
||||||
if (eventArgs.Item is Series)
|
if (eventArgs.Item is Series)
|
||||||
{
|
{
|
||||||
@@ -194,7 +194,7 @@ namespace Jellyfin.Plugin.TubeArchivistMetadata
|
|||||||
var statusCode = await TubeArchivistApi.GetInstance().SetWatchedStatus(itemYTId, isPlayed).ConfigureAwait(true);
|
var statusCode = await TubeArchivistApi.GetInstance().SetWatchedStatus(itemYTId, isPlayed).ConfigureAwait(true);
|
||||||
if (statusCode != System.Net.HttpStatusCode.OK)
|
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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -91,7 +91,7 @@ namespace Jellyfin.Plugin.TubeArchivistMetadata.Tasks
|
|||||||
IncludeItemTypes = new[] { BaseItemKind.Series }
|
IncludeItemTypes = new[] { BaseItemKind.Series }
|
||||||
});
|
});
|
||||||
_logger.LogInformation("Analyzing collection {Id} with name {Name}", collectionItem.Id, collectionItem.Name);
|
_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)
|
foreach (Series channel in channels)
|
||||||
{
|
{
|
||||||
@@ -100,7 +100,7 @@ namespace Jellyfin.Plugin.TubeArchivistMetadata.Tasks
|
|||||||
{
|
{
|
||||||
IncludeItemTypes = new[] { BaseItemKind.Season }
|
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)
|
foreach (Season year in years)
|
||||||
{
|
{
|
||||||
@@ -108,7 +108,7 @@ namespace Jellyfin.Plugin.TubeArchivistMetadata.Tasks
|
|||||||
{
|
{
|
||||||
IncludeItemTypes = new[] { BaseItemKind.Episode }
|
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;
|
videosCount += videos.Count;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -171,7 +171,7 @@ namespace Jellyfin.Plugin.TubeArchivistMetadata.Tasks
|
|||||||
var statusCode = await taApi.SetProgress(videoYTId, playbackProgress).ConfigureAwait(true);
|
var statusCode = await taApi.SetProgress(videoYTId, playbackProgress).ConfigureAwait(true);
|
||||||
if (statusCode != System.Net.HttpStatusCode.OK)
|
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))
|
if (!isChannelCheckedForWatched && channel.IsPlayed(user))
|
||||||
@@ -180,7 +180,7 @@ namespace Jellyfin.Plugin.TubeArchivistMetadata.Tasks
|
|||||||
statusCode = await taApi.SetWatchedStatus(channelYTId, isChannelPlayed).ConfigureAwait(true);
|
statusCode = await taApi.SetWatchedStatus(channelYTId, isChannelPlayed).ConfigureAwait(true);
|
||||||
if (statusCode != System.Net.HttpStatusCode.OK)
|
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
|
else
|
||||||
{
|
{
|
||||||
@@ -196,7 +196,7 @@ namespace Jellyfin.Plugin.TubeArchivistMetadata.Tasks
|
|||||||
statusCode = await taApi.SetWatchedStatus(videoYTId, isVideoPlayed).ConfigureAwait(true);
|
statusCode = await taApi.SetWatchedStatus(videoYTId, isVideoPlayed).ConfigureAwait(true);
|
||||||
if (statusCode != System.Net.HttpStatusCode.OK)
|
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}");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -91,7 +91,7 @@ namespace Jellyfin.Plugin.TubeArchivistMetadata.Tasks
|
|||||||
IncludeItemTypes = new[] { BaseItemKind.Series }
|
IncludeItemTypes = new[] { BaseItemKind.Series }
|
||||||
});
|
});
|
||||||
_logger.LogInformation("Analyzing collection {Id} with name {Name}", collectionItem.Id, collectionItem.Name);
|
_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)
|
foreach (Series channel in channels)
|
||||||
{
|
{
|
||||||
@@ -99,7 +99,7 @@ namespace Jellyfin.Plugin.TubeArchivistMetadata.Tasks
|
|||||||
{
|
{
|
||||||
IncludeItemTypes = new[] { BaseItemKind.Season }
|
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)
|
foreach (Season year in years)
|
||||||
{
|
{
|
||||||
@@ -107,7 +107,7 @@ namespace Jellyfin.Plugin.TubeArchivistMetadata.Tasks
|
|||||||
{
|
{
|
||||||
IncludeItemTypes = new[] { BaseItemKind.Episode }
|
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;
|
videosCount += videos.Count;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user