media: merge tvdb and trakt languages

This commit is contained in:
James Bayliss
2021-02-24 18:57:39 +00:00
parent cea77e7849
commit bf23d93209
3 changed files with 89 additions and 1 deletions

View File

@@ -4,6 +4,7 @@ import (
"errors"
"fmt"
"github.com/l3uddz/nabarr/media/trakt"
"github.com/l3uddz/nabarr/util"
"strconv"
)
@@ -63,6 +64,7 @@ func (c *Client) GetShowInfo(item *FeedItem) (*Item, error) {
Msg("Item was not found on tvdb")
} else if ti != nil {
mi.Tvdb = *ti
mi.Languages = util.StringSliceMergeUnique(mi.Languages, []string{ti.Language})
}
return mi, nil