Merge pull request #341 from madrays/v2

增加缓存管理页面
This commit is contained in:
jxxghp
2025-05-29 12:32:51 +08:00
committed by GitHub
7 changed files with 1607 additions and 0 deletions

View File

@@ -1305,3 +1305,155 @@ export interface Workflow {
// 最后执行时间
last_time?: string
}
// 种子缓存项
export interface TorrentCacheItem {
// 种子hash用于操作标识
hash: string
// 站点域名
domain: string
// 种子标题
title: string
// 种子描述
description?: string
// 种子大小
size: number
// 发布时间
pubdate?: string
// 站点名称
site_name?: string
// 识别的媒体名称
media_name?: string
// 识别的媒体年份
media_year?: string
// 识别的媒体类型
media_type?: string
// 季集信息
season_episode?: string
// 资源信息
resource_term?: string
// 种子链接
enclosure?: string
// 详情页面
page_url?: string
// 海报图片
poster_path?: string
// 背景图片
backdrop_path?: string
}
// 种子缓存数据
export interface TorrentCacheData {
// 缓存数量
count: number
// 站点数量
sites: number
// 缓存数据
data: TorrentCacheItem[]
}
// 种子缓存响应
export interface TorrentCacheResponse {
// Spider缓存
spider: TorrentCacheData
// RSS缓存
rss: TorrentCacheData
}
// 站点缓存统计
export interface SiteCacheStats {
// 站点域名
domain: string
// 缓存数量
count: number
// 最新发布时间
latest_date: string
}
// 缓存配置
export interface CacheConfig {
// 缓存限制数量
cache_limit: number
// 刷新限制数量
refresh_limit: number
// 当前模式
current_mode: string
}
// 缓存统计数据
export interface CacheStatsData {
// 总数量
total_count: number
// 站点数量
sites_count: number
// 站点统计
sites: SiteCacheStats[]
}
// 种子缓存统计响应
export interface TorrentCacheStatsResponse {
// 配置信息
config: CacheConfig
// Spider统计
spider: CacheStatsData
// RSS统计
rss: CacheStatsData
}
// 图片缓存统计
export interface ImageCacheStats {
// 总文件数
total_files: number
// 总大小(字节)
total_size: number
// 是否启用缓存
cache_enabled: boolean
// 缓存路径
cache_path?: string
}
// 图片缓存统计响应
export interface ImageCacheStatsResponse {
success: boolean
data: ImageCacheStats
message?: string
}
// 图片缓存项
export interface ImageCacheItem {
// 相对路径
path: string
// 文件名
name: string
// 文件大小
size: number
// 修改时间
modified_time: string
// 分类
category: string
// 访问URL
url: string
}
// 图片缓存详细数据
export interface ImageCacheData {
// 总数量
total: number
// 当前页
page: number
// 每页大小
size: number
// 总页数
pages: number
// 图片列表
items: ImageCacheItem[]
// 分类统计
categories: Record<string, number>
}
// 图片缓存详细数据响应
export interface ImageCacheDataResponse {
success: boolean
data: ImageCacheData
message?: string
}

View File

@@ -202,6 +202,10 @@ export default {
title: 'Services',
description: 'Scheduled jobs',
},
cache: {
title: 'Cache',
description: 'Torrent cache, media recognition data cache, image file cache management',
},
notification: {
title: 'Notifications',
description: 'Notification channels (WeChat, Telegram, Slack, SynologyChat, VoceChat, WebPush), message scope',
@@ -2455,4 +2459,40 @@ export default {
customBackgroundImageHint: 'Supports web image URLs, leave blank for gradient background',
pluginCount: '{count} Plugins',
},
cache: {
spiderCache: 'Spider Cache',
rssCache: 'RSS Cache',
cacheConfig: 'Cache Config',
torrents: ' torrents',
sites: ' sites',
limit: 'Limit',
perSite: ' per site',
mode: 'Mode',
refreshCache: 'Refresh Cache',
clearCache: 'Clear Cache',
viewCacheData: 'View Cache Data',
hideCacheData: 'Hide Cache Data',
spiderCacheStats: 'Spider Cache Stats',
rssCacheStats: 'RSS Cache Stats',
cacheDataDetails: 'Cache Data Details',
searchTorrents: 'Search Torrents',
siteDomain: 'Site Domain',
cacheCount: 'Cache Count',
latestRelease: 'Latest Release',
torrentTitle: 'Torrent Title',
site: 'Site',
size: 'Size',
releaseTime: 'Release Time',
recognitionInfo: 'Recognition Info',
resourceInfo: 'Resource Info',
actions: 'Actions',
noData: 'No Data',
unknown: 'Unknown',
unrecognized: 'Unrecognized',
confirmClearCache: 'Are you sure you want to clear all torrent cache? This operation cannot be undone.',
fetchStatsError: 'Failed to fetch cache statistics',
fetchDataError: 'Failed to fetch cache data',
refreshError: 'Failed to refresh cache',
clearError: 'Failed to clear cache'
},
}

View File

@@ -202,6 +202,10 @@ export default {
title: '服务',
description: '定时作业',
},
cache: {
title: '缓存',
description: '种子缓存、图片文件缓存管理',
},
notification: {
title: '通知',
description: '通知渠道微信、Telegram、Slack、SynologyChat、VoceChat、WebPush、消息发送范围',
@@ -1366,6 +1370,10 @@ export default {
settingsSaveSuccess: '订阅基础设置保存成功',
settingsSaveFailed: '订阅基础设置保存失败!',
},
cache: {
title: '缓存',
description: '种子缓存、图片文件缓存管理',
},
},
dialog: {
progress: {
@@ -2427,4 +2435,93 @@ export default {
customBackgroundImageHint: '支持网络图片URL留空则使用渐变背景',
pluginCount: '{count} 个插件',
},
cache: {
spiderCache: '爬虫缓存',
rssCache: 'RSS缓存',
cacheConfig: '缓存配置',
torrents: ' 个种子',
sites: ' 个站点',
limit: '限制',
perSite: ' 条/站点',
mode: '模式',
refreshCache: '刷新缓存',
clearCache: '清理缓存',
viewCacheData: '查看缓存数据',
hideCacheData: '隐藏缓存数据',
confirmClearCache: '确定要清理所有缓存吗?此操作不可撤销。',
spiderCacheStats: '爬虫缓存统计',
rssCacheStats: 'RSS缓存统计',
siteDomain: '站点域名',
cacheCount: '缓存数量',
latestRelease: '最新发布',
noData: '无数据',
cacheDataDetails: '缓存数据详情',
searchTorrents: '搜索种子',
torrentTitle: '种子标题',
site: '站点',
size: '大小',
releaseTime: '发布时间',
recognitionInfo: '识别信息',
resourceInfo: '资源信息',
actions: '操作',
unknown: '未知',
unrecognized: '未识别',
refreshError: '刷新缓存失败',
clearError: '清理缓存失败',
fetchStatsError: '获取缓存统计失败',
fetchDataError: '获取缓存数据失败',
deleteSelected: '删除选中 ({count})',
reidentifySelected: '重新识别 ({count})',
confirmDeleteSelected: '确定要删除选中的 {count} 个种子吗?',
confirmDeleteSingle: '确定要删除这个种子吗?',
reidentify: '重新识别',
delete: '删除',
reidentifyTorrents: '重新识别种子',
tmdbId: 'TMDB ID',
tmdbIdHint: '可选手动指定TMDB媒体ID',
doubanId: '豆瓣ID',
doubanIdHint: '可选手动指定豆瓣媒体ID',
reidentifyHint: '如果不填写ID将自动重新识别。填写ID可以手动指定媒体信息。',
executeReidentify: '执行识别',
torrentCache: '种子缓存',
imageCache: '图片缓存',
imageFiles: '图片文件',
files: ' 个文件',
cacheStatus: '缓存状态',
enabled: '已启用',
disabled: '已禁用',
globalImageCache: '全局图片缓存',
cachePath: '缓存路径',
notSet: '未设置',
cleanExpiredImages: '清理过期图片',
clearAllImages: '清理所有图片',
expiredDays: '过期天数',
expiredDaysHint: '清理多少天前的图片文件',
confirmCleanExpiredImages: '确定要清理过期图片吗?',
confirmClearAllImages: '确定要清理所有图片缓存吗?此操作不可撤销。',
cleanExpiredImagesError: '清理过期图片失败',
clearAllImagesError: '清理所有图片失败',
fetchImageCacheStatsError: '获取图片缓存统计失败',
selectSites: '选择站点',
siteSelectHint: '选择要显示的站点,留空显示所有站点',
others: '其他',
poster: '海报',
title: '缓存管理',
torrentCacheDesc: '管理爬虫和RSS缓存的种子数据支持查看、删除和重新识别',
imageCacheDesc: '管理系统缓存的图片文件,包括海报、背景图等',
totalSites: '站点总数',
cacheLimit: '缓存限制',
totalFiles: '文件总数',
totalSize: '总大小',
viewImageData: '查看图片数据',
hideImageData: '隐藏图片数据',
selectedCount: '已选择 {count} 个种子',
openPage: '打开页面',
imageCacheCategories: '图片缓存分类',
images: ' 张图片',
imageGallery: '图片画廊',
autoMode: '自动',
spiderMode: '爬虫',
rssMode: 'RSS',
},
}

View File

@@ -203,6 +203,10 @@ export default {
title: '服務',
description: '定時作業',
},
cache: {
title: '緩存',
description: '種子緩存、識別媒體數據緩存、圖片文件緩存管理',
},
notification: {
title: '通知',
description: '通知渠道微信、Telegram、Slack、SynologyChat、VoceChat、WebPush、消息發送範圍',
@@ -2428,4 +2432,79 @@ export default {
customBackgroundImageHint: '支援網路圖片URL留空則使用漸變背景',
pluginCount: '{count} 個插件',
},
cache: {
spiderCache: '爬蟲快取',
rssCache: 'RSS快取',
cacheConfig: '快取配置',
torrents: ' 個種子',
sites: ' 個站點',
limit: '限制',
perSite: ' 條/站點',
mode: '模式',
refreshCache: '刷新快取',
clearCache: '清理快取',
viewCacheData: '查看快取數據',
hideCacheData: '隱藏快取數據',
confirmClearCache: '確定要清理所有快取嗎?此操作不可撤銷。',
spiderCacheStats: '爬蟲快取統計',
rssCacheStats: 'RSS快取統計',
siteDomain: '站點域名',
cacheCount: '快取數量',
latestRelease: '最新發布',
noData: '無數據',
cacheDataDetails: '快取數據詳情',
searchTorrents: '搜索種子',
torrentTitle: '種子標題',
site: '站點',
size: '大小',
releaseTime: '發布時間',
recognitionInfo: '識別信息',
resourceInfo: '資源信息',
actions: '操作',
unknown: '未知',
unrecognized: '未識別',
refreshError: '刷新快取失敗',
clearError: '清理快取失敗',
fetchStatsError: '獲取快取統計失敗',
fetchDataError: '獲取快取數據失敗',
deleteSelected: '刪除選中 ({count})',
reidentifySelected: '重新識別 ({count})',
confirmDeleteSelected: '確定要刪除選中的 {count} 個種子嗎?',
confirmDeleteSingle: '確定要刪除這個種子嗎?',
reidentify: '重新識別',
delete: '刪除',
reidentifyTorrents: '重新識別種子',
tmdbId: 'TMDB ID',
tmdbIdHint: '可選手動指定TMDB媒體ID',
doubanId: '豆瓣ID',
doubanIdHint: '可選手動指定豆瓣媒體ID',
reidentifyHint: '如果不填寫ID將自動重新識別。填寫ID可以手動指定媒體信息。',
executeReidentify: '執行識別',
// 新增翻譯
torrentCache: '種子快取',
imageCache: '圖片快取',
mediaCache: '媒體數據快取',
imageFiles: '圖片文件',
files: ' 個文件',
cacheStatus: '快取狀態',
enabled: '已啟用',
disabled: '已禁用',
globalImageCache: '全局圖片快取',
cachePath: '快取路徑',
notSet: '未設置',
cleanExpiredImages: '清理過期圖片',
clearAllImages: '清理所有圖片',
expiredDays: '過期天數',
expiredDaysHint: '清理多少天前的圖片文件',
confirmCleanExpiredImages: '確定要清理過期圖片嗎?',
confirmClearAllImages: '確定要清理所有圖片快取嗎?此操作不可撤銷。',
cleanExpiredImagesError: '清理過期圖片失敗',
clearAllImagesError: '清理所有圖片失敗',
fetchImageCacheStatsError: '獲取圖片快取統計失敗',
mediaCacheTitle: '媒體數據快取',
mediaCacheDescription: '媒體數據快取功能正在開發中,敬請期待。',
selectSites: '選擇站點',
siteSelectHint: '選擇要顯示的站點,留空顯示所有站點',
others: '其他'
},
}

View File

@@ -11,6 +11,7 @@ import AccountSettingSystem from '@/views/setting/AccountSettingSystem.vue'
import AccountSettingScheduler from '@/views/setting/AccountSettingScheduler.vue'
import AccountSettingDirectory from '@/views/setting/AccountSettingDirectory.vue'
import AccountSettingRule from '@/views/setting/AccountSettingRule.vue'
import AccountSettingCache from '@/views/setting/AccountSettingCache.vue'
import { getSettingTabs } from '@/router/i18n-menu'
const route = useRoute()
@@ -86,6 +87,15 @@ const settingTabs = computed(() => getSettingTabs())
</transition>
</VWindowItem>
<!-- 缓存 -->
<VWindowItem value="cache">
<transition name="fade-slide" appear>
<div>
<AccountSettingCache />
</div>
</transition>
</VWindowItem>
<!-- 通知 -->
<VWindowItem value="notification">
<transition name="fade-slide" appear>

View File

@@ -170,6 +170,12 @@ export function getSettingTabs() {
tab: 'scheduler',
description: t('settingTabs.scheduler.description'),
},
{
title: t('settingTabs.cache.title'),
icon: 'mdi-database',
tab: 'cache',
description: t('settingTabs.cache.description'),
},
{
title: t('settingTabs.notification.title'),
icon: 'mdi-bell',

File diff suppressed because it is too large Load Diff