Scraping: Fix JSON scraping with subResults

SubResults were nullified by new title and magnet checks since they
were removed on the first pass.

Signed-off-by: kingbri <bdashore3@proton.me>
This commit is contained in:
kingbri 2023-04-11 23:32:40 -04:00
parent 1d89b9519d
commit df534327e5

View file

@ -498,7 +498,7 @@ class ScrapingViewModel: ObservableObject {
}
// Return if a title doesn't exist
if title == nil {
if title == nil && (jsonParser.subResults == nil && existingSearchResult == nil) {
return nil
}
@ -519,7 +519,7 @@ class ScrapingViewModel: ObservableObject {
// Return if a magnet hash doesn't exist
let magnet = Magnet(hash: magnetHash, link: link, title: title, trackers: source.trackers)
if magnet.hash == nil {
if magnet.hash == nil && (jsonParser.subResults == nil && existingSearchResult == nil) {
return nil
}