mirror of
https://github.com/truewhile/MeBox.git
synced 2026-10-06 13:26:38 +08:00
fix: honor explicit scrape media type
This commit is contained in:
@@ -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":
|
||||
|
||||
Reference in New Issue
Block a user