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

Function defInstance

pkg/logic/sub_supplier/a4k/a4k_test.go:98–118  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

96)
97
98func defInstance() {
99
100 settings.SetConfigRootPath(pkg.ConfigRootDirFPath())
101
102 pkg.ReadCustomAuthFile(log_helper.GetLogger4Tester())
103
104 authKey := random_auth_key.AuthKey{
105 BaseKey: pkg.BaseKey(),
106 AESKey16: pkg.AESKey16(),
107 AESIv16: pkg.AESIv16(),
108 }
109
110 nowSettings := settings.Get()
111 nowSettings.ExperimentalFunction.ShareSubSettings.ShareSubEnabled = true
112
113 a4kInstance = NewSupplier(file_downloader.NewFileDownloader(
114 cache_center.NewCacheCenter("test", log_helper.GetLogger4Tester()), authKey))
115
116 dealers = media_info_dealers.NewDealers(log_helper.GetLogger4Tester(),
117 subtitle_best_api.NewSubtitleBestApi(log_helper.GetLogger4Tester(), authKey))
118}

Calls 13

SetConfigRootPathFunction · 0.92
ConfigRootDirFPathFunction · 0.92
ReadCustomAuthFileFunction · 0.92
GetLogger4TesterFunction · 0.92
BaseKeyFunction · 0.92
AESKey16Function · 0.92
AESIv16Function · 0.92
GetFunction · 0.92
NewFileDownloaderFunction · 0.92
NewCacheCenterFunction · 0.92
NewDealersFunction · 0.92
NewSubtitleBestApiFunction · 0.92

Tested by

no test coverage detected