From 304eb40a5470be3f5ce7b3bfddea86c9d6cfdc03 Mon Sep 17 00:00:00 2001 From: Lucas BEE Date: Fri, 8 May 2020 18:39:20 +0200 Subject: [PATCH] Skip movies/shows that don't have imdbIDs With some explorer that might be the case and it won't work properly --- backend/external_medias/external_medias.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/backend/external_medias/external_medias.go b/backend/external_medias/external_medias.go index f8c4e4a..a2d472b 100644 --- a/backend/external_medias/external_medias.go +++ b/backend/external_medias/external_medias.go @@ -53,6 +53,9 @@ func GetMediaIDs(env *web.Env, mediaType string, source string, category string) } // Add them in the list of ids for _, media := range medias { + if media.ImdbID == "" { + continue + } ids = append(ids, media.ImdbID) } } else { @@ -63,6 +66,9 @@ func GetMediaIDs(env *web.Env, mediaType string, source string, category string) } // Add them in the list of ids for _, media := range medias { + if media.ImdbID == "" { + continue + } ids = append(ids, media.ImdbID) } }