mirror of
https://github.com/jxxghp/MoviePilot-Frontend.git
synced 2026-05-26 02:39:43 +08:00
引入 crypto-js 库以计算文件路径的 MD5 值
This commit is contained in:
@@ -6,6 +6,7 @@ import { FileItem, TransferQueue } from '@/api/types'
|
||||
import { useDisplay } from 'vuetify'
|
||||
import { useI18n } from 'vue-i18n'
|
||||
import { useBackgroundOptimization } from '@/composables/useBackgroundOptimization'
|
||||
import CryptoJS from 'crypto-js'
|
||||
|
||||
// 多语言支持
|
||||
const { t } = useI18n()
|
||||
@@ -181,9 +182,10 @@ function startCurrentFileProgress(filePath: string) {
|
||||
}
|
||||
|
||||
if (filePath) {
|
||||
const encodedPath = encodeURIComponent(filePath)
|
||||
// filePath计算md5
|
||||
const filePathMd5 = CryptoJS.MD5(filePath).toString()
|
||||
currentFileProgressSSE = useProgressSSE(
|
||||
`${import.meta.env.VITE_API_BASE_URL}system/progress/${encodedPath}`,
|
||||
`${import.meta.env.VITE_API_BASE_URL}system/progress/${filePathMd5}`,
|
||||
handleCurrentFileProgressMessage,
|
||||
'transfer-queue-current-file-progress',
|
||||
progressActive,
|
||||
|
||||
Reference in New Issue
Block a user