diff --git a/package.json b/package.json index 59decae2..feb975a2 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "moviepilot", - "version": "1.0.1", + "version": "1.0.2", "private": true, "scripts": { "dev": "vite --host", diff --git a/public/plugin/rss.png b/public/plugin/rss.png new file mode 100644 index 00000000..d13b4fcf Binary files /dev/null and b/public/plugin/rss.png differ diff --git a/src/api/types.ts b/src/api/types.ts index 89419b48..80bce242 100644 --- a/src/api/types.ts +++ b/src/api/types.ts @@ -626,7 +626,7 @@ export interface MetaInfo { year?: string // 总季数 - total_seasons: number + total_season: number // 识别的开始季 数字 begin_season?: number diff --git a/src/components/cards/DownloadingCard.vue b/src/components/cards/DownloadingCard.vue index e6e07059..cda411aa 100644 --- a/src/components/cards/DownloadingCard.vue +++ b/src/components/cards/DownloadingCard.vue @@ -40,8 +40,8 @@ function getTextClass() { async function toggleDownload() { const operation = isDownloading.value ? 'stop' : 'start' try { - const result: { [key: string]: any } = await api.put( - `download/${props.info?.hash}/${operation}`, + const result: { [key: string]: any } = await api.get( + `download/${operation}/${props.info?.hash}`, ) if (result.success) @@ -109,9 +109,10 @@ async function deleteDownload() { - - {{ isDownloading ? "暂停" : "开始" }} - + (props.media ?? {}) +// 类型转换 +rssForm.best_version = rssForm.best_version === 1 +rssForm.proxy = rssForm.proxy === 1 +rssForm.filter = rssForm.filter === 1 + // 上一次更新时间 const lastUpdateText = ref( `${ diff --git a/src/components/cards/SiteCard.vue b/src/components/cards/SiteCard.vue index 91e1dce1..42ccdf06 100644 --- a/src/components/cards/SiteCard.vue +++ b/src/components/cards/SiteCard.vue @@ -73,7 +73,7 @@ const resourceTotalItems = ref(0) const resourceItemsPerPage = ref(25) // 当前页码 -const resourceCurrentPage = ref(1) +const resourceCurrentPage = ref(0) // 用户名密码表单 const userPwForm = ref({ @@ -90,6 +90,10 @@ const statusItems = [ // 站点编辑表单数据 const siteForm = reactive(cardProps.site ?? {}) +// 类型转换 +siteForm.proxy = siteForm.proxy === 1 +siteForm.render = siteForm.render === 1 + // 打开种子详情页面 function openTorrentDetail(page_url: string) { window.open(page_url, '_blank') @@ -216,6 +220,18 @@ async function updateSiteInfo() { } } +// 促销Chip类 +function getVolumeFactorClass(downloadVolume: number, uploadVolume: number) { + if (downloadVolume === 0) + return 'text-white bg-lime-500' + else if (downloadVolume < 1) + return 'text-white bg-green-500' + else if (uploadVolume !== 1) + return 'text-white bg-sky-500' + else + return 'text-white bg-gray-500' +} + // 调用API,查询站点资源 async function getResourceList() { resourceLoading.value = true @@ -576,6 +592,17 @@ onMounted(() => { > {{ label }} + + {{ item.raw?.volume_factor }} +