Added missing logContext for Backup Guid:fromArray call.

This commit is contained in:
Abdulmhsen B. A. A
2022-06-30 21:00:27 +03:00
parent c308c69dff
commit dad9d2f862
2 changed files with 6 additions and 4 deletions

View File

@@ -38,6 +38,7 @@ class Backup extends Import
try {
$logContext['item'] = [
'backend' => $context->backendName,
'id' => ag($item, 'Id'),
'title' => match ($type) {
JFC::TYPE_MOVIE => sprintf(
@@ -98,7 +99,7 @@ class Backup extends Import
$guids = [];
foreach (Guid::fromArray($entity->getGuids(), false)->getAll() as $db => $val) {
foreach (Guid::fromArray($entity->getGuids(), false, $logContext)->getAll() as $db => $val) {
$guids[after($db, 'guid_')] = $val;
}
@@ -107,7 +108,7 @@ class Backup extends Import
if ($entity->isEpisode()) {
$parents = [];
foreach (Guid::fromArray($entity->getParentGuids(), false)->getAll() as $db => $val) {
foreach (Guid::fromArray($entity->getParentGuids(), false, $logContext)->getAll() as $db => $val) {
$parents[after($db, 'guid_')] = $val;
}
$arr[iState::COLUMN_PARENT] = $parents;

View File

@@ -43,6 +43,7 @@ final class Backup extends Import
}
$logContext['item'] = [
'backend' => $context->backendName,
'id' => ag($item, 'ratingKey'),
'title' => match ($type) {
PlexClient::TYPE_MOVIE => sprintf(
@@ -101,7 +102,7 @@ final class Backup extends Import
$guids = [];
foreach (Guid::fromArray($entity->getGuids(), false)->getAll() as $db => $val) {
foreach (Guid::fromArray($entity->getGuids(), false, $logContext)->getAll() as $db => $val) {
$guids[after($db, 'guid_')] = $val;
}
@@ -110,7 +111,7 @@ final class Backup extends Import
if ($entity->isEpisode()) {
$parents = [];
foreach (Guid::fromArray($entity->getParentGuids(), false)->getAll() as $db => $val) {
foreach (Guid::fromArray($entity->getParentGuids(), false, $logContext)->getAll() as $db => $val) {
$parents[after($db, 'guid_')] = $val;
}
$arr[iState::COLUMN_PARENT] = $parents;