Skip to content

Commit 70fd43f

Browse files
committed
Fix typo in torrent search config option
1 parent 7e88bbf commit 70fd43f

File tree

3 files changed

+12
-5
lines changed

3 files changed

+12
-5
lines changed

config.php.example

+2-2
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@
1111
// You can use any Invidious instance here
1212
"invidious_instance_for_video_results" => "https://invidious.snopyta.org",
1313

14-
"disable_bittorent_search" => false,
15-
"bittorent_trackers" => "&tr=http://nyaa.tracker.wf:7777/announce&tr=udp://open.stealth.si:80/announce&tr=udp://tracker.opentrackr.org:1337/announce&tr=udp://exodus.desync.com:6969/announce&tr=udp://tracker.torrent.eu.org:451/announce",
14+
"disable_bittorrent_search" => false,
15+
"bittorrent_trackers" => "&tr=http://nyaa.tracker.wf:7777/announce&tr=udp://open.stealth.si:80/announce&tr=udp://tracker.opentrackr.org:1337/announce&tr=udp://exodus.desync.com:6969/announce&tr=udp://tracker.torrent.eu.org:451/announce",
1616

1717
"disable_hidden_service_search" => false,
1818

docker/config.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
"language" => "${CONFIG_LANGUAGE}",
66
"number_of_results" => ${CONFIG_NUMBER_OF_RESULTS},
77
"invidious_instance_for_video_results" => "${CONFIG_INVIDIOUS_INSTANCE}",
8-
"disable_bittorent_search" => ${CONFIG_DISABLE_BITTORRENT_SEARCH},
9-
"bittorent_trackers" => "${CONFIG_BITTORRENT_TRACKERS}",
8+
"disable_bittorrent_search" => ${CONFIG_DISABLE_BITTORRENT_SEARCH},
9+
"bittorrent_trackers" => "${CONFIG_BITTORRENT_TRACKERS}",
1010
"disable_hidden_service_search" => ${CONFIG_HIDDEN_SERVICE_SEARCH},
1111
"instance_fallback" => ${CONFIG_INSTANCE_FALLBACK},
1212
"request_cooldown" => ${CONFIG_RATE_LIMIT_COOLDOWN},

misc/search_engine.php

+8-1
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,13 @@ public static function print_results($results, $opts) {}
6262
function load_opts() {
6363
$opts = require "config.php";
6464

65+
# account for the old, misspelled options
66+
if (isset($opts->disable_bittorent_search))
67+
$opts->disable_bittorrent_search = $opts->disable_bittorent_search;
68+
69+
if (isset($opts->bittorent_trackers))
70+
$opts->bittorrent_trackers = $opts->bittorent_trackers;
71+
6572
$opts->request_cooldown ??= 25;
6673
$opts->cache_time ??= 25;
6774

@@ -124,7 +131,7 @@ function init_search($opts, $mh) {
124131
return new VideoSearch($opts, $mh);
125132

126133
case 3:
127-
if ($opts->disable_bittorent_search) {
134+
if ($opts->disable_bittorrent_search) {
128135
echo "<p class=\"text-result-container\">" . TEXTS["feature_disabled"] . "</p>";
129136
break;
130137
}

0 commit comments

Comments
 (0)