新增设置-其他-列表缓存信息清理功能
parent
70d24ffdfd
commit
f9cbf9254c
|
@ -1,3 +1,7 @@
|
|||
### 新增
|
||||
|
||||
- 新增设置-其他-列表缓存信息清理功能,注:此功能一般情况下不要使用
|
||||
|
||||
### 修复
|
||||
|
||||
- 修复音乐搜索列表的稍后播放功能无效的问题
|
||||
|
|
|
@ -121,10 +121,11 @@
|
|||
"other_tray_theme": "Tray Icon Style",
|
||||
"other_tray_theme_native": "Solid Color",
|
||||
"other_tray_theme_origin": "Primary Color",
|
||||
"other_cache": "Cache size (Not recommended since resources such as pictures after the cache is cleaned need re-downloading. The software will dynamically manage the cache size based on disk space)",
|
||||
"other_cache_label": "Cache size used: ",
|
||||
"other_cache_label_title": "Currently used cache size",
|
||||
"other_cache_clear_btn": "Clear cache",
|
||||
"other_resource_cache": "Resource cache management (pictures, audios and other caches, pictures and other resources will need to be downloaded again after cleaning up, it is not recommended to clean up, the software will dynamically manage the cache size according to the disk space)",
|
||||
"other_resource_cache_label": "The software has used cache size: ",
|
||||
"other_resource_cache_clear_btn": "Clear resource cache",
|
||||
"other_play_list_cache": "List cache management (links to songs that have been cached in my list, alternative sources for playback, after cleaning up, you need to re-acquire them when you play and download songs, and do not clean up if there are no issues related to song playback)",
|
||||
"other_play_list_cache_clear_btn": "Clear list cache information",
|
||||
|
||||
"update": "Update",
|
||||
"update_latest_label": "Latest version: ",
|
||||
|
|
|
@ -121,10 +121,11 @@
|
|||
"other_tray_theme": "托盘图标样式",
|
||||
"other_tray_theme_native": "纯色",
|
||||
"other_tray_theme_origin": "原色",
|
||||
"other_cache": "缓存大小(清理缓存后图片等资源将需要重新下载,不建议清理,软件会根据磁盘空间动态管理缓存大小)",
|
||||
"other_cache_label": "软件已使用缓存大小:",
|
||||
"other_cache_label_title": "当前已用缓存",
|
||||
"other_cache_clear_btn": "清理缓存",
|
||||
"other_resource_cache": "资源缓存管理(图片、音频等缓存,清理后图片等资源将需要重新下载,不建议清理,软件会根据磁盘空间动态管理缓存大小)",
|
||||
"other_resource_cache_label": "软件已使用缓存大小:",
|
||||
"other_resource_cache_clear_btn": "清理资源缓存",
|
||||
"other_play_list_cache": "列表缓存管理(我的列表中已缓存的歌曲链接、播放代替源,清理后播放、下载歌曲时需要重新获取,没有歌曲播放相关的问题不要清理)",
|
||||
"other_play_list_cache_clear_btn": "清理列表缓存信息",
|
||||
|
||||
"update": "软件更新",
|
||||
"update_latest_label": "最新版本:",
|
||||
|
|
|
@ -121,10 +121,11 @@
|
|||
"other_tray_theme": "托盤圖標樣式",
|
||||
"other_tray_theme_native": "純色",
|
||||
"other_tray_theme_origin": "原色",
|
||||
"other_cache": "緩存大小(清理緩存後圖片等資源將需要重新下載,不建議清理,軟件會根據磁盤空間動態管理緩存大小)",
|
||||
"other_cache_label": "軟件已使用緩存大小:",
|
||||
"other_cache_label_title": "當前已用緩存",
|
||||
"other_cache_clear_btn": "清理緩存",
|
||||
"other_resource_cache": "資源緩存管理(圖片、音頻等緩存,清理後圖片等資源將需要重新下載,不建議清理,軟件會根據磁盤空間動態管理緩存大小)",
|
||||
"other_resource_cache_label": "軟件已使用緩存大小:",
|
||||
"other_resource_cache_clear_btn": "清理資源緩存",
|
||||
"other_play_list_cache": "列表緩存管理(我的列表中已緩存的歌曲鏈接、播放代替源,清理後播放、下載歌曲時需要重新獲取,沒有歌曲播放相關的問題不要清理)",
|
||||
"other_play_list_cache_clear_btn": "清理列表緩存信息",
|
||||
|
||||
"update": "軟件更新",
|
||||
"update_latest_label": "最新版本:",
|
||||
|
|
|
@ -205,6 +205,18 @@ const mutations = {
|
|||
|
||||
targetList.list.splice(sortNum - 1, 0, ...musicInfos)
|
||||
},
|
||||
clearCache() {
|
||||
const lists = Object.values(allList)
|
||||
for (const { list } of lists) {
|
||||
for (const item of list) {
|
||||
if (item.otherSource) item.otherSource = null
|
||||
if (item.typeUrl['128k']) delete item.typeUrl['128k']
|
||||
if (item.typeUrl['320k']) delete item.typeUrl['320k']
|
||||
if (item.typeUrl.flac) delete item.typeUrl.flac
|
||||
if (item.typeUrl.wav) delete item.typeUrl.wav
|
||||
}
|
||||
}
|
||||
},
|
||||
}
|
||||
|
||||
export default {
|
||||
|
|
|
@ -196,13 +196,18 @@ div.scroll(:class="$style.setting" ref="dom_setting")
|
|||
material-checkbox(:id="'setting_tray_theme_' + item.id" v-model="current_setting.tray.themeId" name="setting_tray_theme" need :class="$style.gapLeft"
|
||||
:label="$t('view.setting.other_tray_theme_' + item.name)" :key="item.id" :value="item.id" v-for="item in trayThemeList")
|
||||
dd
|
||||
h3#other_cache {{$t('view.setting.other_cache')}}
|
||||
h3#other_resource_cache {{$t('view.setting.other_resource_cache')}}
|
||||
div
|
||||
p
|
||||
| {{$t('view.setting.other_cache_label')}}
|
||||
span.auto-hidden(:tips="$t('view.setting.other_cache_label_title')") {{cacheSize}}
|
||||
| {{$t('view.setting.other_resource_cache_label')}}
|
||||
span.auto-hidden {{cacheSize}}
|
||||
p
|
||||
material-btn(:class="$style.btn" min @click="clearCache") {{$t('view.setting.other_cache_clear_btn')}}
|
||||
material-btn(:class="$style.btn" min :disabled="isDisabledResourceCacheClear" @click="clearResourceCache") {{$t('view.setting.other_resource_cache_clear_btn')}}
|
||||
dd
|
||||
h3#other_play_list_cache {{$t('view.setting.other_play_list_cache')}}
|
||||
div
|
||||
material-btn(:class="$style.btn" min :disabled="isDisabledListCacheClear" @click="clearListCache") {{$t('view.setting.other_play_list_cache_clear_btn')}}
|
||||
|
||||
dt#update {{$t('view.setting.update')}}
|
||||
dd
|
||||
p.small
|
||||
|
@ -570,6 +575,8 @@ export default {
|
|||
list: [],
|
||||
activeId: '',
|
||||
},
|
||||
isDisabledResourceCacheClear: false,
|
||||
isDisabledListCacheClear: false,
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
|
@ -624,7 +631,10 @@ export default {
|
|||
},
|
||||
methods: {
|
||||
...mapMutations(['setSetting', 'setSettingVersion', 'setVersionModalVisible']),
|
||||
...mapMutations('list', ['setList']),
|
||||
...mapMutations('list', {
|
||||
setList: 'setList',
|
||||
clearMyListCache: 'clearCache',
|
||||
}),
|
||||
...mapMutations(['setMediaDeviceId']),
|
||||
init() {
|
||||
this.current_setting = JSON.parse(JSON.stringify(this.setting))
|
||||
|
@ -859,11 +869,18 @@ export default {
|
|||
this.cacheSize = sizeFormate(size)
|
||||
})
|
||||
},
|
||||
clearCache() {
|
||||
clearResourceCache() {
|
||||
this.isDisabledResourceCacheClear = true
|
||||
clearCache().then(() => {
|
||||
this.getCacheSize()
|
||||
this.isDisabledResourceCacheClear = false
|
||||
})
|
||||
},
|
||||
clearListCache() {
|
||||
this.isDisabledListCacheClear = true
|
||||
this.clearMyListCache()
|
||||
this.isDisabledListCacheClear = false
|
||||
},
|
||||
handleWindowSizeChange(index) {
|
||||
let info = index == null ? this.windowSizeList[2] : this.windowSizeList[index]
|
||||
setWindowSize(info.width, info.height)
|
||||
|
|
Loading…
Reference in New Issue