Closed TnTora closed 3 weeks ago
I'll see what I can do. If you have some specific examples with missing results that'd be great.
Here is an example from "Mahou Shoujo Lyrical Nanoha A's"
currently no batch torrent are found:
By adding the keywords I mentioned we get these:
The last 3 torrents are not actually batch torrents and I'm not sure how they would affect auto selection.
If you need more examples I can post a few more.
If you need more examples I can post a few more.
Yeah you can post the media IDs
Nevermind, AnimeTosho returns a num_files
field that can be used to figure out if the torrent is a batch. No clue why I didn't go with that from the beginning.
Rewrote smart_search.go
, i think this approach works best. You can update that file if you're building from source. I'll do more testing on my end.
This seems much better but there are still a few missing torrents. I'm not familiar with Sphinx search expressions but when using the one defined in formatCommonQuery
a few torrents are not matched.
Here is an example: aid=4688 (Mahou Shoujo Lyrical Nanoha StrikerS)
if I use the title of the anime as the search query, I get 9 torrents including my preferred one "[CSW] Magical Girl Lyrical Nanoha StrikerS (BDRip 1280x714 x264 FLAC) [9d90938]"
If I use the expression (e*|a*|r*|i*|o*)
from formatCommonQuery
, I get 5 torrents without my preferred one.
The other expressions which include the resolution are also unable to match the missing torrents
If I read correctly is used for partial matching but I'm not clear on what `(e|a|r|i|o)` actually matches.
I guess they changed it but it wasn't possible to query by AID without passing a query string so (e*|a*|r*|i*|o*)
was used to find all titles. Removing it still works
func formatCommonQuery(quality string) string {
quality = strings.TrimSuffix(quality, "p")
if quality == "1080" {
return `("1080" !"720" !"540" !"480")`
} else if quality == "720" {
return `("720" !"1080" !"540" !"480")`
} else if quality == "540" {
return `("540" !"1080" !"720" !"480")`
} else if quality == "480" {
return `("480" !"1080" !"720" !"540")`
} else {
return ``
}
}
I get 6 torrents (9 without filtering for batches)
Thanks. This seems to work fine
Checklist
Problem Description / Use Case
Many batch torrents are not properly found when using smart search.
Proposed Solution
Add
"BD"
,"Bluray"
and"Blu-ray"
to the keywords ingetBatchGroup
andValueContainsBatchKeywords
. This might cause (very rarely) a few non batch torrents to slip through, which is not a problem in the case of manual selection but I'm not sure if it would affect auto selection.If it does affect auto selection I would propose one of two solutions:
findBestTorrent
to skip batch torrents results containing a single filebool
option could be added toSmartSearchQueryOptions
andBuildSearchQueryOptions
that would then be passed togetBatchGroup
to choose whether or not to add these keywords to the query.I haven't tried any of these two solutions so I might be missing something.