This commit is contained in:
truewhile
2026-09-08 23:05:07 +08:00
parent c086b01381
commit 8225b4e319
4 changed files with 149 additions and 2 deletions
+15 -1
View File
@@ -127,7 +127,21 @@ func (s *ScraperService) manualRequestMatch(ctx context.Context, req ManualScrap
}
}
case source == "adult":
if match := s.manualAdultMatch(ctx, firstText(req.OriginalName, req.Title)); match != nil {
var match *Match
if s.adult != nil {
match, _ = s.adult.GetMetaTubeCandidate(ctx, req.TheTVDBID, req.DoubanID)
}
if match == nil {
match = s.manualAdultMatch(ctx, firstText(req.OriginalName, req.Title))
}
if match != nil {
// Older search responses used the portrait poster as a backdrop
// fallback. Do not let that placeholder replace a real preview
// image fetched from the selected MetaTube provider.
if strings.TrimSpace(match.BackdropURL) != "" &&
strings.TrimSpace(req.BackdropURL) == strings.TrimSpace(req.PosterURL) {
req.BackdropURL = ""
}
return mergeManualRequestIntoMatch(match, req), nil
}
}