mirror of
https://github.com/jxxghp/MoviePilot-Frontend.git
synced 2026-09-05 23:56:42 +08:00
添加自动更新MoviePilot和站点资源的设置选项
This commit is contained in:
@@ -1098,6 +1098,10 @@ export default {
|
|||||||
securityImageDomainAdd: 'Add domain, e.g.: image.tmdb.org',
|
securityImageDomainAdd: 'Add domain, e.g.: image.tmdb.org',
|
||||||
proxyHost: 'Proxy Server',
|
proxyHost: 'Proxy Server',
|
||||||
proxyHostHint: 'Set proxy server address, support: http(s), socks5, socks5h, etc.',
|
proxyHostHint: 'Set proxy server address, support: http(s), socks5, socks5h, etc.',
|
||||||
|
moviePilotAutoUpdate: 'Auto Update MoviePilot',
|
||||||
|
moviePilotAutoUpdateHint: 'Automatically update MoviePilot to the latest release version when restarting',
|
||||||
|
autoUpdateResource: 'Auto Update Resource',
|
||||||
|
autoUpdateResourceHint: 'Automatically detect and update site resource package when restarting',
|
||||||
},
|
},
|
||||||
site: {
|
site: {
|
||||||
siteSync: 'Site Synchronization',
|
siteSync: 'Site Synchronization',
|
||||||
|
|||||||
@@ -1088,6 +1088,10 @@ export default {
|
|||||||
securityImageDomainAdd: '添加域名,如:image.tmdb.org',
|
securityImageDomainAdd: '添加域名,如:image.tmdb.org',
|
||||||
proxyHost: '代理服务器',
|
proxyHost: '代理服务器',
|
||||||
proxyHostHint: '设置代理服务器地址,支持:http(s)、socks5、socks5h 等协议',
|
proxyHostHint: '设置代理服务器地址,支持:http(s)、socks5、socks5h 等协议',
|
||||||
|
moviePilotAutoUpdate: '自动更新MoviePilot',
|
||||||
|
moviePilotAutoUpdateHint: '重启时自动更新MoviePilot到最新发行版本',
|
||||||
|
autoUpdateResource: '自动更新站点资源',
|
||||||
|
autoUpdateResourceHint: '重启时自动检测和更新站点资源包',
|
||||||
},
|
},
|
||||||
site: {
|
site: {
|
||||||
siteSync: '站点同步',
|
siteSync: '站点同步',
|
||||||
|
|||||||
@@ -1090,6 +1090,10 @@ export default {
|
|||||||
securityImageDomainAdd: '添加域名,如:image.tmdb.org',
|
securityImageDomainAdd: '添加域名,如:image.tmdb.org',
|
||||||
proxyHost: '代理服務器',
|
proxyHost: '代理服務器',
|
||||||
proxyHostHint: '設置代理服務器地址,支持:http(s)、socks5、socks5h 等協議',
|
proxyHostHint: '設置代理服務器地址,支持:http(s)、socks5、socks5h 等協議',
|
||||||
|
moviePilotAutoUpdate: '自動更新MoviePilot',
|
||||||
|
moviePilotAutoUpdateHint: '重啟時自動更新MoviePilot到最新發行版本',
|
||||||
|
autoUpdateResource: '自動更新站點資源',
|
||||||
|
autoUpdateResourceHint: '重啟時自動檢測和更新站點資源包',
|
||||||
},
|
},
|
||||||
site: {
|
site: {
|
||||||
siteSync: '站點同步',
|
siteSync: '站點同步',
|
||||||
|
|||||||
@@ -40,6 +40,8 @@ const SystemSettings = ref<any>({
|
|||||||
PLUGIN_STATISTIC_SHARE: true,
|
PLUGIN_STATISTIC_SHARE: true,
|
||||||
BIG_MEMORY_MODE: false,
|
BIG_MEMORY_MODE: false,
|
||||||
DB_WAL_ENABLE: false,
|
DB_WAL_ENABLE: false,
|
||||||
|
AUTO_UPDATE_RESOURCE: true,
|
||||||
|
MOVIEPILOT_AUTO_UPDATE: false,
|
||||||
// 媒体
|
// 媒体
|
||||||
TMDB_API_DOMAIN: null,
|
TMDB_API_DOMAIN: null,
|
||||||
TMDB_IMAGE_DOMAIN: null,
|
TMDB_IMAGE_DOMAIN: null,
|
||||||
@@ -385,6 +387,16 @@ function onMediaServerChange(mediaserver: MediaServerConf, name: string) {
|
|||||||
if (index !== -1) mediaServers.value[index] = mediaserver
|
if (index !== -1) mediaServers.value[index] = mediaserver
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 添加计算属性
|
||||||
|
const moviePilotAutoUpdate = computed({
|
||||||
|
get: () => {
|
||||||
|
return SystemSettings.value.Advanced.MOVIEPILOT_AUTO_UPDATE === 'release'
|
||||||
|
},
|
||||||
|
set: val => {
|
||||||
|
SystemSettings.value.Advanced.MOVIEPILOT_AUTO_UPDATE = val ? 'release' : 'false'
|
||||||
|
},
|
||||||
|
})
|
||||||
|
|
||||||
// 加载数据
|
// 加载数据
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
loadDownloaderSetting()
|
loadDownloaderSetting()
|
||||||
@@ -735,6 +747,22 @@ onDeactivated(() => {
|
|||||||
persistent-hint
|
persistent-hint
|
||||||
/>
|
/>
|
||||||
</VCol>
|
</VCol>
|
||||||
|
<VCol cols="12" md="6">
|
||||||
|
<VSwitch
|
||||||
|
v-model="moviePilotAutoUpdate"
|
||||||
|
:label="t('setting.system.moviePilotAutoUpdate')"
|
||||||
|
:hint="t('setting.system.moviePilotAutoUpdateHint')"
|
||||||
|
persistent-hint
|
||||||
|
/>
|
||||||
|
</VCol>
|
||||||
|
<VCol cols="12" md="6">
|
||||||
|
<VSwitch
|
||||||
|
v-model="SystemSettings.Advanced.AUTO_UPDATE_RESOURCE"
|
||||||
|
:label="t('setting.system.autoUpdateResource')"
|
||||||
|
:hint="t('setting.system.autoUpdateResourceHint')"
|
||||||
|
persistent-hint
|
||||||
|
/>
|
||||||
|
</VCol>
|
||||||
</VRow>
|
</VRow>
|
||||||
</div>
|
</div>
|
||||||
</VWindowItem>
|
</VWindowItem>
|
||||||
|
|||||||
Reference in New Issue
Block a user