Skip movies/shows that don't have imdbIDs

With some explorer that might be the case and it won't work properly
This commit is contained in:
Lucas BEE 2020-05-08 18:39:20 +02:00
parent 26606432f7
commit 304eb40a54

View File

@ -53,6 +53,9 @@ func GetMediaIDs(env *web.Env, mediaType string, source string, category string)
} }
// Add them in the list of ids // Add them in the list of ids
for _, media := range medias { for _, media := range medias {
if media.ImdbID == "" {
continue
}
ids = append(ids, media.ImdbID) ids = append(ids, media.ImdbID)
} }
} else { } else {
@ -63,6 +66,9 @@ func GetMediaIDs(env *web.Env, mediaType string, source string, category string)
} }
// Add them in the list of ids // Add them in the list of ids
for _, media := range medias { for _, media := range medias {
if media.ImdbID == "" {
continue
}
ids = append(ids, media.ImdbID) ids = append(ids, media.ImdbID)
} }
} }