fix: honor explicit scrape media type

This commit is contained in:
ShukeBta
2026-06-25 12:23:53 +08:00
parent 13cca43813
commit d1307bfcc1
2 changed files with 40 additions and 5 deletions
+8 -5
View File
@@ -662,14 +662,17 @@ func (s *ScraperService) determineMediaType(lib *model.Library, match *Match) st
}
func (s *ScraperService) determineMediaTypeForMedia(lib *model.Library, media *model.Media, match *Match) string {
if match != nil {
switch normalizeOrganizeMediaType(match.MediaType) {
case "tv", "anime", "variety":
return "tv"
case "movie", "adult":
return "movie"
}
}
if media != nil && mediaIsEpisodic(media, lib) {
return "tv"
}
if match != nil {
if mediaType := normalizeOrganizeMediaType(match.MediaType); mediaType != "" {
return mediaType
}
}
if lib != nil {
switch lib.Type {
case "tv", "anime", "variety", "show", "shows":