Compare commits

...

2 Commits

Author SHA1 Message Date
Bogdan
5ebe1de282 cardigann: fix search paths 2023-06-24 09:02:13 +03:00
Bogdan
b6398bfc1d Revert "assorted: fix search path categories (#14492)"
This reverts commit eaa6894896.
2023-06-24 09:02:13 +03:00
14 changed files with 29 additions and 27 deletions

View File

@@ -110,7 +110,7 @@ login:
search:
paths:
- path: torrents.php
categories: [401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 413, 420, 421, 422, 423, 424]
categories: ["!", 526, 527, 528, 529, 530, 531, 532]
- path: special.php
categories: [526, 527, 528, 529, 530, 531, 532]
inputs:

View File

@@ -100,7 +100,7 @@ login:
search:
paths:
- path: torrents.php
categories: [401, 402, 403, 404, 405, 406, 407, 409, 410]
categories: ["!", 411, 412, 413, 414, 415, 416]
- path: special.php
categories: [411, 412, 413, 414, 415, 416]
inputs:

View File

@@ -99,7 +99,7 @@ login:
search:
paths:
- path: browse.php
categories: [85, 86, 15, 16, 17, 19, 83, 82, 94, 95, 92, 93, 22, 58, 64, 24, 70, 27, 50, 69, 68, 91, 25, 26, 84, 71, 31, 54, 81, 67, 49, 14, 65, 97]
categories: ["!", 33, 66, 89]
inputs:
# 0 all, 1 active, 2 deadonly, 3 myuploads, 4 zeroseed, 6 re-seeded
incldead: 0

View File

@@ -89,7 +89,7 @@ login:
search:
paths:
- path: browse.php
categories: [1, 2, 8, 7, 16, 15, 14, 13, 4, 3, 18, 17, 23, 19, 20, 24, 21, 22, 35, 36, 25, 30, 31, 33, 32, 29, 28, 27, 26]
categories: ["!", 34, 39]
- path: browse.php
categories: [34, 39]
inputs:

View File

@@ -100,7 +100,7 @@ login:
search:
paths:
- path: torrents.php
categories: [401, 402, 403, 404, 405, 406, 407, 408, 428]
categories: ["!", 413, 414, 415, 416, 417, 426]
- path: special.php
categories: [413, 414, 415, 416, 417, 426]
inputs:

View File

@@ -77,7 +77,7 @@ login:
search:
paths:
- path: torrents.php
categories: [1, 4091, 4097, 4098, 4099, 4101, 4104, 4105]
categories: ["!", 4103]
- path: live.php
categories: [4103]
inputs:

View File

@@ -96,7 +96,7 @@ login:
search:
paths:
- path: torrents.php
categories: [401, 402, 403, 404, 405, 406, 407, 408, 409]
categories: ["!", 410, 411, 412]
- path: special.php
categories: [410, 411, 412]
inputs:

View File

@@ -55,6 +55,7 @@ caps:
- {id: 57, cat: TV/Documentary, desc: "Documentary-Ro", default: true}
- {id: 58, cat: Movies/SD, desc: "Movies: Cam", default: true}
- {id: 59, cat: Movies/SD, desc: "Movies: Cam-Ro", default: true}
- {id: 60, cat: XXX/ImageSet, desc: "Images: XXX", default: false}
- {id: 61, cat: Movies/3D, desc: "Movies: 3D", default: true}
- {id: 62, cat: Movies/3D, desc: "Movies: 3D-Ro", default: true}
- {id: 81, cat: Movies/HD, desc: "Movies: x265-Ro", default: true}
@@ -120,9 +121,9 @@ search:
# https://www.last-torrents.org/externalid?searchex=tt5834760&search_by=imdbid
# cannot support imdbid or tmdbid searches while using path category filters
- path: browse.php
categories: [1, 2, 5, 6, 9, 10, 11, 12, 13, 14, 16, 17, 18, 19, 20, 21, 22, 24, 25, 26, 28, 30, 31, 32, 33, 42, 43, 44, 49, 51, 54, 55, 56, 57, 58, 59, 60, 61, 62, 81, 82]
categories: ["!", 27, 60]
- path: browseadult.php
categories: [27]
categories: [27, 60]
keywordsfilters:
- name: re_replace

View File

@@ -82,11 +82,11 @@ login:
search:
paths:
- path: letoltes.php
categories: [4, 5, 48, 50, 75, 76, 26, 25, 58, 59, 42, 51, 38, 24, 85, 87, 47, 36, 6, 7, 56, 33, 44, 28, 32, 30, 53, 74, 40, 41, 34, 35, 46]
categories: ["!", 70, 39, 57]
inputs:
tipus: 1
- path: letoltes.php
categories: [4, 5, 48, 50, 75, 76, 26, 25, 58, 59, 42, 51, 38, 24, 85, 87, 47, 36, 6, 7, 56, 33, 44, 28, 32, 30, 53, 74, 40, 41, 34, 35, 46]
categories: ["!", 70, 39, 57]
inputs:
tipus: 2
- path: xxx.php

View File

@@ -79,7 +79,7 @@ login:
search:
paths:
- path: torrents.php
categories: [401, 402, 403, 404, 405, 406, 407, 408, 409]
categories: ["!", 905, 907, 908, 909]
- path: special.php
categories: [905, 907, 908, 909]
inputs:

View File

@@ -95,7 +95,7 @@ login:
search:
paths:
- path: torrents.php
categories: [401, 402, 403, 404, 405, 406, 408, 409, 411, 412, 413, 420, 430, 431, 432, 450, 451, 490]
categories: ["!", 440, 441, 442, 443, 444, 445, 446, 447]
- path: adults.php
categories: [440, 441, 442, 443, 444, 445, 446, 447]
inputs:

View File

@@ -120,7 +120,7 @@ download:
search:
paths:
- path: viewno18sb.php
categories: [1, 75, 10, 9, 110, 7, 40, 16, 3, 70, 100, 85, 105, 8, 56, 19, 20, 55, 21, 2, 130, 60, 90, 91, 92, 89, 93, 4, 50, 18, 17, 11, 5, 54, 51, 52, 57, 53]
categories: ["!", 901, 902, 903, 904, 905, 906, 907, 908, 910, 911, 912]
- path: viewbrsb.php
categories: [901, 902, 903, 904, 905, 906, 907, 908, 910, 911, 912]
inputs:

View File

@@ -144,7 +144,7 @@ login:
search:
paths:
- path: torrents.php
categories: [409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, 453]
categories: ["!", 435]
- path: special.php
categories: [435]
inputs:

View File

@@ -1414,26 +1414,27 @@ namespace Jackett.Common.Indexers
var SearchPaths = Search.Paths;
foreach (var SearchPath in SearchPaths)
{
variables[".Categories"] = mappedCategories;
var localMappedCategories = mappedCategories;
variables[".Categories"] = localMappedCategories;
// skip path if categories don't match
if (SearchPath.Categories.Count > 0)
{
var hasIntersect = mappedCategories.Intersect(SearchPath.Categories).Any();
if (SearchPath.Categories[0] == "!")
if (localMappedCategories.Count == 0)
{
hasIntersect = !hasIntersect;
localMappedCategories = GetAllTrackerCategories();
}
if (!hasIntersect)
{
variables[".Categories"] = mappedCategories.Except(SearchPath.Categories).ToList();
var categories = SearchPath.Categories[0] == "!"
? localMappedCategories.Except(SearchPath.Categories).ToList()
: localMappedCategories.Intersect(SearchPath.Categories).ToList();
if (!categories.Any())
{
continue;
}
variables[".Categories"] = mappedCategories.Intersect(SearchPath.Categories).ToList();
variables[".Categories"] = categories;
}
// build search URL
@@ -1484,11 +1485,11 @@ namespace Jackett.Common.Indexers
}
}
if (method == RequestType.GET)
if (method == RequestType.GET && queryCollection.Count > 0)
{
if (queryCollection.Count > 0)
searchUrl += "?" + queryCollection.GetQueryString(Encoding);
searchUrl += "?" + queryCollection.GetQueryString(Encoding);
}
var searchUrlUri = new Uri(searchUrl);
// send HTTP request