From 5c464f60f0a747641132568339157b308f008dc0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=B1=A0=E9=B1=BC=E9=B1=BC?= <109492503+kazukokawagawa@users.noreply.github.com> Date: Sat, 31 Jan 2026 07:36:38 +0000 Subject: [PATCH] Revert "Dev cy (#782)" This reverts commit afc7f6987045a85e099ecde17b5c885b11768ae3. --- components.d.ts | 2 - electron/main/ipc/ipc-file.ts | 35 +- src/components/Card/SongCard.vue | 18 +- src/components/Card/SongDataCard.vue | 16 +- src/components/Card/SongListCard.vue | 3 +- src/components/List/ArtistList.vue | 31 +- src/components/List/CommentList.vue | 16 +- src/components/List/CoverList.vue | 56 +- src/components/List/ListDetail.vue | 46 +- src/components/List/SongList.vue | 2 +- src/components/List/SongPlayList.vue | 25 +- src/components/Modal/JumpArtist.vue | 7 +- src/components/Modal/Setting/CoverManager.vue | 96 ---- .../Modal/Setting/PlaylistPageManager.vue | 63 --- src/components/Player/FullPlayerMobile.vue | 2 +- src/components/Player/MainPlayer.vue | 23 +- .../Player/PlayerComponents/PersonalFM.vue | 55 +- .../Player/PlayerComponents/PlayerComment.vue | 2 +- .../Player/PlayerMeta/PlayerData.vue | 18 +- src/components/Setting/AboutSetting.vue | 17 +- src/components/Setting/MainSetting.vue | 73 +-- src/components/Setting/config/appearance.ts | 488 ------------------ src/components/Setting/config/general.ts | 447 +++++++++------- src/components/Setting/config/local.ts | 2 +- src/components/Setting/config/lyric.ts | 45 +- src/components/Setting/config/other.ts | 291 +++++++++++ src/components/Setting/config/play.ts | 327 +++++++++--- src/components/Setting/config/streaming.ts | 40 ++ .../Setting/config/{network.ts => third.ts} | 184 +------ src/core/audio-player/AudioElementPlayer.ts | 25 +- src/core/audio-player/IPlaybackEngine.ts | 6 - src/core/player/AudioManager.ts | 8 - src/core/player/LyricManager.ts | 192 ------- src/core/player/PlayerController.ts | 58 --- src/stores/setting.ts | 84 +-- src/style/animate.scss | 71 --- src/types/main.ts | 14 +- src/utils/modal.ts | 32 -- src/views/Artist/layout.vue | 12 +- src/views/Artist/videos.vue | 4 - src/views/Discover/artists.vue | 10 +- src/views/Discover/new.vue | 4 - src/views/Discover/playlists.vue | 4 +- src/views/Discover/toplists.vue | 23 +- src/views/Home/HomeOnline.vue | 6 +- src/views/Like/albums.vue | 10 +- src/views/Like/artists.vue | 9 +- src/views/Like/playlists.vue | 11 +- src/views/Like/radios.vue | 10 +- src/views/Like/videos.vue | 4 +- src/views/Radio/hot.vue | 16 +- src/views/Radio/type.vue | 16 +- src/views/Search/videos.vue | 4 - src/views/Song/wiki.vue | 34 +- src/views/Streaming/layout.vue | 2 +- src/views/Video.vue | 11 +- 56 files changed, 1047 insertions(+), 2063 deletions(-) delete mode 100644 src/components/Modal/Setting/CoverManager.vue delete mode 100644 src/components/Modal/Setting/PlaylistPageManager.vue delete mode 100644 src/components/Setting/config/appearance.ts create mode 100644 src/components/Setting/config/other.ts create mode 100644 src/components/Setting/config/streaming.ts rename src/components/Setting/config/{network.ts => third.ts} (70%) diff --git a/components.d.ts b/components.d.ts index d9247dcfe..05a460bd3 100644 --- a/components.d.ts +++ b/components.d.ts @@ -29,7 +29,6 @@ declare module 'vue' { copy: typeof import('./src/components/Global/Provider copy.vue')['default'] CopyLyrics: typeof import('./src/components/Modal/CopyLyrics.vue')['default'] CoverList: typeof import('./src/components/List/CoverList.vue')['default'] - CoverManager: typeof import('./src/components/Modal/Setting/CoverManager.vue')['default'] CoverMenu: typeof import('./src/components/Menu/CoverMenu.vue')['default'] CreatePlaylist: typeof import('./src/components/Modal/CreatePlaylist.vue')['default'] CustomCode: typeof import('./src/components/Modal/Setting/CustomCode.vue')['default'] @@ -162,7 +161,6 @@ declare module 'vue' { PlayerSlider: typeof import('./src/components/Player/PlayerComponents/PlayerSlider.vue')['default'] PlayerSpectrum: typeof import('./src/components/Player/PlayerComponents/PlayerSpectrum.vue')['default'] PlaylistAdd: typeof import('./src/components/Modal/PlaylistAdd.vue')['default'] - PlaylistPageManager: typeof import('./src/components/Modal/Setting/PlaylistPageManager.vue')['default'] PlaySetting: typeof import('./src/components/Setting/old/PlaySetting.vue')['default'] Provider: typeof import('./src/components/Global/Provider.vue')['default'] ProxyConfig: typeof import('./src/components/Setting/components/ProxyConfig.vue')['default'] diff --git a/electron/main/ipc/ipc-file.ts b/electron/main/ipc/ipc-file.ts index 332dec0c0..649fc2f15 100644 --- a/electron/main/ipc/ipc-file.ts +++ b/electron/main/ipc/ipc-file.ts @@ -156,12 +156,6 @@ const initFileIpc = (): void => { size: (size / (1024 * 1024)).toFixed(2), path: fullPath, quality: format.bitrate ?? 0, - replayGain: { - trackGain: common.replaygain_track_gain?.ratio, - trackPeak: common.replaygain_track_peak?.ratio, - albumGain: common.replaygain_album_gain?.ratio, - albumPeak: common.replaygain_album_peak?.ratio, - }, }; } catch (err) { ipcLog.warn(`⚠️ Failed to parse file: ${fullPath}`, err); @@ -199,12 +193,6 @@ const initFileIpc = (): void => { format, // md5 md5: await getFileMD5(filePath), - replayGain: { - trackGain: common.replaygain_track_gain?.ratio, - trackPeak: common.replaygain_track_peak?.ratio, - albumGain: common.replaygain_album_gain?.ratio, - albumPeak: common.replaygain_album_peak?.ratio, - }, }; } catch (error) { ipcLog.error("❌ Error fetching music metadata:", error); @@ -648,26 +636,9 @@ const initFileIpc = (): void => { Id3v2Settings.defaultVersion = 3; songFile.tag.title = songData?.name || "未知曲目"; - songFile.tag.album = - (typeof songData?.album === "string" ? songData.album : songData?.album?.name) || "未知专辑"; - // 处理歌手信息(兼容字符串和数组格式) - const getArtistNames = (artists: any): string[] => { - if (Array.isArray(artists)) { - return artists - .map((ar: any) => (typeof ar === "string" ? ar : ar?.name || "")) - .filter((name) => name && name.trim().length > 0); - } - if (typeof artists === "string" && artists.trim().length > 0) { - return [artists]; - } - return []; - }; - - const artistNames = getArtistNames(songData?.artists); - const finalArtists = artistNames.length > 0 ? artistNames : ["未知艺术家"]; - - songFile.tag.performers = finalArtists; - songFile.tag.albumArtists = finalArtists; + songFile.tag.album = songData?.album?.name || "未知专辑"; + songFile.tag.performers = songData?.artists?.map((ar: any) => ar.name) || ["未知艺术家"]; + songFile.tag.albumArtists = songData?.artists?.map((ar: any) => ar.name) || ["未知艺术家"]; if (lyric && downloadLyric) songFile.tag.lyrics = lyric; if (songCover && downloadCover) songFile.tag.pictures = [songCover]; // 保存元信息 diff --git a/src/components/Card/SongCard.vue b/src/components/Card/SongCard.vue index 5dc66e46b..49ac0ead1 100644 --- a/src/components/Card/SongCard.vue +++ b/src/components/Card/SongCard.vue @@ -40,12 +40,12 @@ class="name-text" > {{ - settingStore.hideBracketedContent + settingStore.hideLyricBrackets ? removeBrackets(song?.name) : song?.name || "未知曲目" }} @@ -120,22 +120,14 @@ class="ar" @click="openJumpArtist(song.artists, ar.id)" > - {{ - settingStore.hideBracketedContent ? removeBrackets(ar.name) : ar.name - }} + {{ ar.name }}
电台节目
- - {{ - settingStore.hideBracketedContent - ? removeBrackets(song.artists) - : song.artists || "未知艺术家" - }} - + {{ song.artists || "未知艺术家" }}
@@ -244,7 +236,7 @@ const qualityColor = computed(() => { const albumName = computed(() => { const album = song.value.album; const name = isObject(album) ? album.name : album; - return (settingStore.hideBracketedContent ? removeBrackets(name) : name) || "未知专辑"; + return (settingStore.hideLyricBrackets ? removeBrackets(name) : name) || "未知专辑"; }); // 加载本地歌曲封面 diff --git a/src/components/Card/SongDataCard.vue b/src/components/Card/SongDataCard.vue index bd8bcec9f..2760a1560 100644 --- a/src/components/Card/SongDataCard.vue +++ b/src/components/Card/SongDataCard.vue @@ -19,20 +19,12 @@
- {{ - settingStore.hideBracketedContent ? removeBrackets(ar.name) : ar.name - }} + {{ ar.name }}
- - {{ - settingStore.hideBracketedContent - ? removeBrackets(data.artists) - : data.artists || "未知艺术家" - }} - + {{ data.artists || "未知艺术家" }}
@@ -55,10 +47,6 @@ import type { SongType } from "@/types/main"; import { coverLoaded } from "@/utils/helper"; import { isObject } from "lodash-es"; -import { removeBrackets } from "@/utils/format"; -import { useSettingStore } from "@/stores"; - -const settingStore = useSettingStore(); defineProps<{ data: SongType | null; diff --git a/src/components/Card/SongListCard.vue b/src/components/Card/SongListCard.vue index cedff1a32..242954eee 100644 --- a/src/components/Card/SongListCard.vue +++ b/src/components/Card/SongListCard.vue @@ -7,7 +7,7 @@
-
+
- - {{ - settingStore.hideBracketedContent - ? removeBrackets(musicStore.playSong.artists) - : musicStore.playSong.artists || "未知艺术家" - }} + + {{ musicStore.playSong.artists || "未知艺术家" }}
diff --git a/src/components/Player/PlayerComponents/PersonalFM.vue b/src/components/Player/PlayerComponents/PersonalFM.vue index 493d7da12..6e8c97bd6 100644 --- a/src/components/Player/PlayerComponents/PersonalFM.vue +++ b/src/components/Player/PlayerComponents/PersonalFM.vue @@ -3,7 +3,6 @@ -
+
{{ musicStore.personalFMSong?.name || "未知曲目" }} @@ -41,13 +37,6 @@
- -
+ +
@@ -82,13 +78,12 @@ diff --git a/src/views/Like/artists.vue b/src/views/Like/artists.vue index beb0a9e96..6e26c165f 100644 --- a/src/views/Like/artists.vue +++ b/src/views/Like/artists.vue @@ -1,16 +1,11 @@ diff --git a/src/views/Like/playlists.vue b/src/views/Like/playlists.vue index edd9cb53f..dc2326df1 100644 --- a/src/views/Like/playlists.vue +++ b/src/views/Like/playlists.vue @@ -14,22 +14,15 @@ - +
diff --git a/src/views/Like/videos.vue b/src/views/Like/videos.vue index 673567bf5..a4db18ce1 100644 --- a/src/views/Like/videos.vue +++ b/src/views/Like/videos.vue @@ -5,14 +5,12 @@ :loading="true" cols="2 600:2 800:3 900:4 1200:5 1400:6" type="video" - :hiddenCover="settingStore.hiddenCovers.like" />
diff --git a/src/views/Radio/hot.vue b/src/views/Radio/hot.vue index f28c489ec..5c67e4bbc 100644 --- a/src/views/Radio/hot.vue +++ b/src/views/Radio/hot.vue @@ -45,24 +45,14 @@ 热门推荐 - +
@@ -73,7 +63,6 @@ import type { CoverType } from "@/types/main"; import { radioCatList, radioToplist, radioTypes } from "@/api/radio"; import { getCacheData } from "@/utils/cache"; import { formatCoverList } from "@/utils/format"; -import { useSettingStore } from "@/stores"; interface RadioType { id: number; @@ -82,7 +71,6 @@ interface RadioType { } const router = useRouter(); -const settingStore = useSettingStore(); // 栅格折叠 const gridCollapsed = ref(true); diff --git a/src/views/Radio/type.vue b/src/views/Radio/type.vue index aabd83cdf..3082a3655 100644 --- a/src/views/Radio/type.vue +++ b/src/views/Radio/type.vue @@ -13,20 +13,10 @@ - + - + @@ -36,10 +26,8 @@ import { radioCatHot, radioCatRecommend } from "@/api/radio"; import type { CoverType } from "@/types/main"; import { formatCoverList } from "@/utils/format"; -import { useSettingStore } from "@/stores"; const router = useRouter(); -const settingStore = useSettingStore(); // 播客数据 const radioId = ref(Number(router.currentRoute.value.query.id as string)); diff --git a/src/views/Search/videos.vue b/src/views/Search/videos.vue index cb64365b6..0b07f884e 100644 --- a/src/views/Search/videos.vue +++ b/src/views/Search/videos.vue @@ -8,7 +8,6 @@ :loadMore="hasMore" cols="2 600:2 800:3 900:4 1200:5 1400:6" type="video" - :hiddenCover="settingStore.hiddenCovers.video" @loadMore="loadMore" /> (); -const settingStore = useSettingStore(); - // 搜索数据 const hasMore = ref(true); const loading = ref(true); diff --git a/src/views/Song/wiki.vue b/src/views/Song/wiki.vue index 7eedb9764..deb318f4a 100644 --- a/src/views/Song/wiki.vue +++ b/src/views/Song/wiki.vue @@ -22,11 +22,7 @@ />
- {{ - settingStore.hideBracketedContent - ? removeBrackets(currentSong.name) - : currentSong.name - }} + {{ currentSong.name }}
@@ -37,19 +33,11 @@ :key="ar.id" @click="$router.push({ name: 'artist', query: { id: ar.id } })" > - {{ - settingStore.hideBracketedContent - ? removeBrackets(ar.name) - : ar.name - }} + {{ ar.name }} / - {{ - settingStore.hideBracketedContent - ? removeBrackets(currentSong.artists) - : currentSong.artists - }} + {{ currentSong.artists }}
@@ -59,17 +47,9 @@ class="text-hidden" @click="$router.push({ name: 'album', query: { id: currentSong.album.id } })" > - {{ - settingStore.hideBracketedContent - ? removeBrackets(currentSong.album.name) - : currentSong.album.name - }} + {{ currentSong.album.name }} - {{ - settingStore.hideBracketedContent - ? removeBrackets(currentSong.album) - : currentSong.album - }} + {{ currentSong.album }}
@@ -297,13 +277,11 @@ import { songSheetPreview, songFirstListenInfo, } from "@/api/song"; -import { formatSongsList, removeBrackets } from "@/utils/format"; -import { useSettingStore } from "@/stores"; +import { formatSongsList } from "@/utils/format"; import dayjs from "dayjs"; const route = useRoute(); const player = usePlayerController(); -const settingStore = useSettingStore(); const loading = ref(true); const currentSongId = ref(0); diff --git a/src/views/Streaming/layout.vue b/src/views/Streaming/layout.vue index 46ec27969..64dfbcbf6 100644 --- a/src/views/Streaming/layout.vue +++ b/src/views/Streaming/layout.vue @@ -251,7 +251,7 @@ const moreOptions = computed(() => [ label: "流媒体设置", key: "setting", props: { - onClick: () => openSetting("network"), + onClick: () => openSetting("streaming"), }, icon: renderIcon("Settings"), }, diff --git a/src/views/Video.vue b/src/views/Video.vue index fedc9bd76..edba7241e 100644 --- a/src/views/Video.vue +++ b/src/views/Video.vue @@ -46,12 +46,7 @@ }) " > - + {{ artistData?.name || "未知歌手" }}
@@ -124,7 +119,6 @@ :type="videoType === 'mv' ? 1 : 5" :loadMore="commentHasMore" :res-id="videoId" - :hiddenCover="settingStore.hiddenCovers.videoDetail" @loadMore="loadMoreComment" /> @@ -133,7 +127,7 @@