feat: option to enable adult content

This commit is contained in:
Simon Ding
2024-08-19 16:39:34 +08:00
parent 10e6e99990
commit 821d6859ff
7 changed files with 56 additions and 25 deletions

View File

@@ -67,7 +67,8 @@ func (c *Client) TMDB() (*tmdb.Client, error) {
return nil, errors.New("TMDB apiKey not set")
}
proxy := c.db.GetSetting(db.SettingProxy)
return tmdb.NewClient(api, proxy)
adult := c.db.GetSetting(db.SettingEnableTmdbAdultContent)
return tmdb.NewClient(api, proxy, adult == "true")
}
func (c *Client) MustTMDB() *tmdb.Client {