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

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