feat: support sonarr v4 (#43)
Some checks failed
Build / build (push) Has been cancelled

This commit is contained in:
l3uddz
2022-11-02 11:05:50 +00:00
committed by GitHub
parent fe50d7cffe
commit 083e806d43
5 changed files with 66 additions and 72 deletions

View File

@@ -115,10 +115,12 @@ func New(c nabarr.PvrConfig, mode string, m *media.Client, cc *cache.Client) (*C
}
// get language profile
if lid, err := cl.getLanguageProfileId(c.LanguageProfile); err != nil {
return nil, fmt.Errorf("get language profile: %v: %w", c.LanguageProfile, err)
} else {
cl.languageProfileId = lid
if !strings.HasPrefix(ss.Version, "4.") {
if lid, err := cl.getLanguageProfileId(c.LanguageProfile); err != nil {
return nil, fmt.Errorf("get language profile: %v: %w", c.LanguageProfile, err)
} else {
cl.languageProfileId = lid
}
}
cl.log.Info().