MCPcopy
hub / github.com/ChineseSubFinder/ChineseSubFinder / defInstance

Function defInstance

pkg/imdb_helper/imdb_test.go:84–107  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

82}
83
84func defInstance() {
85
86 settings.SetConfigRootPath(".")
87 pkg.ReadCustomAuthFile(log_helper.GetLogger4Tester())
88
89 authKey := random_auth_key.AuthKey{
90 BaseKey: pkg.BaseKey(),
91 AESKey16: pkg.AESKey16(),
92 AESIv16: pkg.AESIv16(),
93 }
94
95 err := local_http_proxy_server.SetProxyInfo(settings.Get().AdvancedSettings.ProxySettings.GetInfos())
96 if err != nil {
97 panic(err)
98 }
99 dealers = media_info_dealers.NewDealers(log_helper.GetLogger4Tester(),
100 subtitle_best_api.NewSubtitleBestApi(log_helper.GetLogger4Tester(), authKey))
101
102 tmdbApi, err := tmdb_api.NewTmdbHelper(log_helper.GetLogger4Tester(), settings.Get().AdvancedSettings.TmdbApiSettings.ApiKey, true)
103 if err != nil {
104 panic(err)
105 }
106 dealers.SetTmdbHelperInstance(tmdbApi)
107}
108
109var (
110 dealers *media_info_dealers.Dealers

Callers 2

TestIsChineseVideoFunction · 0.70

Calls 13

SetConfigRootPathFunction · 0.92
ReadCustomAuthFileFunction · 0.92
GetLogger4TesterFunction · 0.92
BaseKeyFunction · 0.92
AESKey16Function · 0.92
AESIv16Function · 0.92
SetProxyInfoFunction · 0.92
GetFunction · 0.92
NewDealersFunction · 0.92
NewSubtitleBestApiFunction · 0.92
NewTmdbHelperFunction · 0.92
GetInfosMethod · 0.80

Tested by

no test coverage detected