mirror of
https://github.com/timeshiftsauce/CeruMusic.git
synced 2025-11-25 03:15:07 +08:00
fix:下载站下载文件匹配错误问题
This commit is contained in:
31
.vitepress/cache/deps/_metadata.json
vendored
Normal file
31
.vitepress/cache/deps/_metadata.json
vendored
Normal file
@@ -0,0 +1,31 @@
|
||||
{
|
||||
"hash": "23b978c5",
|
||||
"configHash": "c96c5ee9",
|
||||
"lockfileHash": "603038da",
|
||||
"browserHash": "b1457114",
|
||||
"optimized": {
|
||||
"vue": {
|
||||
"src": "../../../node_modules/vue/dist/vue.runtime.esm-bundler.js",
|
||||
"file": "vue.js",
|
||||
"fileHash": "7c4217d1",
|
||||
"needsInterop": false
|
||||
},
|
||||
"vitepress > @vue/devtools-api": {
|
||||
"src": "../../../node_modules/vitepress/node_modules/@vue/devtools-api/dist/index.js",
|
||||
"file": "vitepress___@vue_devtools-api.js",
|
||||
"fileHash": "dc8e5ae9",
|
||||
"needsInterop": false
|
||||
},
|
||||
"vitepress > @vueuse/core": {
|
||||
"src": "../../../node_modules/@vueuse/core/index.mjs",
|
||||
"file": "vitepress___@vueuse_core.js",
|
||||
"fileHash": "74c34320",
|
||||
"needsInterop": false
|
||||
}
|
||||
},
|
||||
"chunks": {
|
||||
"chunk-TH7GRLUQ": {
|
||||
"file": "chunk-TH7GRLUQ.js"
|
||||
}
|
||||
}
|
||||
}
|
||||
12683
.vitepress/cache/deps/chunk-TH7GRLUQ.js
vendored
Normal file
12683
.vitepress/cache/deps/chunk-TH7GRLUQ.js
vendored
Normal file
File diff suppressed because it is too large
Load Diff
7
.vitepress/cache/deps/chunk-TH7GRLUQ.js.map
vendored
Normal file
7
.vitepress/cache/deps/chunk-TH7GRLUQ.js.map
vendored
Normal file
File diff suppressed because one or more lines are too long
3
.vitepress/cache/deps/package.json
vendored
Normal file
3
.vitepress/cache/deps/package.json
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"type": "module"
|
||||
}
|
||||
3844
.vitepress/cache/deps/vitepress___@vue_devtools-api.js
vendored
Normal file
3844
.vitepress/cache/deps/vitepress___@vue_devtools-api.js
vendored
Normal file
File diff suppressed because it is too large
Load Diff
7
.vitepress/cache/deps/vitepress___@vue_devtools-api.js.map
vendored
Normal file
7
.vitepress/cache/deps/vitepress___@vue_devtools-api.js.map
vendored
Normal file
File diff suppressed because one or more lines are too long
9964
.vitepress/cache/deps/vitepress___@vueuse_core.js
vendored
Normal file
9964
.vitepress/cache/deps/vitepress___@vueuse_core.js
vendored
Normal file
File diff suppressed because it is too large
Load Diff
7
.vitepress/cache/deps/vitepress___@vueuse_core.js.map
vendored
Normal file
7
.vitepress/cache/deps/vitepress___@vueuse_core.js.map
vendored
Normal file
File diff suppressed because one or more lines are too long
342
.vitepress/cache/deps/vue.js
vendored
Normal file
342
.vitepress/cache/deps/vue.js
vendored
Normal file
@@ -0,0 +1,342 @@
|
||||
import {
|
||||
BaseTransition,
|
||||
BaseTransitionPropsValidators,
|
||||
Comment,
|
||||
DeprecationTypes,
|
||||
EffectScope,
|
||||
ErrorCodes,
|
||||
ErrorTypeStrings,
|
||||
Fragment,
|
||||
KeepAlive,
|
||||
ReactiveEffect,
|
||||
Static,
|
||||
Suspense,
|
||||
Teleport,
|
||||
Text,
|
||||
TrackOpTypes,
|
||||
Transition,
|
||||
TransitionGroup,
|
||||
TriggerOpTypes,
|
||||
VueElement,
|
||||
assertNumber,
|
||||
callWithAsyncErrorHandling,
|
||||
callWithErrorHandling,
|
||||
camelize,
|
||||
capitalize,
|
||||
cloneVNode,
|
||||
compatUtils,
|
||||
compile,
|
||||
computed,
|
||||
createApp,
|
||||
createBaseVNode,
|
||||
createBlock,
|
||||
createCommentVNode,
|
||||
createElementBlock,
|
||||
createHydrationRenderer,
|
||||
createPropsRestProxy,
|
||||
createRenderer,
|
||||
createSSRApp,
|
||||
createSlots,
|
||||
createStaticVNode,
|
||||
createTextVNode,
|
||||
createVNode,
|
||||
customRef,
|
||||
defineAsyncComponent,
|
||||
defineComponent,
|
||||
defineCustomElement,
|
||||
defineEmits,
|
||||
defineExpose,
|
||||
defineModel,
|
||||
defineOptions,
|
||||
defineProps,
|
||||
defineSSRCustomElement,
|
||||
defineSlots,
|
||||
devtools,
|
||||
effect,
|
||||
effectScope,
|
||||
getCurrentInstance,
|
||||
getCurrentScope,
|
||||
getCurrentWatcher,
|
||||
getTransitionRawChildren,
|
||||
guardReactiveProps,
|
||||
h,
|
||||
handleError,
|
||||
hasInjectionContext,
|
||||
hydrate,
|
||||
hydrateOnIdle,
|
||||
hydrateOnInteraction,
|
||||
hydrateOnMediaQuery,
|
||||
hydrateOnVisible,
|
||||
initCustomFormatter,
|
||||
initDirectivesForSSR,
|
||||
inject,
|
||||
isMemoSame,
|
||||
isProxy,
|
||||
isReactive,
|
||||
isReadonly,
|
||||
isRef,
|
||||
isRuntimeOnly,
|
||||
isShallow,
|
||||
isVNode,
|
||||
markRaw,
|
||||
mergeDefaults,
|
||||
mergeModels,
|
||||
mergeProps,
|
||||
nextTick,
|
||||
normalizeClass,
|
||||
normalizeProps,
|
||||
normalizeStyle,
|
||||
onActivated,
|
||||
onBeforeMount,
|
||||
onBeforeUnmount,
|
||||
onBeforeUpdate,
|
||||
onDeactivated,
|
||||
onErrorCaptured,
|
||||
onMounted,
|
||||
onRenderTracked,
|
||||
onRenderTriggered,
|
||||
onScopeDispose,
|
||||
onServerPrefetch,
|
||||
onUnmounted,
|
||||
onUpdated,
|
||||
onWatcherCleanup,
|
||||
openBlock,
|
||||
popScopeId,
|
||||
provide,
|
||||
proxyRefs,
|
||||
pushScopeId,
|
||||
queuePostFlushCb,
|
||||
reactive,
|
||||
readonly,
|
||||
ref,
|
||||
registerRuntimeCompiler,
|
||||
render,
|
||||
renderList,
|
||||
renderSlot,
|
||||
resolveComponent,
|
||||
resolveDirective,
|
||||
resolveDynamicComponent,
|
||||
resolveFilter,
|
||||
resolveTransitionHooks,
|
||||
setBlockTracking,
|
||||
setDevtoolsHook,
|
||||
setTransitionHooks,
|
||||
shallowReactive,
|
||||
shallowReadonly,
|
||||
shallowRef,
|
||||
ssrContextKey,
|
||||
ssrUtils,
|
||||
stop,
|
||||
toDisplayString,
|
||||
toHandlerKey,
|
||||
toHandlers,
|
||||
toRaw,
|
||||
toRef,
|
||||
toRefs,
|
||||
toValue,
|
||||
transformVNodeArgs,
|
||||
triggerRef,
|
||||
unref,
|
||||
useAttrs,
|
||||
useCssModule,
|
||||
useCssVars,
|
||||
useHost,
|
||||
useId,
|
||||
useModel,
|
||||
useSSRContext,
|
||||
useShadowRoot,
|
||||
useSlots,
|
||||
useTemplateRef,
|
||||
useTransitionState,
|
||||
vModelCheckbox,
|
||||
vModelDynamic,
|
||||
vModelRadio,
|
||||
vModelSelect,
|
||||
vModelText,
|
||||
vShow,
|
||||
version,
|
||||
warn,
|
||||
watch,
|
||||
watchEffect,
|
||||
watchPostEffect,
|
||||
watchSyncEffect,
|
||||
withAsyncContext,
|
||||
withCtx,
|
||||
withDefaults,
|
||||
withDirectives,
|
||||
withKeys,
|
||||
withMemo,
|
||||
withModifiers,
|
||||
withScopeId
|
||||
} from "./chunk-TH7GRLUQ.js";
|
||||
export {
|
||||
BaseTransition,
|
||||
BaseTransitionPropsValidators,
|
||||
Comment,
|
||||
DeprecationTypes,
|
||||
EffectScope,
|
||||
ErrorCodes,
|
||||
ErrorTypeStrings,
|
||||
Fragment,
|
||||
KeepAlive,
|
||||
ReactiveEffect,
|
||||
Static,
|
||||
Suspense,
|
||||
Teleport,
|
||||
Text,
|
||||
TrackOpTypes,
|
||||
Transition,
|
||||
TransitionGroup,
|
||||
TriggerOpTypes,
|
||||
VueElement,
|
||||
assertNumber,
|
||||
callWithAsyncErrorHandling,
|
||||
callWithErrorHandling,
|
||||
camelize,
|
||||
capitalize,
|
||||
cloneVNode,
|
||||
compatUtils,
|
||||
compile,
|
||||
computed,
|
||||
createApp,
|
||||
createBlock,
|
||||
createCommentVNode,
|
||||
createElementBlock,
|
||||
createBaseVNode as createElementVNode,
|
||||
createHydrationRenderer,
|
||||
createPropsRestProxy,
|
||||
createRenderer,
|
||||
createSSRApp,
|
||||
createSlots,
|
||||
createStaticVNode,
|
||||
createTextVNode,
|
||||
createVNode,
|
||||
customRef,
|
||||
defineAsyncComponent,
|
||||
defineComponent,
|
||||
defineCustomElement,
|
||||
defineEmits,
|
||||
defineExpose,
|
||||
defineModel,
|
||||
defineOptions,
|
||||
defineProps,
|
||||
defineSSRCustomElement,
|
||||
defineSlots,
|
||||
devtools,
|
||||
effect,
|
||||
effectScope,
|
||||
getCurrentInstance,
|
||||
getCurrentScope,
|
||||
getCurrentWatcher,
|
||||
getTransitionRawChildren,
|
||||
guardReactiveProps,
|
||||
h,
|
||||
handleError,
|
||||
hasInjectionContext,
|
||||
hydrate,
|
||||
hydrateOnIdle,
|
||||
hydrateOnInteraction,
|
||||
hydrateOnMediaQuery,
|
||||
hydrateOnVisible,
|
||||
initCustomFormatter,
|
||||
initDirectivesForSSR,
|
||||
inject,
|
||||
isMemoSame,
|
||||
isProxy,
|
||||
isReactive,
|
||||
isReadonly,
|
||||
isRef,
|
||||
isRuntimeOnly,
|
||||
isShallow,
|
||||
isVNode,
|
||||
markRaw,
|
||||
mergeDefaults,
|
||||
mergeModels,
|
||||
mergeProps,
|
||||
nextTick,
|
||||
normalizeClass,
|
||||
normalizeProps,
|
||||
normalizeStyle,
|
||||
onActivated,
|
||||
onBeforeMount,
|
||||
onBeforeUnmount,
|
||||
onBeforeUpdate,
|
||||
onDeactivated,
|
||||
onErrorCaptured,
|
||||
onMounted,
|
||||
onRenderTracked,
|
||||
onRenderTriggered,
|
||||
onScopeDispose,
|
||||
onServerPrefetch,
|
||||
onUnmounted,
|
||||
onUpdated,
|
||||
onWatcherCleanup,
|
||||
openBlock,
|
||||
popScopeId,
|
||||
provide,
|
||||
proxyRefs,
|
||||
pushScopeId,
|
||||
queuePostFlushCb,
|
||||
reactive,
|
||||
readonly,
|
||||
ref,
|
||||
registerRuntimeCompiler,
|
||||
render,
|
||||
renderList,
|
||||
renderSlot,
|
||||
resolveComponent,
|
||||
resolveDirective,
|
||||
resolveDynamicComponent,
|
||||
resolveFilter,
|
||||
resolveTransitionHooks,
|
||||
setBlockTracking,
|
||||
setDevtoolsHook,
|
||||
setTransitionHooks,
|
||||
shallowReactive,
|
||||
shallowReadonly,
|
||||
shallowRef,
|
||||
ssrContextKey,
|
||||
ssrUtils,
|
||||
stop,
|
||||
toDisplayString,
|
||||
toHandlerKey,
|
||||
toHandlers,
|
||||
toRaw,
|
||||
toRef,
|
||||
toRefs,
|
||||
toValue,
|
||||
transformVNodeArgs,
|
||||
triggerRef,
|
||||
unref,
|
||||
useAttrs,
|
||||
useCssModule,
|
||||
useCssVars,
|
||||
useHost,
|
||||
useId,
|
||||
useModel,
|
||||
useSSRContext,
|
||||
useShadowRoot,
|
||||
useSlots,
|
||||
useTemplateRef,
|
||||
useTransitionState,
|
||||
vModelCheckbox,
|
||||
vModelDynamic,
|
||||
vModelRadio,
|
||||
vModelSelect,
|
||||
vModelText,
|
||||
vShow,
|
||||
version,
|
||||
warn,
|
||||
watch,
|
||||
watchEffect,
|
||||
watchPostEffect,
|
||||
watchSyncEffect,
|
||||
withAsyncContext,
|
||||
withCtx,
|
||||
withDefaults,
|
||||
withDirectives,
|
||||
withKeys,
|
||||
withMemo,
|
||||
withModifiers,
|
||||
withScopeId
|
||||
};
|
||||
7
.vitepress/cache/deps/vue.js.map
vendored
Normal file
7
.vitepress/cache/deps/vue.js.map
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"version": 3,
|
||||
"sources": [],
|
||||
"sourcesContent": [],
|
||||
"mappings": "",
|
||||
"names": []
|
||||
}
|
||||
4
src/renderer/components.d.ts
vendored
4
src/renderer/components.d.ts
vendored
@@ -26,17 +26,21 @@ declare module 'vue' {
|
||||
TAside: typeof import('tdesign-vue-next')['Aside']
|
||||
TBadge: typeof import('tdesign-vue-next')['Badge']
|
||||
TButton: typeof import('tdesign-vue-next')['Button']
|
||||
TCard: typeof import('tdesign-vue-next')['Card']
|
||||
TContent: typeof import('tdesign-vue-next')['Content']
|
||||
TDialog: typeof import('tdesign-vue-next')['Dialog']
|
||||
TDropdown: typeof import('tdesign-vue-next')['Dropdown']
|
||||
TForm: typeof import('tdesign-vue-next')['Form']
|
||||
TFormItem: typeof import('tdesign-vue-next')['FormItem']
|
||||
ThemeSelector: typeof import('./src/components/ThemeSelector.vue')['default']
|
||||
TIcon: typeof import('tdesign-vue-next')['Icon']
|
||||
TImage: typeof import('tdesign-vue-next')['Image']
|
||||
TInput: typeof import('tdesign-vue-next')['Input']
|
||||
TitleBarControls: typeof import('./src/components/TitleBarControls.vue')['default']
|
||||
TLayout: typeof import('tdesign-vue-next')['Layout']
|
||||
TLoading: typeof import('tdesign-vue-next')['Loading']
|
||||
TSlider: typeof import('tdesign-vue-next')['Slider']
|
||||
TSwitch: typeof import('tdesign-vue-next')['Switch']
|
||||
TTextarea: typeof import('tdesign-vue-next')['Textarea']
|
||||
TTooltip: typeof import('tdesign-vue-next')['Tooltip']
|
||||
UpdateExample: typeof import('./src/components/UpdateExample.vue')['default']
|
||||
|
||||
@@ -441,7 +441,7 @@ const handleLowFreqUpdate = (volume: number) => {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background-color: rgba(0, 0, 0, 0.256);
|
||||
drop-filter: blur(10px);
|
||||
-webkit-drop-filter: blur(10px);
|
||||
padding: 0 10vw;
|
||||
-webkit-drop-filter: blur(10px);
|
||||
overflow: hidden;
|
||||
|
||||
@@ -755,7 +755,7 @@ watch(showFullPlay, (val) => {
|
||||
<div class="player-content">
|
||||
<!-- 左侧:封面和歌曲信息 -->
|
||||
<div class="left-section">
|
||||
<div class="album-cover" v-if="songInfo.albumId">
|
||||
<div class="album-cover" v-if="songInfo.songmid">
|
||||
<img :src="songInfo.img" alt="专辑封面" v-if="songInfo.img" />
|
||||
<img :src="defaultCoverImg" alt="默认封面" />
|
||||
</div>
|
||||
|
||||
@@ -299,18 +299,30 @@ function findFileForPlatform(files, platform) {
|
||||
return null
|
||||
}
|
||||
|
||||
// Define file patterns for each platform
|
||||
// Filter out unwanted files (yml, yaml, txt, md, etc.)
|
||||
const filteredFiles = files.filter(file => {
|
||||
const name = file.name.toLowerCase()
|
||||
return !name.endsWith('.yml') &&
|
||||
!name.endsWith('.yaml') &&
|
||||
!name.endsWith('.txt') &&
|
||||
!name.endsWith('.md') &&
|
||||
!name.endsWith('.json') &&
|
||||
!name.includes('latest') &&
|
||||
!name.includes('blockmap')
|
||||
})
|
||||
|
||||
// Define file patterns for each platform (ordered by priority)
|
||||
const patterns = {
|
||||
windows: [/\\.exe$/i, /windows.*\\.zip$/i, /win32.*\\.zip$/i, /win.*x64.*\\.zip$/i],
|
||||
macos: [/\\.dmg$/i, /darwin.*\\.zip$/i, /macos.*\\.zip$/i, /mac.*\\.zip$/i, /osx.*\\.zip$/i],
|
||||
linux: [/\\.AppImage$/i, /linux.*\\.zip$/i, /linux.*\\.tar\\.gz$/i, /\\.deb$/i, /\\.rpm$/i]
|
||||
windows: [/ceru-music.*setup\\.exe$/i, /\\.exe$/i, /windows.*\\.zip$/i, /win32.*\\.zip$/i, /win.*x64.*\\.zip$/i],
|
||||
macos: [/ceru-music.*\\.dmg$/i, /\\.dmg$/i, /darwin.*\\.zip$/i, /macos.*\\.zip$/i, /mac.*\\.zip$/i, /osx.*\\.zip$/i],
|
||||
linux: [/ceru-music.*amd64\\.deb$/i, /\\.deb$/i, /\\.AppImage$/i, /linux.*\\.zip$/i, /linux.*\\.tar\\.gz$/i, /\\.rpm$/i]
|
||||
}
|
||||
|
||||
const platformPatterns = patterns[platform] || []
|
||||
|
||||
// Try to find exact match
|
||||
for (const pattern of platformPatterns) {
|
||||
const file = files.find((file) => pattern.test(file.name))
|
||||
const file = filteredFiles.find((file) => pattern.test(file.name))
|
||||
if (file) {
|
||||
return file.name
|
||||
}
|
||||
@@ -325,7 +337,7 @@ function findFileForPlatform(files, platform) {
|
||||
|
||||
const fallbackPattern = fallbackPatterns[platform]
|
||||
if (fallbackPattern) {
|
||||
const file = files.find((file) => fallbackPattern.test(file.name))
|
||||
const file = filteredFiles.find((file) => fallbackPattern.test(file.name))
|
||||
if (file) {
|
||||
return file.name
|
||||
}
|
||||
@@ -340,18 +352,30 @@ function findDownloadAsset(assets, platform) {
|
||||
return null
|
||||
}
|
||||
|
||||
// Define file patterns for each platform
|
||||
// Filter out unwanted files (yml, yaml, txt, md, etc.)
|
||||
const filteredAssets = assets.filter(asset => {
|
||||
const name = asset.name.toLowerCase()
|
||||
return !name.endsWith('.yml') &&
|
||||
!name.endsWith('.yaml') &&
|
||||
!name.endsWith('.txt') &&
|
||||
!name.endsWith('.md') &&
|
||||
!name.endsWith('.json') &&
|
||||
!name.includes('latest') &&
|
||||
!name.includes('blockmap')
|
||||
})
|
||||
|
||||
// Define file patterns for each platform (ordered by priority)
|
||||
const patterns = {
|
||||
windows: [/\.exe$/i, /windows.*\.zip$/i, /win32.*\.zip$/i, /win.*x64.*\.zip$/i],
|
||||
macos: [/\.dmg$/i, /darwin.*\.zip$/i, /macos.*\.zip$/i, /mac.*\.zip$/i, /osx.*\.zip$/i],
|
||||
linux: [/\.AppImage$/i, /linux.*\.zip$/i, /linux.*\.tar\.gz$/i, /\.deb$/i, /\.rpm$/i]
|
||||
windows: [/ceru-music.*setup\.exe$/i, /\.exe$/i, /windows.*\.zip$/i, /win32.*\.zip$/i, /win.*x64.*\.zip$/i],
|
||||
macos: [/ceru-music.*\.dmg$/i, /\.dmg$/i, /darwin.*\.zip$/i, /macos.*\.zip$/i, /mac.*\.zip$/i, /osx.*\.zip$/i],
|
||||
linux: [/ceru-music.*amd64\.deb$/i, /\.deb$/i, /\.AppImage$/i, /linux.*\.zip$/i, /linux.*\.tar\.gz$/i, /\.rpm$/i]
|
||||
}
|
||||
|
||||
const platformPatterns = patterns[platform] || []
|
||||
|
||||
// Try to find exact match
|
||||
for (const pattern of platformPatterns) {
|
||||
const asset = assets.find((asset) => pattern.test(asset.name))
|
||||
const asset = filteredAssets.find((asset) => pattern.test(asset.name))
|
||||
if (asset) {
|
||||
return asset.browser_download_url
|
||||
}
|
||||
@@ -366,7 +390,7 @@ function findDownloadAsset(assets, platform) {
|
||||
|
||||
const fallbackPattern = fallbackPatterns[platform]
|
||||
if (fallbackPattern) {
|
||||
const asset = assets.find((asset) => fallbackPattern.test(asset.name))
|
||||
const asset = filteredAssets.find((asset) => fallbackPattern.test(asset.name))
|
||||
if (asset) {
|
||||
return asset.browser_download_url
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user