From 68dc7f9f99848d5fb47cf8456be764dcf35aebe5 Mon Sep 17 00:00:00 2001 From: ghost Date: Fri, 15 Sep 2023 22:52:33 +0300 Subject: [PATCH] add missed alias check --- src/crontab/import/feed.php | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/src/crontab/import/feed.php b/src/crontab/import/feed.php index 7f1eec8..862e318 100644 --- a/src/crontab/import/feed.php +++ b/src/crontab/import/feed.php @@ -409,6 +409,12 @@ try continue; } + // Aliases check + if (!isset($aliasMagnetId[$remoteMagnetDownload->magnetId]) || !isset($aliasUserId[$remoteMagnetDownload->userId])) + { + continue; + } + // Add new magnet download if not exist by timestamp added for this user if (!$db->findMagnetDownload($aliasMagnetId[$remoteMagnetDownload->magnetId], $aliasUserId[$remoteMagnetDownload->userId], @@ -439,6 +445,12 @@ try continue; } + // Aliases check + if (!isset($aliasMagnetId[$remoteMagnetView->magnetId]) || !isset($aliasUserId[$remoteMagnetView->userId])) + { + continue; + } + // Add new magnet view if not exist by timestamp added for this user if (!$db->findMagnetView($aliasMagnetId[$remoteMagnetView->magnetId], $aliasUserId[$remoteMagnetView->userId], @@ -469,6 +481,12 @@ try continue; } + // Aliases check + if (!isset($aliasMagnetId[$remoteMagnetStar->magnetId]) || !isset($aliasUserId[$remoteMagnetStar->userId])) + { + continue; + } + // Add new magnet star if not exist by timestamp added for this user if (!$db->findMagnetStar($aliasMagnetId[$remoteMagnetStar->magnetId], $aliasUserId[$remoteMagnetStar->userId],