mirror of
https://github.com/jxxghp/MoviePilot-Frontend.git
synced 2026-09-05 23:56:42 +08:00
feat: add tmdb api key setting
This commit is contained in:
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "moviepilot",
|
"name": "moviepilot",
|
||||||
"version": "2.12.2",
|
"version": "2.12.3",
|
||||||
"private": true,
|
"private": true,
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"bin": "dist/service.js",
|
"bin": "dist/service.js",
|
||||||
|
|||||||
@@ -1559,15 +1559,19 @@ export default {
|
|||||||
'Can improve read/write concurrency performance, but may increase the risk of data loss in exceptional cases, requires restart to take effect',
|
'Can improve read/write concurrency performance, but may increase the risk of data loss in exceptional cases, requires restart to take effect',
|
||||||
tmdbApiDomain: 'TMDB API Service Address',
|
tmdbApiDomain: 'TMDB API Service Address',
|
||||||
tmdbApiDomainPlaceholder: 'api.themoviedb.org',
|
tmdbApiDomainPlaceholder: 'api.themoviedb.org',
|
||||||
tmdbApiDomainHint: 'Customize themoviedb API domain or proxy address',
|
tmdbApiDomainHint: 'Customize TheMovieDb API domain or proxy address',
|
||||||
tmdbApiDomainRequired: 'Please enter TMDB API domain',
|
tmdbApiDomainRequired: 'Please enter TMDB API domain',
|
||||||
|
tmdbApiKey: 'TMDB API Key',
|
||||||
|
tmdbApiKeyPlaceholder: 'Please enter TMDB API Key',
|
||||||
|
tmdbApiKeyHint: 'Set TheMovieDb API Key',
|
||||||
|
tmdbApiKeyRequired: 'Please enter TMDB API Key',
|
||||||
tmdbImageDomain: 'TMDB Image Service Address',
|
tmdbImageDomain: 'TMDB Image Service Address',
|
||||||
tmdbImageDomainPlaceholder: 'image.tmdb.org',
|
tmdbImageDomainPlaceholder: 'image.tmdb.org',
|
||||||
tmdbImageDomainHint: 'Customize themoviedb image service domain or proxy address',
|
tmdbImageDomainHint: 'Customize TheMovieDb image service domain or proxy address',
|
||||||
tmdbImageDomainRequired: 'Please enter image service domain',
|
tmdbImageDomainRequired: 'Please enter image service domain',
|
||||||
tmdbLocale: 'TMDB Metadata Language',
|
tmdbLocale: 'TMDB Metadata Language',
|
||||||
tmdbLocalePlaceholder: 'en',
|
tmdbLocalePlaceholder: 'en',
|
||||||
tmdbLocaleHint: 'Customize themoviedb metadata language',
|
tmdbLocaleHint: 'Customize TheMovieDb metadata language',
|
||||||
metaCacheExpire: 'Media Metadata Cache Expiration Time',
|
metaCacheExpire: 'Media Metadata Cache Expiration Time',
|
||||||
metaCacheExpireHint: 'Recognition metadata local cache time, use built-in default value when set to 0',
|
metaCacheExpireHint: 'Recognition metadata local cache time, use built-in default value when set to 0',
|
||||||
metaCacheExpireRequired: 'Please enter metadata cache time',
|
metaCacheExpireRequired: 'Please enter metadata cache time',
|
||||||
@@ -1576,7 +1580,7 @@ export default {
|
|||||||
scrapFollowTmdbHint:
|
scrapFollowTmdbHint:
|
||||||
'When turned off, organization history will be used (if available) to avoid TMDB data changes during subscription',
|
'When turned off, organization history will be used (if available) to avoid TMDB data changes during subscription',
|
||||||
scrapOriginalImage: 'Scrap TheMovieDb Original Language Image',
|
scrapOriginalImage: 'Scrap TheMovieDb Original Language Image',
|
||||||
scrapOriginalImageHint: 'Scrap original language image from themoviedb, otherwise scrap metadata language image',
|
scrapOriginalImageHint: 'Scrap original language image from TheMovieDb, otherwise scrap metadata language image',
|
||||||
fanartEnable: 'Fanart Image Data Source',
|
fanartEnable: 'Fanart Image Data Source',
|
||||||
fanartEnableHint: 'Use image data from fanart.tv',
|
fanartEnableHint: 'Use image data from fanart.tv',
|
||||||
fanartLang: 'Fanart Language',
|
fanartLang: 'Fanart Language',
|
||||||
|
|||||||
@@ -1542,15 +1542,19 @@ export default {
|
|||||||
dbWalEnableHint: '可提升读写并发性能,但可能在异常情况下增加数据丢失风险,更改后需重启生效',
|
dbWalEnableHint: '可提升读写并发性能,但可能在异常情况下增加数据丢失风险,更改后需重启生效',
|
||||||
tmdbApiDomain: 'TMDB API服务地址',
|
tmdbApiDomain: 'TMDB API服务地址',
|
||||||
tmdbApiDomainPlaceholder: 'api.themoviedb.org',
|
tmdbApiDomainPlaceholder: 'api.themoviedb.org',
|
||||||
tmdbApiDomainHint: '自定义themoviedb API域名或代理地址',
|
tmdbApiDomainHint: '自定义 TheMovieDb API域名或代理地址',
|
||||||
tmdbApiDomainRequired: '请输入TMDB API域名',
|
tmdbApiDomainRequired: '请输入TMDB API域名',
|
||||||
|
tmdbApiKey: 'TMDB API Key',
|
||||||
|
tmdbApiKeyPlaceholder: '请输入 TMDB API Key',
|
||||||
|
tmdbApiKeyHint: '设置 TheMovieDb API Key',
|
||||||
|
tmdbApiKeyRequired: '请输入TMDB API Key',
|
||||||
tmdbImageDomain: 'TMDB 图片服务地址',
|
tmdbImageDomain: 'TMDB 图片服务地址',
|
||||||
tmdbImageDomainPlaceholder: 'image.tmdb.org',
|
tmdbImageDomainPlaceholder: 'image.tmdb.org',
|
||||||
tmdbImageDomainHint: '自定义themoviedb图片服务域名或代理地址',
|
tmdbImageDomainHint: '自定义 TheMovieDb 图片服务域名或代理地址',
|
||||||
tmdbImageDomainRequired: '请输入图片服务域名',
|
tmdbImageDomainRequired: '请输入图片服务域名',
|
||||||
tmdbLocale: 'TMDB 元数据语言',
|
tmdbLocale: 'TMDB 元数据语言',
|
||||||
tmdbLocalePlaceholder: 'zh',
|
tmdbLocalePlaceholder: 'zh',
|
||||||
tmdbLocaleHint: '自定义themoviedb元数据语言',
|
tmdbLocaleHint: '自定义 TheMovieDb 元数据语言',
|
||||||
metaCacheExpire: '媒体元数据缓存过期时间',
|
metaCacheExpire: '媒体元数据缓存过期时间',
|
||||||
metaCacheExpireHint: '识别元数据本地缓存时间,为 0 时使用内置默认值',
|
metaCacheExpireHint: '识别元数据本地缓存时间,为 0 时使用内置默认值',
|
||||||
metaCacheExpireRequired: '请输入元数据缓存时间',
|
metaCacheExpireRequired: '请输入元数据缓存时间',
|
||||||
|
|||||||
@@ -1543,15 +1543,19 @@ export default {
|
|||||||
dbWalEnableHint: '可提升讀寫併發性能,但可能在異常情況下增加數據丟失風險,更改後需重啟生效',
|
dbWalEnableHint: '可提升讀寫併發性能,但可能在異常情況下增加數據丟失風險,更改後需重啟生效',
|
||||||
tmdbApiDomain: 'TMDB API服務地址',
|
tmdbApiDomain: 'TMDB API服務地址',
|
||||||
tmdbApiDomainPlaceholder: 'api.themoviedb.org',
|
tmdbApiDomainPlaceholder: 'api.themoviedb.org',
|
||||||
tmdbApiDomainHint: '自定義themoviedb API域名或代理地址',
|
tmdbApiDomainHint: '自定義 TheMovieDb API域名或代理地址',
|
||||||
tmdbApiDomainRequired: '請輸入TMDB API域名',
|
tmdbApiDomainRequired: '請輸入TMDB API域名',
|
||||||
|
tmdbApiKey: 'TMDB API Key',
|
||||||
|
tmdbApiKeyPlaceholder: '請輸入 TMDB API Key',
|
||||||
|
tmdbApiKeyHint: '設定 TheMovieDb API Key',
|
||||||
|
tmdbApiKeyRequired: '請輸入TMDB API Key',
|
||||||
tmdbImageDomain: 'TMDB 圖片服務地址',
|
tmdbImageDomain: 'TMDB 圖片服務地址',
|
||||||
tmdbImageDomainPlaceholder: 'image.tmdb.org',
|
tmdbImageDomainPlaceholder: 'image.tmdb.org',
|
||||||
tmdbImageDomainHint: '自定義themoviedb圖片服務域名或代理地址',
|
tmdbImageDomainHint: '自定義 TheMovieDb 圖片服務域名或代理地址',
|
||||||
tmdbImageDomainRequired: '請輸入圖片服務域名',
|
tmdbImageDomainRequired: '請輸入圖片服務域名',
|
||||||
tmdbLocale: 'TMDB 元數據語言',
|
tmdbLocale: 'TMDB 元數據語言',
|
||||||
tmdbLocalePlaceholder: 'zh',
|
tmdbLocalePlaceholder: 'zh',
|
||||||
tmdbLocaleHint: '自定義themoviedb元數據語言',
|
tmdbLocaleHint: '自定義 TheMovieDb 元數據語言',
|
||||||
metaCacheExpire: '媒體元數據緩存過期時間',
|
metaCacheExpire: '媒體元數據緩存過期時間',
|
||||||
metaCacheExpireHint: '識別元數據本地緩存時間,為 0 時使用內置默認值',
|
metaCacheExpireHint: '識別元數據本地緩存時間,為 0 時使用內置默認值',
|
||||||
metaCacheExpireRequired: '請輸入元數據緩存時間',
|
metaCacheExpireRequired: '請輸入元數據緩存時間',
|
||||||
|
|||||||
@@ -528,6 +528,11 @@ function resetSearchResults() {
|
|||||||
applyFilter()
|
applyFilter()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 判断当前页面是否已经完成过一次带关键词的空结果搜索,避免 keep-alive 返回时自动重搜。
|
||||||
|
function hasLoadedEmptySearchResult() {
|
||||||
|
return isRefreshed.value && !progressActive.value && rawDataList.value.length === 0 && hasSearchKeyword(activeSearchParams.value)
|
||||||
|
}
|
||||||
|
|
||||||
// 更新搜索进度
|
// 更新搜索进度
|
||||||
function updateSearchProgress(eventData: { [key: string]: any }, flushNow: boolean = false) {
|
function updateSearchProgress(eventData: { [key: string]: any }, flushNow: boolean = false) {
|
||||||
if (eventData.text) {
|
if (eventData.text) {
|
||||||
@@ -1081,6 +1086,7 @@ onMounted(async () => {
|
|||||||
|
|
||||||
useKeepAliveRefresh(async () => {
|
useKeepAliveRefresh(async () => {
|
||||||
if (progressActive.value || isRefreshing.value || isRecommending.value || showingAiResults.value) return
|
if (progressActive.value || isRefreshing.value || isRecommending.value || showingAiResults.value) return
|
||||||
|
if (hasLoadedEmptySearchResult()) return
|
||||||
|
|
||||||
const refreshParams = await resolveRefreshSearchParams()
|
const refreshParams = await resolveRefreshSearchParams()
|
||||||
if (!refreshParams) return
|
if (!refreshParams) return
|
||||||
|
|||||||
@@ -96,6 +96,7 @@ const SystemSettings = ref<any>({
|
|||||||
RECOGNIZE_PLUGIN_FIRST: false,
|
RECOGNIZE_PLUGIN_FIRST: false,
|
||||||
MEDIA_RECOGNIZE_SHARE: true,
|
MEDIA_RECOGNIZE_SHARE: true,
|
||||||
TMDB_API_DOMAIN: null,
|
TMDB_API_DOMAIN: null,
|
||||||
|
TMDB_API_KEY: null,
|
||||||
TMDB_IMAGE_DOMAIN: null,
|
TMDB_IMAGE_DOMAIN: null,
|
||||||
TMDB_LOCALE: null,
|
TMDB_LOCALE: null,
|
||||||
META_CACHE_EXPIRE: 0,
|
META_CACHE_EXPIRE: 0,
|
||||||
@@ -1798,6 +1799,17 @@ watch(currentLlmSnapshotKey, (snapshotKey, previousSnapshotKey) => {
|
|||||||
prepend-inner-icon="mdi-api"
|
prepend-inner-icon="mdi-api"
|
||||||
/>
|
/>
|
||||||
</VCol>
|
</VCol>
|
||||||
|
<VCol cols="12" md="6">
|
||||||
|
<VTextField
|
||||||
|
v-model="SystemSettings.Advanced.TMDB_API_KEY"
|
||||||
|
:label="t('setting.system.tmdbApiKey')"
|
||||||
|
:hint="t('setting.system.tmdbApiKeyHint')"
|
||||||
|
persistent-hint
|
||||||
|
:placeholder="t('setting.system.tmdbApiKeyPlaceholder')"
|
||||||
|
:rules="[(v: string) => !!v || t('setting.system.tmdbApiKeyRequired')]"
|
||||||
|
prepend-inner-icon="mdi-key-variant"
|
||||||
|
/>
|
||||||
|
</VCol>
|
||||||
<VCol cols="12" md="6">
|
<VCol cols="12" md="6">
|
||||||
<VCombobox
|
<VCombobox
|
||||||
v-model="SystemSettings.Advanced.TMDB_IMAGE_DOMAIN"
|
v-model="SystemSettings.Advanced.TMDB_IMAGE_DOMAIN"
|
||||||
|
|||||||
Reference in New Issue
Block a user