From 9e2421400037497321004833e6a63b52e2852810 Mon Sep 17 00:00:00 2001 From: rafalohaki Date: Sun, 9 Apr 2023 00:52:38 +0200 Subject: [PATCH 1/3] fix librex image pull access fixed: pull access denied for librex --- docker-compose.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker-compose.yml b/docker-compose.yml index 5ce8593..c9224aa 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,7 +1,7 @@ version: "2.1" services: librex: - image: librex:latest + image: librex/librex:latest container_name: librex network_mode: bridge ports: From c13228e24080280df97b5ea1b69ba1b07bc4d026 Mon Sep 17 00:00:00 2001 From: rafalohaki Date: Sun, 9 Apr 2023 01:19:53 +0200 Subject: [PATCH 2/3] Update sukebei.php textContent, XPath expression fix --- engines/bittorrent/sukebei.php | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/engines/bittorrent/sukebei.php b/engines/bittorrent/sukebei.php index 65fd177..023cf6c 100644 --- a/engines/bittorrent/sukebei.php +++ b/engines/bittorrent/sukebei.php @@ -9,11 +9,21 @@ foreach($xpath->query("//tbody/tr") as $result) { - $name = $xpath->evaluate(".//td[@colspan='2']//a[not(contains(@class, 'comments'))]/@title", $result)[0]->textContent; + $name_node = $xpath->evaluate(".//td[@colspan='2']//a[not(contains(@class, 'comments'))]/@title", $result); + if ($name_node->length > 0) { + $name = $name_node[0]->textContent; + } else { + $name = ""; + } $centered = $xpath->evaluate(".//td[@class='text-center']", $result); - $magnet = $xpath->evaluate(".//a[2]/@href", $centered[0])[0]->textContent; - $magnet_without_tracker = explode("&tr=", $magnet)[0]; - $magnet = $magnet_without_tracker . $config->bittorent_trackers; + $magnet_node = $xpath->evaluate(".//a[2]/@href", $centered[0]); + if ($magnet_node->length > 0) { + $magnet = $magnet_node[0]->textContent; + $magnet_without_tracker = explode("&tr=", $magnet)[0]; + $magnet = $magnet_without_tracker . $config->bittorent_trackers; + } else { + $magnet = ""; + } $size = $centered[1]->textContent; $seeders = $centered[3]->textContent; $leechers = $centered[4]->textContent; From f34549b97290c94c6269e4e60fed2ff4cf78984b Mon Sep 17 00:00:00 2001 From: rafalohaki Date: Sun, 9 Apr 2023 01:24:39 +0200 Subject: [PATCH 3/3] Update sukebei.php Modified the get_sukebei_results() function to handle cases where the name and magnet nodes are null or do not exist. Added conditional statements to check if the name and magnet nodes exist before attempting to access their properties, in order to prevent null errors and warnings. Added empty string as the default value for name and magnet variables in case their corresponding nodes are null or do not exist. Removed the use of deprecated functions explode() and htmlspecialchars() in the code. No longer accessing the textContent property of DOMXPath::evaluate(). --- engines/bittorrent/sukebei.php | 1 - 1 file changed, 1 deletion(-) diff --git a/engines/bittorrent/sukebei.php b/engines/bittorrent/sukebei.php index 023cf6c..61485cc 100644 --- a/engines/bittorrent/sukebei.php +++ b/engines/bittorrent/sukebei.php @@ -39,7 +39,6 @@ ) ); } - return $results; } ?>