From b4fb15cf1589e4b0d10cbf99bf96c0fffb5ae969 Mon Sep 17 00:00:00 2001 From: Andreas Schulte Date: Wed, 18 Oct 2023 20:49:56 +0200 Subject: [PATCH] Altered IMDbEntry.Type --- models.go | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/models.go b/models.go index 2779de0..e56c8d6 100644 --- a/models.go +++ b/models.go @@ -1,6 +1,9 @@ package imdbs -import "time" +import ( + "strings" + "time" +) // IMDbEntry is a struct that represents an IMDb entry (movie or series) type IMDbEntry struct { @@ -97,7 +100,7 @@ func (s IMDbJSON) TransformIntoIMDbEntry(id string, year int64) IMDbEntry { Rating: s.AggregateRating.RatingValue, RuntimeInMins: 0, Title: s.Name, - Type: s.Type, + Type: strings.Replace(s.Type, "TVSeries", "Series", -1), Year: year, }