Reduced unnecessary logging messages.

This commit is contained in:
Abdulmhsen B. A. A
2022-05-08 18:45:53 +03:00
parent 6f0592b41e
commit 3078861e7c
2 changed files with 18 additions and 23 deletions

View File

@@ -1434,19 +1434,17 @@ class JellyfinServer implements ServerInterface
protected function processShow(StdClass $item, string $library): void
{
$iName = sprintf(
'%s - %s - [%s (%d)]',
$this->name,
$library,
$item->Name ?? $item->OriginalTitle ?? '??',
$item->ProductionYear ?? 0000
);
$this->logger->debug(sprintf('Processing %s. For GUIDs.', $iName));
$providersId = (array)($item->ProviderIds ?? []);
if (!$this->hasSupportedIds($providersId)) {
$iName = sprintf(
'%s - %s - [%s (%d)]',
$this->name,
$library,
$item->Name ?? $item->OriginalTitle ?? '??',
$item->ProductionYear ?? 0000
);
$message = sprintf('Ignoring %s. No valid/supported GUIDs.', $iName);
if (empty($providersId)) {
$message .= ' Most likely unmatched TV show.';
@@ -1492,12 +1490,12 @@ class JellyfinServer implements ServerInterface
} else {
$iName = trim(
sprintf(
'%s - %s - [%s - (%dx%d)]',
'%s - %s - [%s - (%sx%s)]',
$this->name,
$library,
$item->SeriesName ?? '??',
$item->ParentIndexNumber ?? 0,
$item->IndexNumber ?? 0,
str_pad((string)($item->ParentIndexNumber ?? 0), 2, '0', STR_PAD_LEFT),
str_pad((string)($item->IndexNumber ?? 0), 3, '0', STR_PAD_LEFT),
)
);
}

View File

@@ -1493,16 +1493,6 @@ class PlexServer implements ServerInterface
protected function processShow(StdClass $item, string $library): void
{
$iName = sprintf(
'%s - %s - [%s (%d)]',
$this->name,
$library,
$item->title ?? $item->originalTitle ?? '??',
$item->year ?? 0000
);
$this->logger->debug(sprintf('Processing %s. For GUIDs.', $iName));
if (null === ($item->Guid ?? null)) {
$item->Guid = [['id' => $item->guid]];
} else {
@@ -1510,6 +1500,13 @@ class PlexServer implements ServerInterface
}
if (!$this->hasSupportedGuids($item->Guid, true)) {
$iName = sprintf(
'%s - %s - [%s (%d)]',
$this->name,
$library,
$item->title ?? $item->originalTitle ?? '??',
$item->year ?? 0000
);
$message = sprintf('Ignoring %s. No valid/supported GUIDs.', $iName);
if (empty($item->Guid)) {
$message .= ' Most likely unmatched TV show.';