Full Code of maotoumao/MusicFreeDesktop for AI

master f3b526a6c1ea cached
410 files
1020.1 KB
244.8k tokens
941 symbols
1 requests
Download .txt
Showing preview only (1,130K chars total). Download the full file or copy to clipboard to get everything.
Repository: maotoumao/MusicFreeDesktop
Branch: master
Commit: f3b526a6c1ea
Files: 410
Total size: 1020.1 KB

Directory structure:
gitextract_9squytp3/

├── .github/
│   ├── PULL_REQUEST_TEMPLATE.md
│   └── workflows/
│       ├── build.yml
│       └── release.yml
├── .gitignore
├── .husky/
│   └── pre-commit
├── .vscode/
│   └── settings.json
├── LICENSE
├── README.md
├── changelog.md
├── config/
│   ├── webpack.main.config.ts
│   ├── webpack.plugins.ts
│   ├── webpack.renderer.config.ts
│   └── webpack.rules.ts
├── eslint.config.mjs
├── forge.config.ts
├── package.json
├── release/
│   ├── build-windows.iss
│   └── version.json
├── res/
│   ├── .service/
│   │   └── request-forwarder.js
│   ├── lang/
│   │   ├── en-US.json
│   │   ├── zh-CN.json
│   │   └── zh-TW.json
│   └── logo.icns
├── scripts/
│   └── feishu-upload.js
├── src/
│   ├── common/
│   │   ├── async-memoize.ts
│   │   ├── camel-to-snake.ts
│   │   ├── constant.ts
│   │   ├── debounce.ts
│   │   ├── event-wrapper.ts
│   │   ├── file-util.ts
│   │   ├── get-resource-path.ts
│   │   ├── index-map.ts
│   │   ├── is-renderer.ts
│   │   ├── media-util.ts
│   │   ├── normalize-util.ts
│   │   ├── safe-serialization.ts
│   │   ├── store.ts
│   │   ├── thumb-bar-util.ts
│   │   ├── time-util.ts
│   │   ├── unique-map.ts
│   │   └── void-callback.ts
│   ├── hooks/
│   │   ├── useAppConfig.ts
│   │   ├── useLocalFonts.ts
│   │   ├── useMediaDevices.ts
│   │   ├── useMounted.ts
│   │   ├── useStateRef.ts
│   │   └── useVirtualList.ts
│   ├── main/
│   │   ├── deep-link/
│   │   │   └── index.ts
│   │   ├── index.ts
│   │   ├── native_modules/
│   │   │   └── TaskbarThumbnailManager/
│   │   │       ├── TaskbarThumbnailManager.node
│   │   │       └── TaskbarThumbnailManager.node.d.ts
│   │   ├── tray-manager/
│   │   │   └── index.ts
│   │   └── window-manager/
│   │       └── index.ts
│   ├── preload/
│   │   ├── common-preload.ts
│   │   ├── extension.ts
│   │   └── index.ts
│   ├── renderer/
│   │   ├── app.scss
│   │   ├── app.tsx
│   │   ├── components/
│   │   │   ├── A/
│   │   │   │   └── index.tsx
│   │   │   ├── AnimatedDiv/
│   │   │   │   └── index.tsx
│   │   │   ├── ArtistItem/
│   │   │   │   ├── index.scss
│   │   │   │   └── index.tsx
│   │   │   ├── BottomLoadingState/
│   │   │   │   ├── index.scss
│   │   │   │   └── index.tsx
│   │   │   ├── Checkbox/
│   │   │   │   ├── index.scss
│   │   │   │   └── index.tsx
│   │   │   ├── Condition/
│   │   │   │   └── index.tsx
│   │   │   ├── ContextMenu/
│   │   │   │   ├── index.scss
│   │   │   │   └── index.tsx
│   │   │   ├── DragReceiver/
│   │   │   │   ├── index.scss
│   │   │   │   └── index.tsx
│   │   │   ├── Empty/
│   │   │   │   ├── index.scss
│   │   │   │   └── index.tsx
│   │   │   ├── Header/
│   │   │   │   ├── index.scss
│   │   │   │   ├── index.tsx
│   │   │   │   └── widgets/
│   │   │   │       ├── Navigator/
│   │   │   │       │   ├── index.scss
│   │   │   │       │   └── index.tsx
│   │   │   │       └── SearchHistory/
│   │   │   │           ├── index.scss
│   │   │   │           └── index.tsx
│   │   │   ├── Loading/
│   │   │   │   ├── index.scss
│   │   │   │   └── index.tsx
│   │   │   ├── Modal/
│   │   │   │   ├── index.tsx
│   │   │   │   └── templates/
│   │   │   │       ├── AddMusicToSheet/
│   │   │   │       │   ├── index.scss
│   │   │   │       │   └── index.tsx
│   │   │   │       ├── AddNewSheet/
│   │   │   │       │   └── index.tsx
│   │   │   │       ├── Base/
│   │   │   │       │   ├── index.scss
│   │   │   │       │   └── index.tsx
│   │   │   │       ├── ExitConfirm/
│   │   │   │       │   ├── index.scss
│   │   │   │       │   └── index.tsx
│   │   │   │       ├── ImportMusicSheet/
│   │   │   │       │   ├── index.scss
│   │   │   │       │   └── index.tsx
│   │   │   │       ├── PluginSubscription/
│   │   │   │       │   ├── index.scss
│   │   │   │       │   └── index.tsx
│   │   │   │       ├── Reconfirm/
│   │   │   │       │   ├── index.scss
│   │   │   │       │   └── index.tsx
│   │   │   │       ├── SearchLyric/
│   │   │   │       │   ├── hooks/
│   │   │   │       │   │   ├── searchResultStore.ts
│   │   │   │       │   │   └── useSearchLyric.ts
│   │   │   │       │   ├── index.scss
│   │   │   │       │   ├── index.tsx
│   │   │   │       │   ├── searchResult.scss
│   │   │   │       │   └── searchResult.tsx
│   │   │   │       ├── SelectOne/
│   │   │   │       │   ├── index.scss
│   │   │   │       │   └── index.tsx
│   │   │   │       ├── SimpleInputWithState/
│   │   │   │       │   ├── index.scss
│   │   │   │       │   └── index.tsx
│   │   │   │       ├── Sparkles/
│   │   │   │       │   ├── index.scss
│   │   │   │       │   └── index.tsx
│   │   │   │       ├── Update/
│   │   │   │       │   ├── index.scss
│   │   │   │       │   └── index.tsx
│   │   │   │       ├── WatchLocalDir/
│   │   │   │       │   ├── index.scss
│   │   │   │       │   └── index.tsx
│   │   │   │       └── index.ts
│   │   │   ├── MusicBar/
│   │   │   │   ├── index.scss
│   │   │   │   ├── index.tsx
│   │   │   │   └── widgets/
│   │   │   │       ├── Controller/
│   │   │   │       │   ├── index.scss
│   │   │   │       │   └── index.tsx
│   │   │   │       ├── Extra/
│   │   │   │       │   ├── index.scss
│   │   │   │       │   └── index.tsx
│   │   │   │       ├── MusicInfo/
│   │   │   │       │   ├── index.scss
│   │   │   │       │   └── index.tsx
│   │   │   │       └── Slider/
│   │   │   │           ├── index.scss
│   │   │   │           └── index.tsx
│   │   │   ├── MusicDetail/
│   │   │   │   ├── index.scss
│   │   │   │   ├── index.tsx
│   │   │   │   ├── store.ts
│   │   │   │   └── widgets/
│   │   │   │       ├── Header/
│   │   │   │       │   ├── index.scss
│   │   │   │       │   └── index.tsx
│   │   │   │       └── Lyric/
│   │   │   │           ├── index.scss
│   │   │   │           └── index.tsx
│   │   │   ├── MusicDownloaded/
│   │   │   │   ├── index.scss
│   │   │   │   └── index.tsx
│   │   │   ├── MusicFavorite/
│   │   │   │   └── index.tsx
│   │   │   ├── MusicList/
│   │   │   │   ├── index.scss
│   │   │   │   └── index.tsx
│   │   │   ├── MusicSheetlikeItem/
│   │   │   │   ├── index.scss
│   │   │   │   └── index.tsx
│   │   │   ├── MusicSheetlikeList/
│   │   │   │   ├── index.scss
│   │   │   │   └── index.tsx
│   │   │   ├── MusicSheetlikeView/
│   │   │   │   ├── components/
│   │   │   │   │   ├── Body/
│   │   │   │   │   │   ├── index.scss
│   │   │   │   │   │   └── index.tsx
│   │   │   │   │   └── Header/
│   │   │   │   │       ├── index.scss
│   │   │   │   │       └── index.tsx
│   │   │   │   ├── index.scss
│   │   │   │   ├── index.tsx
│   │   │   │   └── store.ts
│   │   │   ├── NoPlugin/
│   │   │   │   ├── index.scss
│   │   │   │   └── index.tsx
│   │   │   ├── Panel/
│   │   │   │   ├── index.tsx
│   │   │   │   └── templates/
│   │   │   │       ├── Base/
│   │   │   │       │   ├── index.scss
│   │   │   │       │   └── index.tsx
│   │   │   │       ├── MusicComment/
│   │   │   │       │   ├── index.scss
│   │   │   │       │   ├── index.tsx
│   │   │   │       │   └── useComment.ts
│   │   │   │       ├── PlayList/
│   │   │   │       │   ├── index.scss
│   │   │   │       │   └── index.tsx
│   │   │   │       ├── UserVariables/
│   │   │   │       │   ├── index.scss
│   │   │   │       │   └── index.tsx
│   │   │   │       └── index.ts
│   │   │   ├── SvgAsset/
│   │   │   │   └── index.tsx
│   │   │   ├── SwitchCase/
│   │   │   │   └── index.tsx
│   │   │   └── Tag/
│   │   │       ├── index.scss
│   │   │       └── index.tsx
│   │   ├── core/
│   │   │   ├── backup-resume/
│   │   │   │   └── index.ts
│   │   │   ├── db/
│   │   │   │   └── music-sheet-db.ts
│   │   │   ├── downloader/
│   │   │   │   ├── downloaded-sheet.ts
│   │   │   │   ├── ee.ts
│   │   │   │   ├── index.new.ts
│   │   │   │   ├── index.ts
│   │   │   │   └── store.ts
│   │   │   ├── link-lyric/
│   │   │   │   └── index.ts
│   │   │   ├── local-music/
│   │   │   │   ├── index.ts
│   │   │   │   └── store.ts
│   │   │   ├── music-sheet/
│   │   │   │   ├── backend/
│   │   │   │   │   └── index.ts
│   │   │   │   ├── common/
│   │   │   │   │   └── default-sheet.ts
│   │   │   │   ├── frontend/
│   │   │   │   │   ├── index.old.ts
│   │   │   │   │   └── index.ts
│   │   │   │   └── index.ts
│   │   │   ├── recently-playlist/
│   │   │   │   └── index.ts
│   │   │   └── track-player/
│   │   │       ├── controller/
│   │   │       │   ├── audio-controller.ts
│   │   │       │   └── controller-base.ts
│   │   │       ├── enum.ts
│   │   │       ├── hooks.ts
│   │   │       ├── index.ts
│   │   │       └── store.ts
│   │   ├── document/
│   │   │   ├── bootstrap.ts
│   │   │   ├── fallback.tsx
│   │   │   ├── index.html
│   │   │   ├── index.tsx
│   │   │   ├── styles/
│   │   │   │   ├── base.scss
│   │   │   │   ├── components.scss
│   │   │   │   ├── fallback.scss
│   │   │   │   ├── index.scss
│   │   │   │   ├── tables.scss
│   │   │   │   ├── utilities.scss
│   │   │   │   └── variables.scss
│   │   │   └── useBootstrap.ts
│   │   ├── pages/
│   │   │   └── main-page/
│   │   │       ├── components/
│   │   │       │   └── SideBar/
│   │   │       │       ├── index.scss
│   │   │       │       ├── index.tsx
│   │   │       │       └── widgets/
│   │   │       │           ├── ListItem/
│   │   │       │           │   ├── index.scss
│   │   │       │           │   └── index.tsx
│   │   │       │           ├── MySheets/
│   │   │       │           │   ├── index.scss
│   │   │       │           │   └── index.tsx
│   │   │       │           └── StarredSheets/
│   │   │       │               ├── index.scss
│   │   │       │               └── index.tsx
│   │   │       ├── index.scss
│   │   │       ├── index.tsx
│   │   │       └── views/
│   │   │           ├── album-view/
│   │   │           │   ├── hooks/
│   │   │           │   │   └── useAlbumDetail.ts
│   │   │           │   ├── index.scss
│   │   │           │   └── index.tsx
│   │   │           ├── artist-view/
│   │   │           │   ├── components/
│   │   │           │   │   ├── Body/
│   │   │           │   │   │   ├── index.scss
│   │   │           │   │   │   ├── index.tsx
│   │   │           │   │   │   └── widgets/
│   │   │           │   │   │       ├── AlbumResult/
│   │   │           │   │   │       │   ├── index.scss
│   │   │           │   │   │       │   └── index.tsx
│   │   │           │   │   │       └── MusicResult/
│   │   │           │   │   │           └── index.tsx
│   │   │           │   │   └── Header/
│   │   │           │   │       ├── index.scss
│   │   │           │   │       └── index.tsx
│   │   │           │   ├── hooks/
│   │   │           │   │   └── useQueryArtist.ts
│   │   │           │   ├── index.scss
│   │   │           │   ├── index.tsx
│   │   │           │   └── store/
│   │   │           │       └── index.ts
│   │   │           ├── download-view/
│   │   │           │   ├── components/
│   │   │           │   │   ├── Downloaded/
│   │   │           │   │   │   └── index.tsx
│   │   │           │   │   └── Downloading/
│   │   │           │   │       ├── DownloadStatus.tsx
│   │   │           │   │       ├── index.scss
│   │   │           │   │       └── index.tsx
│   │   │           │   ├── index.scss
│   │   │           │   └── index.tsx
│   │   │           ├── local-music-view/
│   │   │           │   ├── index.scss
│   │   │           │   ├── index.tsx
│   │   │           │   └── views/
│   │   │           │       ├── album/
│   │   │           │       │   ├── index.scss
│   │   │           │       │   └── index.tsx
│   │   │           │       ├── artist/
│   │   │           │       │   ├── index.scss
│   │   │           │       │   └── index.tsx
│   │   │           │       ├── folder/
│   │   │           │       │   ├── index.scss
│   │   │           │       │   └── index.tsx
│   │   │           │       └── list/
│   │   │           │           └── index.tsx
│   │   │           ├── music-sheet-view/
│   │   │           │   ├── index.scss
│   │   │           │   ├── index.tsx
│   │   │           │   ├── local-sheet/
│   │   │           │   │   └── index.tsx
│   │   │           │   ├── remote-sheet/
│   │   │           │   │   ├── hooks/
│   │   │           │   │   │   └── usePluginSheetMusicList.ts
│   │   │           │   │   └── index.tsx
│   │   │           │   └── store/
│   │   │           │       └── musicSheetStore.ts
│   │   │           ├── plugin-manager-view/
│   │   │           │   ├── components/
│   │   │           │   │   └── plugin-table/
│   │   │           │   │       ├── index.scss
│   │   │           │   │       └── index.tsx
│   │   │           │   ├── index.scss
│   │   │           │   └── index.tsx
│   │   │           ├── recently-play-view/
│   │   │           │   └── index.tsx
│   │   │           ├── recommend-sheets-view/
│   │   │           │   ├── components/
│   │   │           │   │   └── Body/
│   │   │           │   │       ├── index.scss
│   │   │           │   │       ├── index.tsx
│   │   │           │   │       ├── tag-panel.scss
│   │   │           │   │       └── tag-panel.tsx
│   │   │           │   ├── hooks/
│   │   │           │   │   ├── useRecommendListTags.ts
│   │   │           │   │   └── useRecommendSheets.ts
│   │   │           │   └── index.tsx
│   │   │           ├── search-view/
│   │   │           │   ├── components/
│   │   │           │   │   └── SearchResult/
│   │   │           │   │       ├── AlbumResult/
│   │   │           │   │       │   ├── index.scss
│   │   │           │   │       │   └── index.tsx
│   │   │           │   │       ├── ArtistResult/
│   │   │           │   │       │   ├── index.scss
│   │   │           │   │       │   └── index.tsx
│   │   │           │   │       ├── MusicResult/
│   │   │           │   │       │   └── index.tsx
│   │   │           │   │       ├── SheetResult/
│   │   │           │   │       │   ├── index.scss
│   │   │           │   │       │   └── index.tsx
│   │   │           │   │       ├── index.scss
│   │   │           │   │       └── index.tsx
│   │   │           │   ├── hooks/
│   │   │           │   │   └── useSearch.ts
│   │   │           │   ├── index.scss
│   │   │           │   ├── index.tsx
│   │   │           │   └── store/
│   │   │           │       └── search-result.ts
│   │   │           ├── setting-view/
│   │   │           │   ├── components/
│   │   │           │   │   ├── CheckBoxSettingItem/
│   │   │           │   │   │   └── index.tsx
│   │   │           │   │   ├── ColorPickerSettingItem/
│   │   │           │   │   │   ├── index.scss
│   │   │           │   │   │   └── index.tsx
│   │   │           │   │   ├── FontPickerSettingItem/
│   │   │           │   │   │   ├── index.scss
│   │   │           │   │   │   └── index.tsx
│   │   │           │   │   ├── InputSettingItem/
│   │   │           │   │   │   ├── index.scss
│   │   │           │   │   │   └── index.tsx
│   │   │           │   │   ├── ListBoxSettingItem/
│   │   │           │   │   │   ├── index.scss
│   │   │           │   │   │   └── index.tsx
│   │   │           │   │   ├── MultiRadioGroupSettingItem/
│   │   │           │   │   │   ├── index.scss
│   │   │           │   │   │   └── index.tsx
│   │   │           │   │   ├── PathSettingItem/
│   │   │           │   │   │   ├── index.scss
│   │   │           │   │   │   └── index.tsx
│   │   │           │   │   └── RadioGroupSettingItem/
│   │   │           │   │       ├── index.scss
│   │   │           │   │       └── index.tsx
│   │   │           │   ├── index.scss
│   │   │           │   ├── index.tsx
│   │   │           │   └── routers/
│   │   │           │       ├── About/
│   │   │           │       │   ├── index.scss
│   │   │           │       │   └── index.tsx
│   │   │           │       ├── Backup/
│   │   │           │       │   ├── index.scss
│   │   │           │       │   └── index.tsx
│   │   │           │       ├── Download/
│   │   │           │       │   ├── index.scss
│   │   │           │       │   └── index.tsx
│   │   │           │       ├── Lyric/
│   │   │           │       │   ├── index.scss
│   │   │           │       │   └── index.tsx
│   │   │           │       ├── Network/
│   │   │           │       │   ├── index.scss
│   │   │           │       │   └── index.tsx
│   │   │           │       ├── Normal/
│   │   │           │       │   ├── index.scss
│   │   │           │       │   └── index.tsx
│   │   │           │       ├── PlayMusic/
│   │   │           │       │   ├── index.scss
│   │   │           │       │   └── index.tsx
│   │   │           │       ├── Plugin/
│   │   │           │       │   ├── index.scss
│   │   │           │       │   └── index.tsx
│   │   │           │       ├── ShortCut/
│   │   │           │       │   ├── index.scss
│   │   │           │       │   └── index.tsx
│   │   │           │       └── index.ts
│   │   │           ├── theme-view/
│   │   │           │   ├── components/
│   │   │           │   │   ├── LocalThemes/
│   │   │           │   │   │   ├── index.scss
│   │   │           │   │   │   └── index.tsx
│   │   │           │   │   ├── RemoteThemes/
│   │   │           │   │   │   ├── hooks/
│   │   │           │   │   │   │   └── useRemoteThemes.ts
│   │   │           │   │   │   ├── index.scss
│   │   │           │   │   │   └── index.tsx
│   │   │           │   │   └── ThemeItem/
│   │   │           │   │       ├── index.scss
│   │   │           │   │       └── index.tsx
│   │   │           │   ├── index.scss
│   │   │           │   └── index.tsx
│   │   │           ├── toplist-detail-view/
│   │   │           │   ├── hooks/
│   │   │           │   │   └── useTopListDetail.ts
│   │   │           │   └── index.tsx
│   │   │           └── toplist-view/
│   │   │               ├── hooks/
│   │   │               │   └── useGetTopList.ts
│   │   │               ├── index.scss
│   │   │               ├── index.tsx
│   │   │               └── store/
│   │   │                   └── index.ts
│   │   └── utils/
│   │       ├── check-update.ts
│   │       ├── classnames.ts
│   │       ├── create-tmp-file.ts
│   │       ├── get-text-width.ts
│   │       ├── get-url-ext.ts
│   │       ├── groupBy.ts
│   │       ├── img-on-error.ts
│   │       ├── is-local-music.ts
│   │       ├── lyric-parser.ts
│   │       ├── preload-util.ts
│   │       ├── raf2.ts
│   │       ├── search-history.ts
│   │       └── user-perference.ts
│   ├── renderer-lrc/
│   │   ├── document/
│   │   │   ├── bootstrap.ts
│   │   │   ├── index.html
│   │   │   ├── index.tsx
│   │   │   └── styles/
│   │   │       └── index.scss
│   │   └── pages/
│   │       ├── index.scss
│   │       └── index.tsx
│   ├── renderer-minimode/
│   │   ├── document/
│   │   │   ├── bootstrap.ts
│   │   │   ├── index.html
│   │   │   ├── index.tsx
│   │   │   └── styles/
│   │   │       └── index.scss
│   │   └── pages/
│   │       ├── index.scss
│   │       └── index.tsx
│   ├── shared/
│   │   ├── app-config/
│   │   │   ├── default-app-config.ts
│   │   │   ├── main.ts
│   │   │   ├── preload.ts
│   │   │   └── renderer.ts
│   │   ├── database/
│   │   │   ├── main.ts
│   │   │   ├── preload-backup.ts
│   │   │   ├── preload.ts
│   │   │   └── renderer.ts
│   │   ├── global-context/
│   │   │   ├── internal/
│   │   │   │   └── common.ts
│   │   │   ├── main.ts
│   │   │   ├── preload.ts
│   │   │   ├── renderer.ts
│   │   │   └── type.d.ts
│   │   ├── i18n/
│   │   │   ├── main.ts
│   │   │   ├── preload.ts
│   │   │   ├── renderer.ts
│   │   │   └── type.d.ts
│   │   ├── logger/
│   │   │   ├── main.ts
│   │   │   └── renderer.ts
│   │   ├── message-bus/
│   │   │   ├── main.ts
│   │   │   ├── preload/
│   │   │   │   ├── extension.ts
│   │   │   │   └── main.ts
│   │   │   ├── renderer/
│   │   │   │   ├── extension.ts
│   │   │   │   └── main.ts
│   │   │   └── type.d.ts
│   │   ├── plugin-manager/
│   │   │   ├── main/
│   │   │   │   ├── index.ts
│   │   │   │   ├── internal-plugins/
│   │   │   │   │   └── local-plugin.ts
│   │   │   │   ├── plugin-methods.ts
│   │   │   │   ├── plugin.ts
│   │   │   │   └── polyfill/
│   │   │   │       ├── react-native-cookies.ts
│   │   │   │       └── storage.ts
│   │   │   ├── preload.ts
│   │   │   └── renderer.ts
│   │   ├── service-manager/
│   │   │   ├── common.ts
│   │   │   ├── main.ts
│   │   │   ├── preload.ts
│   │   │   └── renderer.ts
│   │   ├── short-cut/
│   │   │   ├── main.ts
│   │   │   ├── preload.ts
│   │   │   └── renderer.ts
│   │   ├── themepack/
│   │   │   ├── main.ts
│   │   │   ├── preload.ts
│   │   │   ├── renderer.ts
│   │   │   └── type.d.ts
│   │   ├── utils/
│   │   │   ├── main.ts
│   │   │   ├── preload.ts
│   │   │   └── renderer.ts
│   │   └── window-drag/
│   │       ├── main.ts
│   │       ├── preload.ts
│   │       └── renderer.ts
│   ├── types/
│   │   ├── app-config.d.ts
│   │   ├── assets.d.ts
│   │   ├── audio-controller.d.ts
│   │   ├── common.d.ts
│   │   ├── main/
│   │   │   └── window-manager.d.ts
│   │   ├── media.d.ts
│   │   ├── model.d.ts
│   │   ├── plugin.d.ts
│   │   ├── preload.d.ts
│   │   ├── user-perference.d.ts
│   │   └── window.d.ts
│   └── webworkers/
│       ├── db-worker/
│       │   ├── const.ts
│       │   ├── index.ts
│       │   └── utils.ts
│       ├── db-worker.ts
│       ├── downloader.ts
│       └── local-file-watcher.ts
└── tsconfig.json

================================================
FILE CONTENTS
================================================

================================================
FILE: .github/PULL_REQUEST_TEMPLATE.md
================================================
> [!CAUTION] 
> PR 请提交到 `dev` 分支  (Please submit PR to `dev` branch)

## PR 解决的问题 (PR Summary)
> 简单描述一下这个 PR 要解决的问题,如果是 issues 中的问题,请附加 issue 编号  
> (Please provide a brief description of this PR. If it aims to resolve an issue, please include the issue number)

## 影响范围 (Impact Scope)
> 可选填写,说明一下改动的影响范围  
> (Optional, explain the scope of impact of the changes)

## 截屏 (Screenshot)
| 改动前 (Before) | 改动后 (After) |
|     ------     |    ------      |
| 在这里粘贴图片 (Paste screenshot here) | 在这里粘贴图片 (Paste screenshot here) | 


================================================
FILE: .github/workflows/build.yml
================================================
name: Build

on:
  workflow_dispatch:

jobs:
  build-meta:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - name: Generate build metadata
        run: |
          VERSION=$(node -p "require('./package.json').version")
          BRANCH=${GITHUB_REF_NAME}
          COMMIT=${GITHUB_SHA}
          echo "{\"branch\":\"${BRANCH}\",\"version\":\"${VERSION}\",\"commit\":\"${COMMIT}\"}" > build-meta.json
          cat build-meta.json
      - uses: actions/upload-artifact@v4
        with:
          name: build-meta
          path: build-meta.json
          retention-days: 30

  build-windows:
    runs-on: windows-latest
    steps:
      - uses: actions/checkout@v4
      - uses: pnpm/action-setup@v4
      - uses: actions/setup-node@v4
        with:
          node-version: 22
          cache: pnpm
      - run: pnpm install --frozen-lockfile
      - name: Read version
        run: |
          $version = node -p "require('./package.json').version"
          echo "VERSION=$version" >> $env:GITHUB_ENV
      - run: pnpm run package
      - uses: maotoumao/inno-setup-action-cli@main
        with:
          filepath: ./release/build-windows.iss
          variables: /DMyAppVersion=${{ env.VERSION }} /DMyAppId=${{ secrets.MYAPPID }}
      - name: Rename setup file
        run: |
          Rename-Item -Path "./out/MusicFreeSetup.exe" -NewName "MusicFree-${{ env.VERSION }}-win32-x64-setup.exe"
      - name: Generate portable
        run: |
          New-Item -ItemType Directory -Path "./out/MusicFree-win32-x64/portable" -Force
      - name: Archive portable
        run: |
          Compress-Archive -Path "./out/MusicFree-win32-x64/*" -DestinationPath "./out/MusicFree-${{ env.VERSION }}-win32-x64-portable.zip"
      - uses: actions/upload-artifact@v4
        with:
          name: MusicFree-${{ env.VERSION }}-win32-x64-setup
          path: ./out/MusicFree-${{ env.VERSION }}-win32-x64-setup.exe
          retention-days: 30
      - uses: actions/upload-artifact@v4
        with:
          name: MusicFree-${{ env.VERSION }}-win32-x64-portable
          path: ./out/MusicFree-${{ env.VERSION }}-win32-x64-portable.zip
          retention-days: 30

  build-windows-legacy:
    runs-on: windows-latest
    steps:
      - uses: actions/checkout@v4
      - uses: pnpm/action-setup@v4
      - uses: actions/setup-node@v4
        with:
          node-version: 22
          cache: pnpm
      - run: pnpm install
      - name: Read version
        run: |
          $version = node -p "require('./package.json').version"
          echo "VERSION=$version" >> $env:GITHUB_ENV
      - name: Override Win7 compatibility files
        run: |
          Get-ChildItem -Recurse -Filter "*.win7.ts" | ForEach-Object {
            $target = $_.FullName -replace '\.win7\.ts$', '.ts'
            Write-Host "Overriding: $target"
            Copy-Item $_.FullName $target -Force
          }
      - name: Install Electron 22
        run: pnpm add electron@22 --save-dev
      - run: pnpm run package
      - uses: maotoumao/inno-setup-action-cli@main
        with:
          filepath: ./release/build-windows.iss
          variables: /DMyAppVersion=${{ env.VERSION }} /DMyAppId=${{ secrets.MYAPPID }}
      - name: Rename setup file
        run: |
          Rename-Item -Path "./out/MusicFreeSetup.exe" -NewName "MusicFree-${{ env.VERSION }}-win32-x64-legacy-setup.exe"
      - name: Generate portable
        run: |
          New-Item -ItemType Directory -Path "./out/MusicFree-win32-x64/portable" -Force
      - name: Archive portable
        run: |
          Compress-Archive -Path "./out/MusicFree-win32-x64/*" -DestinationPath "./out/MusicFree-${{ env.VERSION }}-win32-x64-legacy-portable.zip"
      - uses: actions/upload-artifact@v4
        with:
          name: MusicFree-${{ env.VERSION }}-win32-x64-legacy-setup
          path: ./out/MusicFree-${{ env.VERSION }}-win32-x64-legacy-setup.exe
          retention-days: 30
      - uses: actions/upload-artifact@v4
        with:
          name: MusicFree-${{ env.VERSION }}-win32-x64-legacy-portable
          path: ./out/MusicFree-${{ env.VERSION }}-win32-x64-legacy-portable.zip
          retention-days: 30

  build-macos-x64:
    runs-on: macos-13
    steps:
      - uses: actions/checkout@v4
      - uses: pnpm/action-setup@v4
      - uses: actions/setup-node@v4
        with:
          node-version: 22
          cache: pnpm
      - run: pnpm install --frozen-lockfile
      - name: Read version
        run: |
          VERSION=$(node -p "require('./package.json').version")
          echo "VERSION=$VERSION" >> $GITHUB_ENV
      - run: pnpm run make
      - name: Rename DMG
        run: mv "./out/make/MusicFree-${{ env.VERSION }}-x64.dmg" "./out/make/MusicFree-${{ env.VERSION }}-darwin-x64.dmg"
      - uses: actions/upload-artifact@v4
        with:
          name: MusicFree-${{ env.VERSION }}-darwin-x64
          path: ./out/make/MusicFree-${{ env.VERSION }}-darwin-x64.dmg
          retention-days: 30

  build-macos-arm64:
    runs-on: macos-latest
    steps:
      - uses: actions/checkout@v4
      - uses: pnpm/action-setup@v4
      - uses: actions/setup-node@v4
        with:
          node-version: 22
          cache: pnpm
      - run: pnpm install --frozen-lockfile
      - name: Read version
        run: |
          VERSION=$(node -p "require('./package.json').version")
          echo "VERSION=$VERSION" >> $GITHUB_ENV
      - run: pnpm run make -- --arch=arm64
      - name: Rename DMG
        run: mv "./out/make/MusicFree-${{ env.VERSION }}-arm64.dmg" "./out/make/MusicFree-${{ env.VERSION }}-darwin-arm64.dmg"
      - uses: actions/upload-artifact@v4
        with:
          name: MusicFree-${{ env.VERSION }}-darwin-arm64
          path: ./out/make/MusicFree-${{ env.VERSION }}-darwin-arm64.dmg
          retention-days: 30

  build-linux:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - name: Install system dependencies
        run: sudo apt-get update && sudo apt-get install -y rpm
      - uses: pnpm/action-setup@v4
      - uses: actions/setup-node@v4
        with:
          node-version: 22
          cache: pnpm
      - run: pnpm install --frozen-lockfile
      - name: Read version
        run: |
          VERSION=$(node -p "require('./package.json').version")
          echo "VERSION=$VERSION" >> $GITHUB_ENV
      - run: pnpm run make
      - name: Rename DEB
        run: |
          DEB_FILE=$(find ./out/make/deb/x64/ -name "*.deb" | head -1)
          if [ -n "$DEB_FILE" ]; then
            mv "$DEB_FILE" "./out/make/deb/x64/MusicFree-${{ env.VERSION }}-linux-amd64.deb"
          fi
      - name: Rename RPM
        run: |
          RPM_FILE=$(find ./out/make/rpm/x64/ -name "*.rpm" | head -1)
          if [ -n "$RPM_FILE" ]; then
            mv "$RPM_FILE" "./out/make/rpm/x64/MusicFree-${{ env.VERSION }}-linux-amd64.rpm"
          fi
      - uses: actions/upload-artifact@v4
        with:
          name: MusicFree-${{ env.VERSION }}-linux-amd64-deb
          path: ./out/make/deb/x64/MusicFree-${{ env.VERSION }}-linux-amd64.deb
          retention-days: 30
      - uses: actions/upload-artifact@v4
        with:
          name: MusicFree-${{ env.VERSION }}-linux-amd64-rpm
          path: ./out/make/rpm/x64/MusicFree-${{ env.VERSION }}-linux-amd64.rpm
          retention-days: 30


================================================
FILE: .github/workflows/release.yml
================================================
name: Release

on:
    workflow_dispatch:
        inputs:
            run_id:
                description: 'Build workflow run ID to download artifacts from'
                required: true
                type: string
            release_notes:
                description: 'Release notes (optional, overrides release/version.json changeLog)'
                required: false
                type: string

permissions:
    contents: write

jobs:
    release:
        runs-on: ubuntu-latest
        steps:
            - uses: actions/checkout@v4

            - name: Download all artifacts from build run
              env:
                  GH_TOKEN: ${{ github.token }}
              run: |
                  mkdir -p artifacts
                  gh run download ${{ inputs.run_id }} --dir artifacts

            - name: Read build metadata
              id: meta
              run: |
                  META_FILE="artifacts/build-meta/build-meta.json"
                  if [ ! -f "$META_FILE" ]; then
                    echo "::error::build-meta.json not found. Make sure the build workflow completed successfully."
                    exit 1
                  fi
                  VERSION=$(jq -r '.version' "$META_FILE")
                  BRANCH=$(jq -r '.branch' "$META_FILE")
                  COMMIT=$(jq -r '.commit' "$META_FILE")
                  echo "version=$VERSION" >> $GITHUB_OUTPUT
                  echo "branch=$BRANCH" >> $GITHUB_OUTPUT
                  echo "commit=$COMMIT" >> $GITHUB_OUTPUT
                  echo "tag=v$VERSION" >> $GITHUB_OUTPUT
                  # Auto-detect prerelease from branch name
                  if [[ "$BRANCH" == *"dev"* ]] || [[ "$BRANCH" == *"beta"* ]] || [[ "$BRANCH" == *"alpha"* ]]; then
                    echo "prerelease=true" >> $GITHUB_OUTPUT
                  else
                    echo "prerelease=false" >> $GITHUB_OUTPUT
                  fi

            - name: Generate release notes
              id: notes
              env:
                  RELEASE_NOTES_INPUT: ${{ inputs.release_notes }}
              run: |
                  if [ -n "$RELEASE_NOTES_INPUT" ]; then
                    printf '%s\n' "$RELEASE_NOTES_INPUT" > release-notes.md
                  else
                    jq -r '.changeLog | join("\n")' release/version.json > release-notes.md
                  fi
                  echo "=== Release notes ==="
                  cat release-notes.md

            - name: Collect release assets
              run: |
                  mkdir -p release-assets
                  find artifacts -type f \( -name "*.exe" -o -name "*.zip" -o -name "*.dmg" -o -name "*.deb" -o -name "*.rpm" \) -exec cp {} release-assets/ \;
                  echo "=== Release assets ==="
                  ls -lh release-assets/

            - name: Create tag
              env:
                  GH_TOKEN: ${{ github.token }}
              run: |
                  TAG="${{ steps.meta.outputs.tag }}"
                  COMMIT="${{ steps.meta.outputs.commit }}"
                  # Check if tag already exists
                  if gh api "repos/${{ github.repository }}/git/refs/tags/${TAG}" &>/dev/null; then
                    echo "::error::Tag ${TAG} already exists. Aborting."
                    exit 1
                  fi
                  gh api "repos/${{ github.repository }}/git/refs" \
                    -X POST \
                    -f ref="refs/tags/${TAG}" \
                    -f sha="${COMMIT}"

            - name: Create GitHub Draft Release
              env:
                  GH_TOKEN: ${{ github.token }}
              run: |
                  gh release create "${{ steps.meta.outputs.tag }}" \
                    --title "MusicFree ${{ steps.meta.outputs.version }}" \
                    --notes-file release-notes.md \
                    --draft \
                    ${{ steps.meta.outputs.prerelease == 'true' && '--prerelease' || '' }} \
                    release-assets/*


================================================
FILE: .gitignore
================================================
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
lerna-debug.log*

# Diagnostic reports (https://nodejs.org/api/report.html)
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json

# Runtime data
pids
*.pid
*.seed
*.pid.lock
.DS_Store

# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov

# Coverage directory used by tools like istanbul
coverage
*.lcov

# nyc test coverage
.nyc_output

# node-waf configuration
.lock-wscript

# Compiled binary addons (https://nodejs.org/api/addons.html)
build/Release

# Dependency directories
node_modules/
jspm_packages/

# TypeScript v1 declaration files
typings/

# TypeScript cache
*.tsbuildinfo

# Optional npm cache directory
.npm

# Optional eslint cache
.eslintcache

# Optional REPL history
.node_repl_history

# Output of 'npm pack'
*.tgz

# Yarn Integrity file
.yarn-integrity

# dotenv environment variables file
.env
.env.test

# parcel-bundler cache (https://parceljs.org/)
.cache

# next.js build output
.next

# nuxt.js build output
.nuxt

# vuepress build output
.vuepress/dist

# Serverless directories
.serverless/

# FuseBox cache
.fusebox/

# DynamoDB Local files
.dynamodb/

# Webpack
.webpack/

# Vite
.vite/

# Electron-Forge
out/

tmp

plugins

.VSCodeCounter

.idea/

undefinedelectron-log-preload.js


================================================
FILE: .husky/pre-commit
================================================
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"

npm run lint-staged


================================================
FILE: .vscode/settings.json
================================================
{
  "editor.formatOnSave": true,
  "files.associations": {
    "*.html": "html",
    "map": "cpp"
  },
  "editor.defaultFormatter": "dbaeumer.vscode-eslint",
  "[typescript]": {
    "editor.defaultFormatter": "vscode.typescript-language-features"
  },
  "eslint.format.enable": true
}

================================================
FILE: LICENSE
================================================
                    GNU AFFERO GENERAL PUBLIC LICENSE
                       Version 3, 19 November 2007

 Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
 Everyone is permitted to copy and distribute verbatim copies
 of this license document, but changing it is not allowed.

                            Preamble

  The GNU Affero General Public License is a free, copyleft license for
software and other kinds of works, specifically designed to ensure
cooperation with the community in the case of network server software.

  The licenses for most software and other practical works are designed
to take away your freedom to share and change the works.  By contrast,
our General Public Licenses are intended to guarantee your freedom to
share and change all versions of a program--to make sure it remains free
software for all its users.

  When we speak of free software, we are referring to freedom, not
price.  Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
them if you wish), that you receive source code or can get it if you
want it, that you can change the software or use pieces of it in new
free programs, and that you know you can do these things.

  Developers that use our General Public Licenses protect your rights
with two steps: (1) assert copyright on the software, and (2) offer
you this License which gives you legal permission to copy, distribute
and/or modify the software.

  A secondary benefit of defending all users' freedom is that
improvements made in alternate versions of the program, if they
receive widespread use, become available for other developers to
incorporate.  Many developers of free software are heartened and
encouraged by the resulting cooperation.  However, in the case of
software used on network servers, this result may fail to come about.
The GNU General Public License permits making a modified version and
letting the public access it on a server without ever releasing its
source code to the public.

  The GNU Affero General Public License is designed specifically to
ensure that, in such cases, the modified source code becomes available
to the community.  It requires the operator of a network server to
provide the source code of the modified version running there to the
users of that server.  Therefore, public use of a modified version, on
a publicly accessible server, gives the public access to the source
code of the modified version.

  An older license, called the Affero General Public License and
published by Affero, was designed to accomplish similar goals.  This is
a different license, not a version of the Affero GPL, but Affero has
released a new version of the Affero GPL which permits relicensing under
this license.

  The precise terms and conditions for copying, distribution and
modification follow.

                       TERMS AND CONDITIONS

  0. Definitions.

  "This License" refers to version 3 of the GNU Affero General Public License.

  "Copyright" also means copyright-like laws that apply to other kinds of
works, such as semiconductor masks.

  "The Program" refers to any copyrightable work licensed under this
License.  Each licensee is addressed as "you".  "Licensees" and
"recipients" may be individuals or organizations.

  To "modify" a work means to copy from or adapt all or part of the work
in a fashion requiring copyright permission, other than the making of an
exact copy.  The resulting work is called a "modified version" of the
earlier work or a work "based on" the earlier work.

  A "covered work" means either the unmodified Program or a work based
on the Program.

  To "propagate" a work means to do anything with it that, without
permission, would make you directly or secondarily liable for
infringement under applicable copyright law, except executing it on a
computer or modifying a private copy.  Propagation includes copying,
distribution (with or without modification), making available to the
public, and in some countries other activities as well.

  To "convey" a work means any kind of propagation that enables other
parties to make or receive copies.  Mere interaction with a user through
a computer network, with no transfer of a copy, is not conveying.

  An interactive user interface displays "Appropriate Legal Notices"
to the extent that it includes a convenient and prominently visible
feature that (1) displays an appropriate copyright notice, and (2)
tells the user that there is no warranty for the work (except to the
extent that warranties are provided), that licensees may convey the
work under this License, and how to view a copy of this License.  If
the interface presents a list of user commands or options, such as a
menu, a prominent item in the list meets this criterion.

  1. Source Code.

  The "source code" for a work means the preferred form of the work
for making modifications to it.  "Object code" means any non-source
form of a work.

  A "Standard Interface" means an interface that either is an official
standard defined by a recognized standards body, or, in the case of
interfaces specified for a particular programming language, one that
is widely used among developers working in that language.

  The "System Libraries" of an executable work include anything, other
than the work as a whole, that (a) is included in the normal form of
packaging a Major Component, but which is not part of that Major
Component, and (b) serves only to enable use of the work with that
Major Component, or to implement a Standard Interface for which an
implementation is available to the public in source code form.  A
"Major Component", in this context, means a major essential component
(kernel, window system, and so on) of the specific operating system
(if any) on which the executable work runs, or a compiler used to
produce the work, or an object code interpreter used to run it.

  The "Corresponding Source" for a work in object code form means all
the source code needed to generate, install, and (for an executable
work) run the object code and to modify the work, including scripts to
control those activities.  However, it does not include the work's
System Libraries, or general-purpose tools or generally available free
programs which are used unmodified in performing those activities but
which are not part of the work.  For example, Corresponding Source
includes interface definition files associated with source files for
the work, and the source code for shared libraries and dynamically
linked subprograms that the work is specifically designed to require,
such as by intimate data communication or control flow between those
subprograms and other parts of the work.

  The Corresponding Source need not include anything that users
can regenerate automatically from other parts of the Corresponding
Source.

  The Corresponding Source for a work in source code form is that
same work.

  2. Basic Permissions.

  All rights granted under this License are granted for the term of
copyright on the Program, and are irrevocable provided the stated
conditions are met.  This License explicitly affirms your unlimited
permission to run the unmodified Program.  The output from running a
covered work is covered by this License only if the output, given its
content, constitutes a covered work.  This License acknowledges your
rights of fair use or other equivalent, as provided by copyright law.

  You may make, run and propagate covered works that you do not
convey, without conditions so long as your license otherwise remains
in force.  You may convey covered works to others for the sole purpose
of having them make modifications exclusively for you, or provide you
with facilities for running those works, provided that you comply with
the terms of this License in conveying all material for which you do
not control copyright.  Those thus making or running the covered works
for you must do so exclusively on your behalf, under your direction
and control, on terms that prohibit them from making any copies of
your copyrighted material outside their relationship with you.

  Conveying under any other circumstances is permitted solely under
the conditions stated below.  Sublicensing is not allowed; section 10
makes it unnecessary.

  3. Protecting Users' Legal Rights From Anti-Circumvention Law.

  No covered work shall be deemed part of an effective technological
measure under any applicable law fulfilling obligations under article
11 of the WIPO copyright treaty adopted on 20 December 1996, or
similar laws prohibiting or restricting circumvention of such
measures.

  When you convey a covered work, you waive any legal power to forbid
circumvention of technological measures to the extent such circumvention
is effected by exercising rights under this License with respect to
the covered work, and you disclaim any intention to limit operation or
modification of the work as a means of enforcing, against the work's
users, your or third parties' legal rights to forbid circumvention of
technological measures.

  4. Conveying Verbatim Copies.

  You may convey verbatim copies of the Program's source code as you
receive it, in any medium, provided that you conspicuously and
appropriately publish on each copy an appropriate copyright notice;
keep intact all notices stating that this License and any
non-permissive terms added in accord with section 7 apply to the code;
keep intact all notices of the absence of any warranty; and give all
recipients a copy of this License along with the Program.

  You may charge any price or no price for each copy that you convey,
and you may offer support or warranty protection for a fee.

  5. Conveying Modified Source Versions.

  You may convey a work based on the Program, or the modifications to
produce it from the Program, in the form of source code under the
terms of section 4, provided that you also meet all of these conditions:

    a) The work must carry prominent notices stating that you modified
    it, and giving a relevant date.

    b) The work must carry prominent notices stating that it is
    released under this License and any conditions added under section
    7.  This requirement modifies the requirement in section 4 to
    "keep intact all notices".

    c) You must license the entire work, as a whole, under this
    License to anyone who comes into possession of a copy.  This
    License will therefore apply, along with any applicable section 7
    additional terms, to the whole of the work, and all its parts,
    regardless of how they are packaged.  This License gives no
    permission to license the work in any other way, but it does not
    invalidate such permission if you have separately received it.

    d) If the work has interactive user interfaces, each must display
    Appropriate Legal Notices; however, if the Program has interactive
    interfaces that do not display Appropriate Legal Notices, your
    work need not make them do so.

  A compilation of a covered work with other separate and independent
works, which are not by their nature extensions of the covered work,
and which are not combined with it such as to form a larger program,
in or on a volume of a storage or distribution medium, is called an
"aggregate" if the compilation and its resulting copyright are not
used to limit the access or legal rights of the compilation's users
beyond what the individual works permit.  Inclusion of a covered work
in an aggregate does not cause this License to apply to the other
parts of the aggregate.

  6. Conveying Non-Source Forms.

  You may convey a covered work in object code form under the terms
of sections 4 and 5, provided that you also convey the
machine-readable Corresponding Source under the terms of this License,
in one of these ways:

    a) Convey the object code in, or embodied in, a physical product
    (including a physical distribution medium), accompanied by the
    Corresponding Source fixed on a durable physical medium
    customarily used for software interchange.

    b) Convey the object code in, or embodied in, a physical product
    (including a physical distribution medium), accompanied by a
    written offer, valid for at least three years and valid for as
    long as you offer spare parts or customer support for that product
    model, to give anyone who possesses the object code either (1) a
    copy of the Corresponding Source for all the software in the
    product that is covered by this License, on a durable physical
    medium customarily used for software interchange, for a price no
    more than your reasonable cost of physically performing this
    conveying of source, or (2) access to copy the
    Corresponding Source from a network server at no charge.

    c) Convey individual copies of the object code with a copy of the
    written offer to provide the Corresponding Source.  This
    alternative is allowed only occasionally and noncommercially, and
    only if you received the object code with such an offer, in accord
    with subsection 6b.

    d) Convey the object code by offering access from a designated
    place (gratis or for a charge), and offer equivalent access to the
    Corresponding Source in the same way through the same place at no
    further charge.  You need not require recipients to copy the
    Corresponding Source along with the object code.  If the place to
    copy the object code is a network server, the Corresponding Source
    may be on a different server (operated by you or a third party)
    that supports equivalent copying facilities, provided you maintain
    clear directions next to the object code saying where to find the
    Corresponding Source.  Regardless of what server hosts the
    Corresponding Source, you remain obligated to ensure that it is
    available for as long as needed to satisfy these requirements.

    e) Convey the object code using peer-to-peer transmission, provided
    you inform other peers where the object code and Corresponding
    Source of the work are being offered to the general public at no
    charge under subsection 6d.

  A separable portion of the object code, whose source code is excluded
from the Corresponding Source as a System Library, need not be
included in conveying the object code work.

  A "User Product" is either (1) a "consumer product", which means any
tangible personal property which is normally used for personal, family,
or household purposes, or (2) anything designed or sold for incorporation
into a dwelling.  In determining whether a product is a consumer product,
doubtful cases shall be resolved in favor of coverage.  For a particular
product received by a particular user, "normally used" refers to a
typical or common use of that class of product, regardless of the status
of the particular user or of the way in which the particular user
actually uses, or expects or is expected to use, the product.  A product
is a consumer product regardless of whether the product has substantial
commercial, industrial or non-consumer uses, unless such uses represent
the only significant mode of use of the product.

  "Installation Information" for a User Product means any methods,
procedures, authorization keys, or other information required to install
and execute modified versions of a covered work in that User Product from
a modified version of its Corresponding Source.  The information must
suffice to ensure that the continued functioning of the modified object
code is in no case prevented or interfered with solely because
modification has been made.

  If you convey an object code work under this section in, or with, or
specifically for use in, a User Product, and the conveying occurs as
part of a transaction in which the right of possession and use of the
User Product is transferred to the recipient in perpetuity or for a
fixed term (regardless of how the transaction is characterized), the
Corresponding Source conveyed under this section must be accompanied
by the Installation Information.  But this requirement does not apply
if neither you nor any third party retains the ability to install
modified object code on the User Product (for example, the work has
been installed in ROM).

  The requirement to provide Installation Information does not include a
requirement to continue to provide support service, warranty, or updates
for a work that has been modified or installed by the recipient, or for
the User Product in which it has been modified or installed.  Access to a
network may be denied when the modification itself materially and
adversely affects the operation of the network or violates the rules and
protocols for communication across the network.

  Corresponding Source conveyed, and Installation Information provided,
in accord with this section must be in a format that is publicly
documented (and with an implementation available to the public in
source code form), and must require no special password or key for
unpacking, reading or copying.

  7. Additional Terms.

  "Additional permissions" are terms that supplement the terms of this
License by making exceptions from one or more of its conditions.
Additional permissions that are applicable to the entire Program shall
be treated as though they were included in this License, to the extent
that they are valid under applicable law.  If additional permissions
apply only to part of the Program, that part may be used separately
under those permissions, but the entire Program remains governed by
this License without regard to the additional permissions.

  When you convey a copy of a covered work, you may at your option
remove any additional permissions from that copy, or from any part of
it.  (Additional permissions may be written to require their own
removal in certain cases when you modify the work.)  You may place
additional permissions on material, added by you to a covered work,
for which you have or can give appropriate copyright permission.

  Notwithstanding any other provision of this License, for material you
add to a covered work, you may (if authorized by the copyright holders of
that material) supplement the terms of this License with terms:

    a) Disclaiming warranty or limiting liability differently from the
    terms of sections 15 and 16 of this License; or

    b) Requiring preservation of specified reasonable legal notices or
    author attributions in that material or in the Appropriate Legal
    Notices displayed by works containing it; or

    c) Prohibiting misrepresentation of the origin of that material, or
    requiring that modified versions of such material be marked in
    reasonable ways as different from the original version; or

    d) Limiting the use for publicity purposes of names of licensors or
    authors of the material; or

    e) Declining to grant rights under trademark law for use of some
    trade names, trademarks, or service marks; or

    f) Requiring indemnification of licensors and authors of that
    material by anyone who conveys the material (or modified versions of
    it) with contractual assumptions of liability to the recipient, for
    any liability that these contractual assumptions directly impose on
    those licensors and authors.

  All other non-permissive additional terms are considered "further
restrictions" within the meaning of section 10.  If the Program as you
received it, or any part of it, contains a notice stating that it is
governed by this License along with a term that is a further
restriction, you may remove that term.  If a license document contains
a further restriction but permits relicensing or conveying under this
License, you may add to a covered work material governed by the terms
of that license document, provided that the further restriction does
not survive such relicensing or conveying.

  If you add terms to a covered work in accord with this section, you
must place, in the relevant source files, a statement of the
additional terms that apply to those files, or a notice indicating
where to find the applicable terms.

  Additional terms, permissive or non-permissive, may be stated in the
form of a separately written license, or stated as exceptions;
the above requirements apply either way.

  8. Termination.

  You may not propagate or modify a covered work except as expressly
provided under this License.  Any attempt otherwise to propagate or
modify it is void, and will automatically terminate your rights under
this License (including any patent licenses granted under the third
paragraph of section 11).

  However, if you cease all violation of this License, then your
license from a particular copyright holder is reinstated (a)
provisionally, unless and until the copyright holder explicitly and
finally terminates your license, and (b) permanently, if the copyright
holder fails to notify you of the violation by some reasonable means
prior to 60 days after the cessation.

  Moreover, your license from a particular copyright holder is
reinstated permanently if the copyright holder notifies you of the
violation by some reasonable means, this is the first time you have
received notice of violation of this License (for any work) from that
copyright holder, and you cure the violation prior to 30 days after
your receipt of the notice.

  Termination of your rights under this section does not terminate the
licenses of parties who have received copies or rights from you under
this License.  If your rights have been terminated and not permanently
reinstated, you do not qualify to receive new licenses for the same
material under section 10.

  9. Acceptance Not Required for Having Copies.

  You are not required to accept this License in order to receive or
run a copy of the Program.  Ancillary propagation of a covered work
occurring solely as a consequence of using peer-to-peer transmission
to receive a copy likewise does not require acceptance.  However,
nothing other than this License grants you permission to propagate or
modify any covered work.  These actions infringe copyright if you do
not accept this License.  Therefore, by modifying or propagating a
covered work, you indicate your acceptance of this License to do so.

  10. Automatic Licensing of Downstream Recipients.

  Each time you convey a covered work, the recipient automatically
receives a license from the original licensors, to run, modify and
propagate that work, subject to this License.  You are not responsible
for enforcing compliance by third parties with this License.

  An "entity transaction" is a transaction transferring control of an
organization, or substantially all assets of one, or subdividing an
organization, or merging organizations.  If propagation of a covered
work results from an entity transaction, each party to that
transaction who receives a copy of the work also receives whatever
licenses to the work the party's predecessor in interest had or could
give under the previous paragraph, plus a right to possession of the
Corresponding Source of the work from the predecessor in interest, if
the predecessor has it or can get it with reasonable efforts.

  You may not impose any further restrictions on the exercise of the
rights granted or affirmed under this License.  For example, you may
not impose a license fee, royalty, or other charge for exercise of
rights granted under this License, and you may not initiate litigation
(including a cross-claim or counterclaim in a lawsuit) alleging that
any patent claim is infringed by making, using, selling, offering for
sale, or importing the Program or any portion of it.

  11. Patents.

  A "contributor" is a copyright holder who authorizes use under this
License of the Program or a work on which the Program is based.  The
work thus licensed is called the contributor's "contributor version".

  A contributor's "essential patent claims" are all patent claims
owned or controlled by the contributor, whether already acquired or
hereafter acquired, that would be infringed by some manner, permitted
by this License, of making, using, or selling its contributor version,
but do not include claims that would be infringed only as a
consequence of further modification of the contributor version.  For
purposes of this definition, "control" includes the right to grant
patent sublicenses in a manner consistent with the requirements of
this License.

  Each contributor grants you a non-exclusive, worldwide, royalty-free
patent license under the contributor's essential patent claims, to
make, use, sell, offer for sale, import and otherwise run, modify and
propagate the contents of its contributor version.

  In the following three paragraphs, a "patent license" is any express
agreement or commitment, however denominated, not to enforce a patent
(such as an express permission to practice a patent or covenant not to
sue for patent infringement).  To "grant" such a patent license to a
party means to make such an agreement or commitment not to enforce a
patent against the party.

  If you convey a covered work, knowingly relying on a patent license,
and the Corresponding Source of the work is not available for anyone
to copy, free of charge and under the terms of this License, through a
publicly available network server or other readily accessible means,
then you must either (1) cause the Corresponding Source to be so
available, or (2) arrange to deprive yourself of the benefit of the
patent license for this particular work, or (3) arrange, in a manner
consistent with the requirements of this License, to extend the patent
license to downstream recipients.  "Knowingly relying" means you have
actual knowledge that, but for the patent license, your conveying the
covered work in a country, or your recipient's use of the covered work
in a country, would infringe one or more identifiable patents in that
country that you have reason to believe are valid.

  If, pursuant to or in connection with a single transaction or
arrangement, you convey, or propagate by procuring conveyance of, a
covered work, and grant a patent license to some of the parties
receiving the covered work authorizing them to use, propagate, modify
or convey a specific copy of the covered work, then the patent license
you grant is automatically extended to all recipients of the covered
work and works based on it.

  A patent license is "discriminatory" if it does not include within
the scope of its coverage, prohibits the exercise of, or is
conditioned on the non-exercise of one or more of the rights that are
specifically granted under this License.  You may not convey a covered
work if you are a party to an arrangement with a third party that is
in the business of distributing software, under which you make payment
to the third party based on the extent of your activity of conveying
the work, and under which the third party grants, to any of the
parties who would receive the covered work from you, a discriminatory
patent license (a) in connection with copies of the covered work
conveyed by you (or copies made from those copies), or (b) primarily
for and in connection with specific products or compilations that
contain the covered work, unless you entered into that arrangement,
or that patent license was granted, prior to 28 March 2007.

  Nothing in this License shall be construed as excluding or limiting
any implied license or other defenses to infringement that may
otherwise be available to you under applicable patent law.

  12. No Surrender of Others' Freedom.

  If conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License.  If you cannot convey a
covered work so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you may
not convey it at all.  For example, if you agree to terms that obligate you
to collect a royalty for further conveying from those to whom you convey
the Program, the only way you could satisfy both those terms and this
License would be to refrain entirely from conveying the Program.

  13. Remote Network Interaction; Use with the GNU General Public License.

  Notwithstanding any other provision of this License, if you modify the
Program, your modified version must prominently offer all users
interacting with it remotely through a computer network (if your version
supports such interaction) an opportunity to receive the Corresponding
Source of your version by providing access to the Corresponding Source
from a network server at no charge, through some standard or customary
means of facilitating copying of software.  This Corresponding Source
shall include the Corresponding Source for any work covered by version 3
of the GNU General Public License that is incorporated pursuant to the
following paragraph.

  Notwithstanding any other provision of this License, you have
permission to link or combine any covered work with a work licensed
under version 3 of the GNU General Public License into a single
combined work, and to convey the resulting work.  The terms of this
License will continue to apply to the part which is the covered work,
but the work with which it is combined will remain governed by version
3 of the GNU General Public License.

  14. Revised Versions of this License.

  The Free Software Foundation may publish revised and/or new versions of
the GNU Affero General Public License from time to time.  Such new versions
will be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.

  Each version is given a distinguishing version number.  If the
Program specifies that a certain numbered version of the GNU Affero General
Public License "or any later version" applies to it, you have the
option of following the terms and conditions either of that numbered
version or of any later version published by the Free Software
Foundation.  If the Program does not specify a version number of the
GNU Affero General Public License, you may choose any version ever published
by the Free Software Foundation.

  If the Program specifies that a proxy can decide which future
versions of the GNU Affero General Public License can be used, that proxy's
public statement of acceptance of a version permanently authorizes you
to choose that version for the Program.

  Later license versions may give you additional or different
permissions.  However, no additional obligations are imposed on any
author or copyright holder as a result of your choosing to follow a
later version.

  15. Disclaimer of Warranty.

  THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
APPLICABLE LAW.  EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE.  THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
IS WITH YOU.  SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.

  16. Limitation of Liability.

  IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
SUCH DAMAGES.

  17. Interpretation of Sections 15 and 16.

  If the disclaimer of warranty and limitation of liability provided
above cannot be given local legal effect according to their terms,
reviewing courts shall apply local law that most closely approximates
an absolute waiver of all civil liability in connection with the
Program, unless a warranty or assumption of liability accompanies a
copy of the Program in return for a fee.

                     END OF TERMS AND CONDITIONS

            How to Apply These Terms to Your New Programs

  If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.

  To do so, attach the following notices to the program.  It is safest
to attach them to the start of each source file to most effectively
state the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.

    <one line to give the program's name and a brief idea of what it does.>
    Copyright (C) <year>  <name of author>

    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU Affero General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU Affero General Public License for more details.

    You should have received a copy of the GNU Affero General Public License
    along with this program.  If not, see <https://www.gnu.org/licenses/>.

Also add information on how to contact you by electronic and paper mail.

  If your software can interact with users remotely through a computer
network, you should also make sure that it provides a way for users to
get its source.  For example, if your program is a web application, its
interface could display a "Source" link that leads users to an archive
of the code.  There are many ways you could offer source, and different
solutions will be better for different programs; see section 13 for the
specific requirements.

  You should also get your employer (if you work as a programmer) or school,
if any, to sign a "copyright disclaimer" for the program, if necessary.
For more information on this, and how to apply and follow the GNU AGPL, see
<https://www.gnu.org/licenses/>.


================================================
FILE: README.md
================================================
# MusicFree 桌面版
![GitHub Repo stars](https://img.shields.io/github/stars/maotoumao/MusicFreeDesktop) 
![GitHub forks](https://img.shields.io/github/forks/maotoumao/MusicFreeDesktop)
![star](https://gitcode.com/maotoumao/MusicFreeDesktop/star/badge.svg)

![GitHub License](https://img.shields.io/github/license/maotoumao/MusicFreeDesktop)
![GitHub Downloads (all assets, all releases)](https://img.shields.io/github/downloads/maotoumao/MusicFreeDesktop/total)
![GitHub Issues or Pull Requests](https://img.shields.io/github/issues/maotoumao/MusicFreeDesktop)
![GitHub package.json version](https://img.shields.io/github/package-json/v/maotoumao/MusicFreeDesktop)

<a href="https://trendshift.io/repositories/3961" target="_blank"><img src="https://trendshift.io/api/badge/repositories/3961" alt="maotoumao%2FMusicFreeDesktop | Trendshift" style="width: 250px; height: 55px;" width="250" height="55"/></a>
---

## 项目使用约定:
本项目基于 AGPL 3.0 协议开源,使用此项目时请遵守开源协议。  
除此外,希望你在使用代码时已经了解以下额外说明:

1. 打包、二次分发 **请保留代码出处**:https://github.com/maotoumao/MusicFree
2. 请不要用于商业用途,合法合规使用代码;
3. 如果开源协议变更,将在此 Github 仓库更新,不另行通知。
---

## 简介

一个插件化、定制化、无广告的免费音乐播放器。
> 当前版本支持 Windows 和 macOS 和 Linux

<img src="./src/assets/imgs/wechat_channel1.png" height="144px" title="微信公众号" style="display:inherit;"/>


### 下载地址

[飞书云文档](https://r0rvr854dd1.feishu.cn/drive/folder/IrVEfD67KlWZGkdqwjecLHFNnBb?from=from_copylink)

## 特性

- 插件化:本软件仅仅是一个播放器,本身**并不集成**任何平台的任何音源,所有的搜索、播放、歌单导入等功能全部基于**插件**。这也就意味着,**只要可以在互联网上搜索到的音源,只要有对应的插件,你都可以使用本软件进行搜索、播放等功能。** 关于插件的详细说明请参考 [安卓版 Readme 的插件部分](https://github.com/maotoumao/MusicFree#%E6%8F%92%E4%BB%B6)。

- 插件支持的功能:搜索(音乐、专辑、作者、歌单)、播放、查看专辑、查看作者详细信息、导入单曲、导入歌单、获取歌词等。

- 定制化:本软件可以通过主题包定义软件外观及背景,详见下方主题包一节。

- 无广告:基于 AGPL3.0 协议开源,将会保持免费。

- 隐私:软件所有数据存储在本地,本软件不会上传你的个人信息。

## 插件

插件协议和安卓版完全相同。

[示例插件仓库](https://github.com/maotoumao/MusicFreePlugins),你可以根据[插件开发文档](https://musicfree.catcat.work/plugin/introduction.html) 开发适配于任意音源的插件。

## 主题包

主题包是一个文件夹,文件夹内必须包含两个文件:

```bash
index.css
config.json
```

### index.css

index.css 中可以覆盖界面中的任何样式。你可以通过定义 css 变量来完成大部分颜色的替换,也可以查看源代码,根据类名等覆盖样式。

支持的 css 变量如下:

``` css
:root {
  --primaryColor: #f17d34; // 主色调
  --backgroundColor: #fdfdfd; // 背景色
  --dividerColor: rgba(0, 0, 0, 0.1); // 分割线颜色
  --listHoverColor: rgba(0, 0, 0, 0.05); // 列表悬浮颜色
  --listActiveColor: rgba(0, 0, 0, 0.1); // 列表选中颜色
  --textColor: #333333; // 主文本颜色
  --maskColor: rgba(51, 51, 51, 0.2); // 遮罩层颜色
  --shadowColor: rgba(0, 0, 0, 0.2); // 对话框等阴影颜色
  /** --shadow:  // shadow属性 */
  --placeholderColor: #f4f4f4; // 输入区背景颜色
  --successColor: #08A34C; // 成功颜色
  --dangerColor: #FC5F5F; // 危险颜色
  --infoColor: #0A95C8; // 通知颜色
  --headerTextColor: white; // 顶部文本颜色
}
```

具体的例子可以参考 [暗黑模式](https://github.com/maotoumao/MusicFreeThemePacks/blob/master/darkmode/index.css)

除了通过 css 定义常规样式外,也可以通过在 config.json 中定义 iframes 字段,用来把任意的 html 文件作为软件背景,这样可以实现一些单纯用 css 无法实现的效果。

### config.json

config.json 是一个配置文件。

```json
{
    "name": "主题包的名称",
    "preview": "#000000", // 预览图,支持颜色或图片;
    "description": "描述文本",
    "iframes": {
        "app": "http://musicfree.catcat.work", // 整个软件的背景
        "header": "", // 头部区域的背景
        "body": "", // 侧边栏+主页面区域的背景
        "side-bar": "", // 侧边栏区域的背景
        "page": "", // 主页面区域的背景
        "music-bar": "", // 底部音乐栏的背景

    }
}
```

如果需要指向本地的图片,可以通过 ```@/``` 表示主题包的路径;preview、iframes、以及 iframes 指向的 html 文件都会把 ```@/``` 替换为 ```主题包路径```。详情可参考 [樱花主题](https://github.com/maotoumao/MusicFreeThemePacks/tree/master/sakura)

### 主题包示例

示例仓库:https://github.com/maotoumao/MusicFreeThemePacks

几个主题包效果截图:

#### 暗黑模式
[源代码](https://github.com/maotoumao/MusicFreeThemePacks/tree/master/darkmode)

![暗黑模式](./.imgs/darkmode.png)

#### 背景图片
[源代码](https://github.com/maotoumao/MusicFreeThemePacks/tree/master/night-star)

![背景图片](./.imgs/night-star.png)

#### fliqlo
[源代码](https://github.com/maotoumao/MusicFreeThemePacks/tree/master/fliqlo)

![fliqlo](./.imgs/fliqlo.gif)

#### 樱花
[源代码](https://github.com/maotoumao/MusicFreeThemePacks/tree/master/sakura)

![樱花](./.imgs/sakura.gif)

#### 雨季
[源代码](https://github.com/maotoumao/MusicFreeThemePacks/tree/master/rainy-season)

![雨季](./.imgs/rainy-season.gif)

## 启动项目

下载仓库代码之后,在根目录下执行:

```bash
npm install
npm start
```

## 支持这个项目

如果你喜欢这个项目,或者希望我可以持续维护下去,你可以通过以下任何一种方式支持我;)

1. Star 这个项目,分享给你身边的人;
2. 关注公众号【一只猫头猫】获取最新信息;

<img src="./src/assets/imgs/wechat_channel.jpg" height="160px" title="微信公众号" style="display:inherit;"/>

## 截图

![screenshot](./.imgs/screenshot.png)

![screenshot](./.imgs/screenshot1.png)

![screenshot](./.imgs/screenshot2.png)


================================================
FILE: changelog.md
================================================
`2025-10-24 v0.0.8`
1. 【修复】修复了一些可能导致白屏的问题

`2025-03-30 v0.0.7`
1. 【功能】开发者模式:狂点托盘图标可打开开发者工具
2. 【修复】修复退出应用时可能出现的进程残留的问题(感谢@dyfllll)
3. 【修复】修复windows控制中心无法控制暂停/播放状态的问题
4. 【修复】修复打开歌词窗口/迷你模式窗口歌词可能始终为空的问题
5. 【修复】修复配置出错时软件白屏的问题
6. 【修复】修复任务栏上的关闭按钮表现和设置中的选项不一致的问题

`2024-12-25 v0.0.6`
1. 【优化】大量代码重构
2. 【功能】新增播放失败时不寻找其他音质版本的配置
3. 【功能】歌单内支持通过 ctrl 键盘多选歌曲批量操作
4. 【功能】支持自定义主窗口大小
5. 【功能】支持自定义歌词窗口大小
6. 【功能】调整播放详情页面的样式
7. 【功能】支持了评论功能(需要插件支持)
8. 【修复】修复了歌单id无法带特殊字符的问题
9. 【修复】修复了音源太多时布局异常的问题

`2024-06.25 v0.0.5`
【修复】修复重启软件后歌单丢失的问题;如果未出现上述问题可忽略此版本更新

`2024-06.16 v0.0.4`

1. 【功能】播放列表支持拖拽排序
2. 【功能】支持多语言。本次支持简体中文、繁体中文、英文、西班牙语
3. 【功能】支持歌词翻译功能(需要插件实现 getLyric 方法)
4. 【功能】新增最近播放,默认保存最近播放的 500 首歌
5. 【功能】新增小窗模式
6. 【功能】新增音频设备移除时的行为设置,现在可以让拔掉耳机的时候停止播放了
7. 【功能】新增单独的主题页,可以在主题市场中直接使用主题;本地.mftheme 主题可以直接拖拽到播放器安装
8. 【优化】本地音乐会尝试读取本地路径下的同名 .lrc 文件作为歌词;同时会读取同名 -tr.lrc 文件作为翻译
9. 【修复】修复部分情况下本地歌词无法读取的问题
10. 【修复】修复 linux 托盘点击无效的问题

`2023-12.23 v0.0.3`

1. 【功能】插件支持拖拽排序,该排序会影响到搜索结果、排行榜、热门歌单的展示顺序
2. 【功能】播放列表支持多选快捷键(Ctrl + A 全选、按住 Shift 批量选择)
3. 【功能】本地音乐新增搜索功能
4. 【功能】歌单内歌曲支持拖拽排序
5. 【功能】新增了一些插件设置,比如启动软件时自动更新插件
6. 【功能】新增缓存设置,可以在设置中清空软件缓存
7. 【功能】新增网络代理设置
8. 【功能】插件协议更新:新增支持「用户变量」。
9. 【功能】插件协议更新:榜单列表支持分页
10. 【功能】歌单支持 WebDAV 备份;插件预置的 npm 包新增 webdav,配合 WebDAV 插件即可播放 WebDAV 源
11. 【优化】排序/过滤后,点击歌单列表会播放排序/过滤后的歌曲,而非全部歌曲
12. 【优化】优化批量删除歌曲失败时的表现
13. 【优化】优化歌单内歌曲较多时的体验
14. 【优化】优化歌曲名称超长时右下角菜单的显示
15. 【优化】加载本地歌曲时会自动识别歌曲元信息的编码,减少出现乱码的可能性
16. 【优化】优化本地歌曲过多时的拖拽表现
17. 【优化】优化 windows7/8 部分按钮的表现
18. 【修复】修复 macos、linux 本地歌曲无法播放的问题
19. 【修复】修复部分情况下无法右键打开下载文件夹的问题
20. 【修复】修复 macos 输入框无法粘贴的问题
21. 【修复】修复部分情况下快捷键无法删除的问题
22. 【修复】重写了本地歌单逻辑,修复收藏歌单部分情况下无法点击的问题

`2023-11.5 v0.0.2`

1. 【功能】支持播放 .m3u8 源
2. 【功能】打开播放列表时锚定到当前正在播放的歌曲
3. 【功能】新增搜索歌词功能,你可以在歌曲详情页右键点击,并单击【搜索歌词】功能唤起搜索弹窗
4. 【功能】重写了本地歌曲的导入机制,新增本地音乐视图(列表、作者、专辑、文件夹)
5. 【功能】新增支持隐藏歌曲列表的部分列
6. 【功能】新增快捷键:喜欢/不喜欢歌曲
7. 【功能】已经下载的歌曲/本地歌曲支持右键打开
8. 【功能, windows】新增缩略图配置,你可以选择在任务栏悬浮图标时展示原窗口或专辑封面
9. 【功能, windows】新增任务栏播放控制按钮
10. 【优化】优化主题包安装机制:取消原本安装文件夹的机制,修改为安装 .mftheme 或 .zip 的文件,支持批量安装
11. 【优化】优化了从热门歌单页详情页返回时的表现
12. 【优化】优化了歌曲详情页右键按钮的表现
13. 【优化】优化了主窗口和歌词窗口的通信机制
14. 【修复】修复作者页歌曲显示不全的问题
15. 【修复】修复包含特殊字符时下载失败的问题
16. 【修复, macos】修复 macos 图标显示异常的问题
17. 【修复, linux】修复 linux 无法最小化的问题
18. 【打包】新增 windows 免安装版、mac m1/m2 版、linux 版
19. 【版本号】桌面版后缀取消 -alpha 后缀,以正式版本号发布。

`2023.9.5 v0.0.1-alpha.0`

1. 【功能】新增搜索历史记录
2. 【功能】新增下载歌词、调整歌词字体大小功能
3. 【功能】桌面歌词支持自定义字体
4. 【功能】支持选择音频输出设备
5. 【功能】下载歌曲功能
6. 【功能】设置中新增快捷键配置
7. 【功能】支持 windows8.1 及以下系统(下载链接中的 windows-legacy-setup.exe,win10/11 下载哪个 exe 都行)
8. 【优化】调整左下角歌曲信息的可响应区域
9. 【修复】修复本地歌曲只显示 100 首的问题
10. 【修复】修复 mac 系统无法移动桌面歌词的问题
11. 【修复】修复本地插件安装失败的问题


================================================
FILE: config/webpack.main.config.ts
================================================
import type { Configuration } from "webpack";
import path from "path";

import { rules } from "./webpack.rules";

export const mainConfig: Configuration = {
  /**
   * This is the main entry point for your application, it's the first file
   * that runs in the main process.
   */
  entry: {
    index: "./src/main/index.ts",
  },
  // Put your normal webpack config below here
  module: {
    rules,
  },
  resolve: {
    extensions: [".js", ".ts", ".jsx", ".tsx", ".css", ".json", '.node'],
    alias: {
      "@": path.join(__dirname, "../src"),
      "@main": path.join(__dirname, "../src/main"),
      "@native": path.join(__dirname, "../src/main/native_modules"),
      "@shared": path.join(__dirname, "../src/shared")
    },
  },
  output: {
    filename: "[name].js",
  },
  externals: ['sharp']
};


================================================
FILE: config/webpack.plugins.ts
================================================
import type IForkTsCheckerWebpackPlugin from "fork-ts-checker-webpack-plugin";

// eslint-disable-next-line @typescript-eslint/no-var-requires
const ForkTsCheckerWebpackPlugin: typeof IForkTsCheckerWebpackPlugin = require("fork-ts-checker-webpack-plugin");
const relocateLoader = require("@vercel/webpack-asset-relocator-loader");

export const plugins = [
  new ForkTsCheckerWebpackPlugin({
    logger: "webpack-infrastructure",
  }),
  {
    apply(compiler: any) {
      compiler.hooks.compilation.tap(
        "webpack-asset-relocator-loader",
        (compilation: any) => {
          relocateLoader.initAssetCache(compilation, "native_modules");
        }
      );
    },
  },
];


================================================
FILE: config/webpack.renderer.config.ts
================================================
import type { Configuration } from "webpack";
import path from "path";

import { rules } from "./webpack.rules";
import { plugins } from "./webpack.plugins";

rules.push(
  {
    test: /\.css$/,
    use: [{ loader: "style-loader" }, { loader: "css-loader" }],
  },
  {
    test: /\.scss$/,
    use: [
      { loader: "style-loader" },
      { loader: "css-loader" },
      { loader: "sass-loader" },
    ],
  },
  {
    test: /\.(woff|woff2|eot|ttf|otf)$/i,
    type: "asset/resource",
  },
  {
    test: /\.(png|jpg|jpeg|gif)$/i,
    type: "asset/resource",
  },
  {
    test: /\.svg$/,
    use: [
      {
        loader: "@svgr/webpack",
        options: {
          prettier: false,
          svgo: false,
          svgoConfig: {
            plugins: [{ removeViewBox: false }],
          },
          titleProp: true,
          ref: true,
        },
      },
    ],
  }
);

export const rendererConfig: Configuration = {
  module: {
    rules,
  },
  plugins,
  resolve: {
    extensions: [".js", ".ts", ".jsx", ".tsx", ".css", ".scss"],
    alias: {
      "@": path.join(__dirname, "../src"),
      "@renderer": path.join(__dirname, "../src/renderer"),
      "@renderer-lrc": path.join(__dirname, "../src/renderer-lrc"),
      "@shared": path.join(__dirname, "../src/shared")
    },
  },
  externals: process.platform !== "darwin" ? ["fsevents"] : undefined,
};


================================================
FILE: config/webpack.rules.ts
================================================
import type { ModuleOptions } from 'webpack';

export const rules: Required<ModuleOptions>['rules'] = [
  // Add support for native node modules
  {
    // We're specifying native_modules in the test because the asset relocator loader generates a
    // "fake" .node file which is really a cjs file.
    test: /native_modules[/\\].+\.node$/,
    use: 'node-loader',
  },
  {
    test: /[/\\]node_modules[/\\].+\.(m?js|node)$/,
    parser: { amd: false },
    use: {
      loader: '@vercel/webpack-asset-relocator-loader',
      options: {
        outputAssetBase: 'native_modules',
      },
    },
  },
  {
    test: /\.tsx?$/,
    exclude: /(node_modules|\.webpack)/,
    use: {
      loader: 'ts-loader',
      options: {
        transpileOnly: true,
      },
    },
  },
  {
    test: /\.jsx?$/,
    use: {
      loader: 'babel-loader',
      options: {
        exclude: /node_modules/,
        presets: ['@babel/preset-react']
      }
    }
  },
];


================================================
FILE: eslint.config.mjs
================================================
import globals from "globals";
import js from "@eslint/js";
import tseslint from "typescript-eslint";
import importPlugin from "eslint-plugin-import";
import stylistic from "@stylistic/eslint-plugin";

export default [
    // JavaScript 推荐配置
    js.configs.recommended,

    // TypeScript 推荐配置
    ...tseslint.configs.recommended,

    // 全局配置
    {
        languageOptions: {
            globals: {
                ...globals.browser,
                ...globals.node,
                ...globals.es6,
            },
        },
    },    // TypeScript 和 JavaScript 文件配置
    {
        files: ["**/*.{js,mjs,cjs,ts,tsx}"],
        plugins: {
            import: importPlugin,
            "@stylistic": stylistic,
        },
        rules: {
            // 保持原有的规则配置
            "@typescript-eslint/ban-ts-comment": "off",
            "@typescript-eslint/no-var-requires": "warn",
            "import/no-unresolved": "off",
            "@typescript-eslint/no-empty-interface": "off",
            "@typescript-eslint/no-explicit-any": "off",
            "@typescript-eslint/no-empty-function": "warn",
            "no-empty": "warn",
            "no-useless-catch": "warn",
            "prefer-const": "warn",
            // 样式规则迁移到 ESLint Stylistic
            "@stylistic/quotes": ["warn", "double"],
            "@stylistic/object-curly-spacing": ["error", "always"],
            "@stylistic/indent": ["error", 4], // 统一缩进
            "@stylistic/semi": ["error", "always"], // 强制分号
            "@stylistic/comma-dangle": ["error", "always-multiline"], // 多行末尾逗号
            "@stylistic/brace-style": ["error", "1tbs"], // 大括号风格

            // Import 相关规则
            "import/no-duplicates": "error",
            "import/no-self-import": "error",
            "import/no-useless-path-segments": "error",            // 企业级最佳实践
            "@typescript-eslint/no-unused-vars": ["warn", {
                "argsIgnorePattern": "^_",
                "varsIgnorePattern": "^_",
            }],
            "@typescript-eslint/no-non-null-assertion": "warn",
            "no-console": "warn",
        },
        settings: {
            "import/resolver": {
                "typescript": {
                    "alwaysTryTypes": true,
                    "project": "./tsconfig.json",
                },
                "node": {
                    "extensions": [".js", ".jsx", ".ts", ".tsx"],
                },
            },
        },
    },

    // 特定于主进程的配置
    {
        files: ["src/main/**/*.{ts,js}"],
        languageOptions: {
            globals: {
                ...globals.node,
            },
        },
        rules: {
            "no-console": "off", // 主进程允许使用 console
        },
    },

    // 特定于渲染进程的配置  
    {
        files: ["src/renderer*/**/*.{ts,tsx,js,jsx}"],
        languageOptions: {
            globals: {
                ...globals.browser,
            },
        },
    },

    // 配置文件和脚本的特殊规则
    {
        files: ["*.config.{js,ts,mjs}", "scripts/**/*.{js,ts}"],
        rules: {
            "@typescript-eslint/no-var-requires": "off",
            "no-console": "off",
        },
    },

    // 忽略文件
    {
        ignores: [
            "node_modules/**",
            "dist/**",
            ".webpack/**",
            "out/**",
            "release/**",
            "**/*.d.ts",
        ],
    },
];


================================================
FILE: forge.config.ts
================================================
import type { ForgeConfig } from "@electron-forge/shared-types";
import { MakerZIP } from "@electron-forge/maker-zip";
import { MakerDeb } from "@electron-forge/maker-deb";
import { MakerDMG } from "@electron-forge/maker-dmg";
import { WebpackPlugin } from "@electron-forge/plugin-webpack";

import { mainConfig } from "./config/webpack.main.config";
import { rendererConfig } from "./config/webpack.renderer.config";
import path from "path";

const config: ForgeConfig = {
  packagerConfig: {
    appBundleId: "fun.upup.musicfree",
    icon: path.resolve(__dirname, "res/logo"),
    executableName: "MusicFree",
    extraResource: [path.resolve(__dirname, "res")],
    protocols: [
      {
        name: "MusicFree",
        schemes: ["musicfree"],
      },
    ],
  },
  rebuildConfig: {},
  makers: [
    // new MakerSquirrel({
    //   exe: "MusicFree",
    //   setupIcon: path.resolve(__dirname, "resources/logo.ico"),
    //   setupMsi: "MusicFreeInstaller",
    // }),
    new MakerZIP({}, ["darwin"]),
    new MakerDMG(
      {
        // background
        format: "ULFO",
      },
      ["darwin"]
    ),
    // new MakerRpm({}),
    new MakerDeb({
      options: {
        name: "MusicFree",
        bin: "MusicFree",
        mimeType: ["x-scheme-handler/musicfree"],
      },
    }),
  ],
  plugins: [
    new WebpackPlugin({
      devContentSecurityPolicy: `default-src * self blob: data: gap: file:; style-src * self 'unsafe-inline' blob: data: gap: file:; script-src * 'self' 'unsafe-eval' 'unsafe-inline' blob: data: gap: file:; object-src * 'self' blob: data: gap:; img-src * self 'unsafe-inline' blob: data: gap: file:; connect-src self * 'unsafe-inline' blob: data: gap:; frame-src * self blob: data: gap:;`,
      mainConfig,
      renderer: {
        config: rendererConfig,
        entryPoints: [
          {
            html: "./src/renderer/document/index.html",
            js: "./src/renderer/document/index.tsx",
            name: "main_window",
            preload: {
              js: "./src/preload/index.ts",
            },
          },
          {
            html: "./src/renderer-lrc/document/index.html",
            js: "./src/renderer-lrc/document/index.tsx",
            name: "lrc_window",
            preload: {
              js: "./src/preload/extension.ts",
            },
          },
          {
            html: "./src/renderer-minimode/document/index.html",
            js: "./src/renderer-minimode/document/index.tsx",
            name: "minimode_window",
            preload: {
              js: "./src/preload/extension.ts",
            },
          },
          /** webworkers */
          {
            js: "./src/webworkers/downloader.ts",
            name: "worker_downloader",
            nodeIntegration: true,
          },
          {
            js: "./src/webworkers/local-file-watcher.ts",
            name: "local_file_watcher",
            nodeIntegration: true,
          },
          {
            js: "./src/webworkers/db-worker.ts",
            name: "db",
            nodeIntegration: true,
          }
        ],
      },
    }),
    {
      name: "@timfish/forge-externals-plugin",
      config: {
        externals: ["sharp"],
        includeDeps: true,
      },
    },
  ],
};

export default config;


================================================
FILE: package.json
================================================
{
  "name": "musicfree-desktop",
  "productName": "MusicFree",
  "version": "0.0.8",
  "description": "一个插件化的音乐播放器",
  "main": ".webpack/main",
  "scripts": {
    "start": "electron-forge start",
    "dev": "electron-forge start --inspect-electron",
    "package": "electron-forge package",
    "make": "electron-forge make",
    "publish": "electron-forge publish",
    "lint": "eslint ./src --fix",
    "lint-staged": "lint-staged",
    "prepare": "husky install"
  },
  "keywords": [],
  "author": {
    "name": "猫头猫",
    "email": "lhx_xjtu@163.com"
  },
  "license": "GPL",
  "lint-staged": {
    "src/**/*.{ts,tsx,js}": [
      "npm run lint",
      "git add ."
    ]
  },
  "devDependencies": {
    "@babel/core": "^7.22.1",
    "@babel/preset-react": "^7.22.0",
    "@electron-forge/cli": "6.4.1",
    "@electron-forge/maker-deb": "6.4.1",
    "@electron-forge/maker-dmg": "6.4.1",
    "@electron-forge/maker-rpm": "6.4.1",
    "@electron-forge/maker-squirrel": "6.4.1",
    "@electron-forge/maker-zip": "6.4.1",
    "@electron-forge/plugin-webpack": "6.4.1",
    "@eslint/js": "^9.15.0",
    "@larksuiteoapi/node-sdk": "^1.50.1",
    "@stylistic/eslint-plugin": "^5.0.0",
    "@svgr/webpack": "^8.1.0",
    "@timfish/forge-externals-plugin": "^0.2.1",
    "@types/better-sqlite3": "^7.6.13",
    "@types/crypto-js": "^4.2.2",
    "@types/he": "^1.2.3",
    "@types/lodash.debounce": "^4.0.9",
    "@types/lodash.shuffle": "^4.2.9",
    "@types/lodash.throttle": "^4.1.9",
    "@types/object-path": "^0.11.4",
    "@types/react": "^18.3.2",
    "@types/react-dom": "^18.3.0",
    "@types/unzipper": "^0.10.9",
    "@typescript-eslint/eslint-plugin": "^8.15.0",
    "@typescript-eslint/parser": "^8.15.0",
    "@vercel/webpack-asset-relocator-loader": "^1.7.3",
    "babel-loader": "^9.1.3",
    "cross-env": "^7.0.3",
    "css-loader": "^6.11.0",
    "electron": "^25.3.0",
    "eslint": "^9.15.0",
    "eslint-import-resolver-typescript": "^3.6.3",
    "eslint-plugin-import": "^2.31.0",
    "file-loader": "^6.2.0",
    "fork-ts-checker-webpack-plugin": "^7.3.0",
    "globals": "^15.12.0",
    "husky": "^9.0.11",
    "lint-staged": "^15.2.2",
    "node-loader": "^2.0.0",
    "sass": "^1.83.0",
    "sass-loader": "^16.0.4",
    "style-loader": "^4.0.0",
    "ts-loader": "^9.5.1",
    "ts-node": "^10.9.2",
    "typescript": "~5.0.4",
    "typescript-eslint": "^8.15.0"
  },
  "dependencies": {
    "@headlessui/react": "^1.7.15",
    "@tanstack/react-table": "^8.17.3",
    "animate.css": "^4.1.1",
    "axios": "1.7.4",
    "better-sqlite3": "^12.1.1",
    "big-integer": "^1.6.52",
    "cheerio": "^1.0.0-rc.12",
    "chokidar": "^3.6.0",
    "color": "^4.2.3",
    "comlink": "^4.4.2",
    "compare-versions": "^6.1.0",
    "crypto-js": "^4.2.0",
    "dayjs": "^1.11.11",
    "dexie": "^3.2.4",
    "electron-log": "^5.2.0",
    "eventemitter3": "^5.0.1",
    "he": "^1.2.0",
    "hls.js": "^1.5.8",
    "hotkeys-js": "^3.13.7",
    "https-proxy-agent": "^7.0.4",
    "i18next": "^22.5.1",
    "iconv-lite": "^0.6.3",
    "immer": "^10.1.1",
    "jschardet": "^3.1.3",
    "lodash.shuffle": "^4.2.0",
    "lodash.throttle": "^4.1.1",
    "lru-cache": "^10.2.2",
    "music-metadata": "^8.3.0",
    "nanoid": "^4.0.2",
    "object-path": "^0.11.8",
    "p-queue": "^7.4.1",
    "qs": "^6.12.1",
    "rc-slider": "^10.6.2",
    "react": "^18.3.1",
    "react-colorful": "^5.6.1",
    "react-dom": "^18.3.1",
    "react-error-boundary": "^5.0.0",
    "react-i18next": "^12.3.1",
    "react-router-dom": "^6.23.1",
    "react-toastify": "^9.1.3",
    "react-tooltip": "^5.26.4",
    "rimraf": "^5.0.7",
    "sharp": "^0.32.6",
    "socket.io": "^4.7.5",
    "unzipper": "^0.11.6",
    "webdav": "^5.6.0"
  }
}


================================================
FILE: release/build-windows.iss
================================================
; Script generated by the Inno Setup Script Wizard.
; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!

#define MyAppName "MusicFree"
#ifndef MyAppVersion
#define MyAppVersion "0.0.0-alpha.0"
#endif
#define MyAppPublisher "maotoumao"
#define MyAppURL "https://musicfree.catcat.work"
#define MyAppExeName "MusicFree.exe"
#ifndef MyAppId
#define MyAppId
#endif


[Setup]
; NOTE: The value of AppId uniquely identifies this application. Do not use the same AppId value in installers for other applications.
; (To generate a new GUID, click Tools | Generate GUID inside the IDE.)
AppId={{{#MyAppId}}
AppName={#MyAppName}
AppVersion={#MyAppVersion}
;AppVerName={#MyAppName} {#MyAppVersion}
AppPublisher={#MyAppPublisher}
AppPublisherURL={#MyAppURL}
AppSupportURL={#MyAppURL}
AppUpdatesURL={#MyAppURL}
DefaultDirName={autopf}\{#MyAppName}
DisableProgramGroupPage=yes
; Uncomment the following line to run in non administrative install mode (install for current user only.)
;PrivilegesRequired=lowest
PrivilegesRequiredOverridesAllowed=dialog
OutputDir=..\out
OutputBaseFilename=MusicFreeSetup
SetupIconFile=..\res\logo.ico
Compression=lzma
SolidCompression=yes
WizardStyle=modern

[Languages]
Name: "english"; MessagesFile: "compiler:Default.isl"
Name: "chinesesimplified"; MessagesFile: "compiler:Languages\ChineseSimplified.isl"

[Tasks]
Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked

[Files]
Source: "..\out\MusicFree-win32-x64\{#MyAppExeName}"; DestDir: "{app}"; Flags: ignoreversion
Source: "..\out\MusicFree-win32-x64\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs
; NOTE: Don't use "Flags: ignoreversion" on any shared system files

[Icons]
Name: "{autoprograms}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"
Name: "{autodesktop}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"; Tasks: desktopicon

[Run]
Filename: "{app}\{#MyAppExeName}"; Description: "{cm:LaunchProgram,{#StringChange(MyAppName, '&', '&&')}}"; Flags: nowait postinstall skipifsilent



================================================
FILE: release/version.json
================================================
{
  "version": "0.0.8",
  "changeLog": [
    "1. 【修复】修复了一些可能导致白屏的问题"
  ],
  "download": [
    "https://r0rvr854dd1.feishu.cn/drive/folder/IrVEfD67KlWZGkdqwjecLHFNnBb?from=from_copylink"
  ]
}

================================================
FILE: res/.service/request-forwarder.js
================================================
const http = require("http");
const https = require("https");


const defaultPort = 52735;
const maxRetries = 20;

let retryCount = 0;

function forwardRequest(clientRes, url, method, headers) {

    // 确保 host 正确
    let host = headers?.host;

    if (!host || host.includes("localhost") || host.includes("127.0.0.1")) {
        // 如果没有提供 host,且是本地请求,则使用目标 URL 的主机名
        host = new URL(url).host;
    }

    const options = {
        method: method,
        headers: {
            ...(headers || {}),
            host, // 确保目标主机名正确
        },
    };

    const protocol = url.startsWith("https") ? https : http;

    const req = protocol.request(url, options, (targetRes) => {
        // 将目标响应的状态码和头部转发到客户端
        clientRes.writeHead(targetRes.statusCode, targetRes.headers);

        // 将目标响应的数据流转发到客户端
        targetRes.pipe(clientRes, {
            end: true,
        });
    });

    req.on("error", (error) => {
        console.error("Error forwarding request:", error);
        clientRes.writeHead(500, { "Content-Type": "text/plain" });
        clientRes.end("Internal Server Error");
    });

    // 结束目标请求
    req.end();
}


function safeParse(data) {
    try {
        return JSON.parse(data) || {};
    } catch (e) {
        return {};
    }
}


function startServer(port) {

    // 创建一个 HTTP 服务器
    const server = http.createServer((req, res) => {
        if (req.method !== "GET") {
            res.writeHead(405, { "Content-Type": "text/plain" });
            return res.end("Only GET requests are allowed");
        }

        if (req.url === "/heartbeat") {
            res.writeHead(200, { "Content-Type": "text/plain" });
            return res.end("OK");
        }

        const query = new URLSearchParams(req.url.slice(1));


        const url = query.get("url");
        const method = query.get("method") || "GET"; // 默认使用 GET 方法
        const headers = safeParse(query.get("headers"));

        res.setHeader("Access-Control-Allow-Origin", "*"); // 允许所有源
        res.setHeader("Access-Control-Allow-Methods", "GET, POST, OPTIONS"); // 允许的方法

        if (!url) {
            res.writeHead(400, { "Content-Type": "text/plain" });
            return res.end("Bad Request: Missing URL");
        }

        forwardRequest(res, url, method, {
            ...(req.headers || {}),
            ...(headers || {})
        });
    });

    server.listen(port, () => {
        process.send?.({
            type: "port",
            port
        });
        console.log(`Proxy server is running on http://localhost:${port}`);
    });

    server.on("error", (err) => {
        console.error("Server error:", err);
        if (retryCount < maxRetries) {
            retryCount++;
            const newPort = port + 1; // 尝试下一个端口
            console.log(`Retrying on port: ${newPort} (attempt ${retryCount})`);
            startServer(newPort);
        } else {
            process.send?.({ type: "error", error: "Max retries reached" });
        }
    })
}


startServer(defaultPort);


================================================
FILE: res/lang/en-US.json
================================================
{
  "common": {
    "cancel": "Cancel",
    "confirm": "Confirm",
    "download": "Download",
    "downloading": "Downloading",
    "downloaded": "Downloaded",
    "remove": "Remove",
    "delete": "Delete",
    "default": "Default",
    "version_code": "Version Code",
    "operation": "Operation",
    "update": "Update",
    "uninstall": "Uninstall",
    "install": "Install",
    "about": "About",
    "exit": "Exit",
    "edit": "Edit",
    "undo": "Undo",
    "redo": "Redo",
    "cut": "Cut",
    "copy": "Copy",
    "paste": "Paste",
    "select_all": "Select All",
    "loading": "Loading",
    "create": "Create",
    "add": "Add",
    "save": "Save",
    "clear": "Clear",
    "open": "Open",
    "status": "Status"
  },

  "media": {
    "unknown_title": "Untitled",
    "unknown_artist": "Unknown Artist",
    "unknown_album": "Unknown Album",

    "default_favorite_sheet_name": "Favorites",

    "playlist": "Playlist",

    "media_type_music": "Music",
    "media_type_album": "Album",
    "media_type_artist": "Artist",
    "media_type_sheet": "Playlist",
    "media_type_lyric": "Lyric",
    "media_type_comment": "Comment",

    "media_title": "Title",
    "media_platform": "Source",
    "media_duration": "Duration",
    "media_create_at": "Created At",
    "media_play_count": "Play Count",
    "media_music_count": "Song Count",
    "media_description": "Description",

    "music_state_pause": "Pause",
    "music_state_play": "Play",
    "music_state_play_or_pause": "Play/Pause",
    "music_quality_low": "Low Quality",
    "music_quality_standard": "Standard Quality",
    "music_quality_high": "High Quality",
    "music_quality_super": "Super Quality",

    "music_repeat_mode": "Repeat Mode",
    "music_repeat_mode_loop": "Single Loop",
    "music_repeat_mode_queue": "Queue Loop",
    "music_repeat_mode_shuffle": "Shuffle Play"
  },

  "plugin": {
    "prop_user_variable": "User Variable",
    "method_search": "Search",
    "method_import_music_item": "Import Song",
    "method_import_music_sheet": "Import Playlist",
    "method_get_top_lists": "Top Charts",

    "info_hint_you_have_no_plugin": "You have no plugins installed",
    "info_hint_you_have_no_plugin_with_supported_method": "You have no plugins installed that support <highlight>{{supportMethod}}</highlight> feature",
    "info_hint_install_plugin_before_use": "Go to <a>Plugin Management</a> to install plugins~"
  },

  "download_page": {
    "waiting": "Waiting...",
    "failed": "Download Failed"
  },
  "plugin_management_page": {
    "plugin_management": "Plugin Management",
    "choose_plugin": "Choose Plugin",
    "install": "Install",
    "musicfree_plugin": "MusicFree Plugin",
    "install_successfully": "Plugin Installed Successfully",
    "install_failed": "Install Failed",
    "invalid_plugin": "Invalid Plugin",
    "install_from_local_file": "Install from Local File",
    "install_from_network": "Install from Network",
    "install_plugin_from_network": "Install Plugin from Network",
    "installing": "Installing",
    "info_hint_install_placeholder": "Please enter the plugin source URL (link ends with .json or .js)",
    "error_hint_plugin_should_end_with_js_or_json": "Plugin URL must end with .json or .js",
    "info_hint_install_plugin": "Plugins must comply with the MusicFree plugin protocol. For details, visit the <a>official website</a>",
    "subscription_setting": "Subscription Settings",
    "update_subscription": "Update Subscription",
    "update_successfully": "Update Successful",
    "no_subscription": "No Current Subscriptions",

    "uninstall": "Uninstall",
    "uninstall_plugin": "Uninstall Plugin",
    "confirm_text_uninstall_plugin": "Confirm to uninstall plugin {{plugin}}?",
    "uninstall_successfully": "Uninstalled {{plugin}} successfully",
    "uninstall_failed": "Uninstall Failed",

    "toast_plugin_is_latest": "Plugin {{plugin}} is up to date",
    "update_failed": "Update Failed",

    "update": "Update",

    "importing_media": "Importing",
    "placeholder_import_music_item": "Enter {{plugin}} song link",
    "import_failed": "Import Failed",
    "placeholder_import_music_sheet": "Enter {{plugin}} playlist link"
  },
  "local_music_page": {
    "local_music": "Local Music",
    "auto_scan": "Auto Scan",
    "search_local_music": "Search Local Music",
    "list_view": "List View",
    "artist_view": "Artist View",
    "album_view": "Album View",
    "folder_view": "Folder View",
    "total_music_num": "Total {{number}} songs"
  },

  "music_list_context_menu": {
    "next_play": "Play Next",
    "add_to_my_sheets": "Add to Playlist",
    "remove_from_sheet": "Remove from Playlist",
    "delete_local_download": "Delete Local Download",
    "reveal_local_music_in_file_explorer": "Show in File Explorer",
    "reveal_local_music_in_file_explorer_fail": "Open Failed: ",

    "delete_local_downloaded_songs_success": "Deleted {{musicNums}} local songs",
    "delete_local_downloaded_song_success": "Deleted local song [{{songName}}]"
  },

  "search_result_page": {
    "search_result_title": "Search Results for"
  },
  "side_bar": {
    "toplist": "Top Charts",
    "recommend_sheets": "Popular Playlists",
    "download_management": "Download Management",
    "local_music": "Local Music",
    "plugin_management": "Plugin Management",

    "my_sheets": "My Playlists",
    "create_local_sheet": "Create Playlist",
    "starred_sheets": "Favorites",

    "delete_sheet": "Delete",
    "rename_sheet": "Rename",
    "unstar_sheet": "Unstar",
    "recently_play": "Recently Play"
  },
  "app_header": {
    "nav_back": "Back",
    "nav_forward": "Forward",
    "search_placeholder": "Enter search content here",
    "search_history": "Search History",
    "settings": "Settings",
    "minimize": "Minimize",
    "minimode": "Minimode",
    "exit": "Exit",
    "theme": "Theme"
  },
  "music_bar": {
    "open_music_detail_page": "Open Song Details",
    "close_music_detail_page": "Close Song Details",
    "previous_music": "Previous",
    "next_music": "Next",
    "mute": "Mute",
    "unmute": "Unmute",
    "playback_speed": "Playback Speed",
    "choose_music_quality": "Change Quality",
    "only_set_for_current_music": "Only for Current Song",
    "desktop_lyric": "Desktop Lyric"
  },
  "music_detail": {
    "search_lyric": "Search Lyric",
    "no_lyric": "No Lyrics",

    "lyric_ctx_download_lyric": "Download Lyric",
    "lyric_ctx_download_lyric_lrc": "Download Lyric (.lrc)",
    "lyric_ctx_download_lyric_txt": "Download Lyric (.txt)",
    "lyric_ctx_download_success": "Download Successful",
    "lyric_ctx_download_fail": "Download Failed",
    "lyric_ctx_set_font_size": "Set Font Size",

    "link_media_lyric": "Link Lyric",
    "media_lyric_linked": "Lyric Linked: ",
    "unlink_media_lyric": "Unlink Lyric",
    "toast_media_lyric_unlinked": "Lyric Unlinked",
    "translation": "Translation",
    "show_translation": "Show Translation",
    "hide_translation": "Hide Translation"
  },
  "bottom_loading_state": {
    "reached_end": "~~~ End ~~~",
    "loading": "Loading...",
    "load_more": "Load More"
  },
  "empty": {
    "hint_empty": "Nothing here~~~"
  },
  "modal": {
    "add_to_my_sheets": "Add to Playlist",
    "total_music_num": "Total {{number}} songs",
    "create_local_sheet": "Create Playlist",
    "create_local_sheet_placeholder": "Enter new playlist name",
    "exit_confirm": "Confirm Exit?",
    "plugin_subscription": "Plugin Subscription",
    "subscription_remarks": "Remarks: ",
    "subscription_links": "Links: ",
    "subscription_save_success": "Subscription Address Saved",
    "search_lyric": "Search Lyric",
    "search_lyric_result_empty": "No Search Results",
    "media_lyric_linked": "Lyric Linked~",
    "media_lyric_link_failed": "Link Lyric Failed:",
    "new_version_found": "New Version Found",
    "latest_version": "Latest Version: ",
    "current_version": "Current Version: ",
    "skip_this_version": "Skip This Version",
    "scan_local_music": "Scan Local Music",
    "scan_local_music_hint": "Automatically scan selected folders (real-time sync with file changes)",
    "add_folder": "Add Folder"
  },
  "panel": {
    "play_list_song_num": "Playlist ({{number}} songs)",
    "user_variable": "User Variable",
    "user_variable_setting_success": "Setting Successful~"
  },
  "music_sheet_like_view": {
    "play_all": "Play All",
    "add_to_sheet": "Add to Playlist",
    "star": "Star"
  },
  "settings": {
    "choose_path": "Choose Path",
    "change_path": "Change Path",
    "folder_not_exist": "Folder Not Exist",
    "open_folder": "Open Folder",

    "section_name": {
      "normal": "General",
      "play_music": "Playback",
      "download": "Download",
      "lyric": "Lyric",
      "plugin": "Plugin",
      "theme": "Theme",
      "short_cut": "Shortcuts",
      "network": "Network",
      "backup": "Backup & Restore",
      "about": "About MusicFree"
    },
    "normal": {
      "check_update": "Check for updates on startup",
      "auto_load_more": "(Playlist Page) Automatically load more when scrolling to the bottom",
      "close_behavior": "When clicking exit button",
      "exit_app": "Exit App",
      "minimize": "Minimize to tray",
      "taskbar_thumb": "Taskbar thumbnail style (effective after restart)",
      "current_artwork": "Current song artwork",
      "main_window": "Main window interface",
      "max_history_length": "Maximum search history entries",
      "music_list_hide_columns": "Hide columns in song list",
      "languages": "Languages",
      "toast_switch_language_fail": "Switching language failed"
    },
    "play_music": {
      "case_sensitive_in_search": "Case-sensitive search in playlist",
      "default_play_quality": "Default playback quality",
      "when_quality_missing": "When playback quality is missing",
      "play_lower_quality_version": "Play lower quality version",
      "play_higher_quality_version": "Play higher quality version",
      "play_skip_quality_version": "Do not look for other quality versions",
      "when_play_error": "When playback error occurs",
      "pause": "Pause",
      "skip_to_next": "Automatically play next song",
      "double_click_music_list": "When double-clicking the music list",
      "add_music_to_playlist": "Add the selected song to the playback queue",
      "replace_playlist_with_musiclist": "Replace playback queue with current music list",
      "audio_output_device": "Audio output device",
      "when_device_removed": "When device is removed",
      "continue_playing": "Continue playing"
    },
    "download": {
      "download_folder": "Download Directory",
      "max_concurrency": "Maximum concurrent downloads",
      "default_download_quality": "Default download quality",
      "when_quality_missing": "When download quality is missing",
      "download_lower_quality_version": "Download lower quality version",
      "download_higher_quality_version": "Download higher quality version"
    },
    "lyric": {
      "enable_status_bar_lyric": "Enable status bar lyric",
      "enable_desktop_lyric": "Enable desktop lyric",
      "lock_desktop_lyric": "Lock desktop lyric",
      "font": "Font",
      "font_size": "Font Size",
      "font_color": "Font Color",
      "stroke_color": "Stroke Color"
    },
    "plugin": {
      "auto_update_plugin": "Automatically update plugins on startup",
      "not_check_plugin_version": "Do not check plugin version when installing"
    },
    "short_cut": {
      "enable_local": "Enable in-app shortcuts",
      "enable_global": "Enable global shortcuts",
      "ability": "Function",
      "local_short_cut": "App Shortcuts",
      "global_short_cut": "Global Shortcuts",
      "play/pause": "Play/Pause",
      "skip-next": "Play Next",
      "skip-previous": "Play Previous",
      "volume-up": "Volume Up",
      "volume-down": "Volume Down",
      "toggle-desktop-lyric": "Toggle Desktop Lyric",
      "like/dislike": "Like/Dislike Current Song",
      "no_short_cut": "None",
      "toggle-main-window-visible": "Show/Hide Main Window"
    },
    "network": {
      "host": "Host",
      "port": "Port",
      "username": "Username",
      "password": "Password",
      "local_cache": "Local Cache: {{cacheSize}}",
      "clear_cache": "Clear Cache",
      "enable_network_proxy": "Enable Network Proxy"
    },
    "backup": {
      "resume_mode_append": "Append to existing playlist",
      "resume_mode_overwrite": "Overwrite existing playlist",
      "backup_by_file": "File Backup",
      "musicfree_backup_file": "MusicFree Backup File",
      "backup_to": "Backup to...",
      "backup_by_webdav": "WebDAV Backup",
      "backup_success": "Backup Successful~",
      "backup_fail": "Backup Failed: {{reason}}",
      "resume_success": "Restore Successful~",
      "resume_fail": "Restore Failed: {{reason}}",
      "backup_music_sheet": "Backup Playlist",
      "resume_music_sheet": "Restore Playlist",
      "webdav_server_url": "URL",
      "username": "Username",
      "password": "Password",
      "webdav_data_not_complete": "URL, username, and password cannot be empty",
      "webdav_backup_file_not_exist": "Backup file does not exist"
    },
    "about": {
      "current_version": "Current Version: {{version}}",
      "already_latest": "Already up to date!",
      "check_update": "Check for Update",
      "software_author": "Software Author: ",
      "open_source_declaration": "Source Code: Software is open-source under AGPL3.0 license. <Github>Github Link</Github> <Gitee>Gitee Link</Gitee>",
      "official_site": "Official Website",
      "mobile_version": "Mobile Version"
    }
  },
  "main": {
    "previous_music": "Previous Song",
    "next_music": "Next Song",
    "close_desktop_lyric": "Close Desktop Lyrics",
    "open_desktop_lyric": "Open Desktop Lyrics",
    "unlock_desktop_lyric": "Unlock Desktop Lyrics",
    "lock_desktop_lyric": "Lock Desktop Lyrics",
    "no_playing_music": "No Music Playing"
  },
  "theme": {
    "tab_local": "Local Theme",
    "tab_remote": "Theme Marketplace",
    "download_and_use": "Download and Use",
    "use_theme": "Use Theme",
    "install_theme": "Install Theme",
    "update_theme": "Update Theme",
    "uninstall_theme": "Uninstall Theme",
    "musicfree_theme": "MusicFree Theme",
    "all_files": "All Files",
    "install_theme_success": "Successfully installed theme {{name}}~",
    "install_theme_fail": "Failed to install theme: {{reason}}",
    "uninstall_theme_success": "Successfully uninstalled theme {{name}}~",
    "uninstall_theme_fail": "Failed to uninstall theme: {{reason}}",
    "how_to_submit_new_theme": "💡How to submit a new theme: The themes in the theme marketplace are synchronized with the <Github>MusicFreeThemePacks</Github> repository. If you need to submit a new theme, please make a pull request directly.",
    "load_remote_theme_error": "An error occurred...",
    "invalid_theme": "Invalid theme: {{reason}}"
  }
}


================================================
FILE: res/lang/zh-CN.json
================================================
{
  "common": {
    "cancel": "取消",
    "confirm": "确认",
    "download": "下载",
    "downloading": "下载中",
    "downloaded": "已下载",
    "remove": "删除",
    "delete": "删除",
    "default": "默认",
    "version_code": "版本号",
    "operation": "操作",
    "update": "更新",
    "uninstall": "卸载",
    "install": "安装",
    "about": "关于",
    "exit": "退出",
    "edit": "编辑",
    "undo": "撤销",
    "redo": "恢复",
    "cut": "剪切",
    "copy": "复制",
    "paste": "粘贴",
    "select_all": "全选",
    "loading": "加载中",
    "create": "创建",
    "add": "添加",
    "save": "保存",
    "clear": "清空",
    "open": "打开",
    "status": "状态"
  },
  "media": {
    "unknown_title": "未命名",
    "unknown_artist": "未知作者",
    "unknown_album": "未知专辑",
    "default_favorite_sheet_name": "我喜欢",
    "playlist": "播放列表",
    "media_type_music": "音乐",
    "media_type_album": "专辑",
    "media_type_artist": "作者",
    "media_type_sheet": "歌单",
    "media_type_lyric": "歌词",
    "media_type_comment": "评论",
    "media_title": "标题",
    "media_platform": "来源",
    "media_duration": "时长",
    "media_create_at": "创建时间",
    "media_play_count": "播放数",
    "media_music_count": "歌曲数",
    "media_description": "简介",
    "music_state_pause": "暂停",
    "music_state_play": "播放",
    "music_state_play_or_pause": "播放/暂停",
    "music_quality_low": "低音质",
    "music_quality_standard": "标准音质",
    "music_quality_high": "高音质",
    "music_quality_super": "超高音质",
    "music_repeat_mode": "播放模式",
    "music_repeat_mode_loop": "单曲循环",
    "music_repeat_mode_queue": "列表循环",
    "music_repeat_mode_shuffle": "随机播放"
  },
  "plugin": {
    "prop_user_variable": "用户变量",
    "method_search": "搜索",
    "method_import_music_item": "导入单曲",
    "method_import_music_sheet": "导入歌单",
    "method_get_top_lists": "排行榜",
    "info_hint_you_have_no_plugin": "你还没有安装插件",
    "info_hint_you_have_no_plugin_with_supported_method": "你还没有安装支持<highlight> {{supportMethod}} </highlight>功能的插件",
    "info_hint_install_plugin_before_use": "先去<a>插件管理</a> 安装插件吧~"
  },
  "download_page": {
    "waiting": "等待中...",
    "failed": "下载失败"
  },
  "plugin_management_page": {
    "plugin_management": "插件管理",
    "choose_plugin": "选择插件",
    "install": "安装",
    "musicfree_plugin": "MusicFree插件",
    "install_successfully": "插件安装成功",
    "install_failed": "安装失败",
    "invalid_plugin": "无效插件",
    "install_from_local_file": "从本地文件安装",
    "install_from_network": "从网络安装",
    "install_plugin_from_network": "从网络安装插件",
    "installing": "正在安装",
    "info_hint_install_placeholder": "请输入插件源地址(链接以json或js结尾)",
    "error_hint_plugin_should_end_with_js_or_json": "插件链接需要以json或者js结尾",
    "info_hint_install_plugin": "插件需要满足 MusicFree 特定的插件协议,具体可在<a>官方网站</a>中查看",
    "subscription_setting": "订阅设置",
    "update_subscription": "更新订阅",
    "update_successfully": "更新成功",
    "no_subscription": "当前无订阅",
    "uninstall": "卸载",
    "uninstall_plugin": "卸载插件",
    "confirm_text_uninstall_plugin": "确认卸载插件 {{plugin}} 吗?",
    "uninstall_successfully": "已卸载 {{plugin}}",
    "uninstall_failed": "卸载失败",
    "toast_plugin_is_latest": "插件 {{plugin}} 已更新到最新版本",
    "update_failed": "更新失败",
    "update": "更新",
    "importing_media": "正在导入中",
    "placeholder_import_music_item": "输入 {{plugin}} 单曲链接",
    "import_failed": "导入失败",
    "placeholder_import_music_sheet": "输入 {{plugin}} 歌单链接"
  },
  "local_music_page": {
    "local_music": "本地音乐",
    "auto_scan": "自动扫描",
    "search_local_music": "搜索本地音乐",
    "list_view": "列表视图",
    "artist_view": "作者视图",
    "album_view": "专辑视图",
    "folder_view": "文件夹视图",
    "total_music_num": "共 {{number}} 首"
  },
  "music_list_context_menu": {
    "next_play": "下一首播放",
    "add_to_my_sheets": "添加到歌单",
    "remove_from_sheet": "从歌单内删除",
    "delete_local_download": "删除本地下载",
    "reveal_local_music_in_file_explorer": "打开歌曲所在文件夹",
    "reveal_local_music_in_file_explorer_fail": "打开失败: ",
    "delete_local_downloaded_songs_success": "已删除 {{musicNums}} 首本地歌曲",
    "delete_local_downloaded_song_success": "已删除本地歌曲 [{{songName}}]"
  },
  "search_result_page": {
    "search_result_title": "的搜索结果"
  },
  "side_bar": {
    "toplist": "排行榜",
    "recommend_sheets": "热门歌单",
    "download_management": "下载管理",
    "local_music": "本地音乐",
    "plugin_management": "插件管理",
    "my_sheets": "我的歌单",
    "create_local_sheet": "新建歌单",
    "starred_sheets": "我的收藏",
    "delete_sheet": "删除歌单",
    "rename_sheet": "重命名歌单",
    "unstar_sheet": "取消收藏",
    "recently_play": "最近播放"
  },
  "app_header": {
    "nav_back": "后退",
    "nav_forward": "前进",
    "search_placeholder": "在这里输入搜索内容",
    "search_history": "搜索历史",
    "settings": "设置",
    "minimize": "最小化",
    "minimode": "迷你模式",
    "exit": "退出",
    "theme": "主题"
  },
  "music_bar": {
    "open_music_detail_page": "打开歌曲详情页",
    "close_music_detail_page": "关闭歌曲详情页",
    "previous_music": "上一首",
    "next_music": "下一首",
    "mute": "静音",
    "unmute": "恢复音量",
    "playback_speed": "倍速播放",
    "choose_music_quality": "切换音质",
    "only_set_for_current_music": "仅设置当前歌曲",
    "desktop_lyric": "桌面歌词"
  },
  "music_detail": {
    "search_lyric": "搜索歌词",
    "no_lyric": "暂无歌词",
    "lyric_ctx_download_lyric": "下载歌词",
    "lyric_ctx_download_lyric_lrc": "下载歌词 (.lrc)",
    "lyric_ctx_download_lyric_txt": "下载歌词 (.txt)",
    "lyric_ctx_download_success": "下载成功",
    "lyric_ctx_download_fail": "下载失败",
    "lyric_ctx_set_font_size": "设置字号",
    "link_media_lyric": "关联歌词",
    "media_lyric_linked": "已关联歌词: ",
    "unlink_media_lyric": "取消关联歌词",
    "toast_media_lyric_unlinked": "已取消关联歌词",
    "translation": "翻译",
    "show_translation": "显示翻译",
    "hide_translation": "隐藏翻译"
  },
  "bottom_loading_state": {
    "reached_end": "~~~ 到底啦 ~~~",
    "loading": "加载中...",
    "load_more": "加载更多"
  },
  "empty": {
    "hint_empty": "什么都没有呀~~~"
  },
  "modal": {
    "add_to_my_sheets": "添加到歌单",
    "total_music_num": "共 {{number}} 首",
    "create_local_sheet": "新建歌单",
    "create_local_sheet_placeholder": "请输入新建歌单名称",
    "exit_confirm": "确认退出?",
    "plugin_subscription": "插件订阅",
    "subscription_remarks": "备注: ",
    "subscription_links": "链接: ",
    "subscription_save_success": "已保存订阅地址",
    "search_lyric": "搜索歌词",
    "search_lyric_result_empty": "搜索结果为空",
    "media_lyric_linked": "已关联歌词~",
    "media_lyric_link_failed": "关联歌词失败:",
    "new_version_found": "发现新版本",
    "latest_version": "最新版本: ",
    "current_version": "当前版本: ",
    "skip_this_version": "跳过此版本",
    "scan_local_music": "扫描本地音乐",
    "scan_local_music_hint": "将自动扫描勾选的文件夹 (文件增删实时同步)",
    "add_folder": "添加文件夹"
  },
  "panel": {
    "play_list_song_num": "播放列表 ({{number}}首)",
    "user_variable": "用户变量",
    "user_variable_setting_success": "设置成功~"
  },
  "music_sheet_like_view": {
    "play_all": "播放",
    "add_to_sheet": "添加",
    "star": "收藏"
  },
  "settings": {
    "choose_path": "选择路径",
    "change_path": "更改路径",
    "folder_not_exist": "文件夹不存在",
    "open_folder": "打开文件夹",
    "section_name": {
      "normal": "常规",
      "play_music": "播放",
      "download": "下载",
      "lyric": "歌词",
      "plugin": "插件",
      "theme": "主题",
      "short_cut": "快捷键",
      "network": "网络",
      "backup": "备份与恢复",
      "about": "关于 MusicFree"
    },
    "normal": {
      "check_update": "应用启动时检测软件版本更新",
      "auto_load_more": "(歌单页) 滑动到页面底部时自动加载更多",
      "close_behavior": "单击退出按钮时",
      "exit_app": "退出应用",
      "minimize": "最小化到托盘",
      "taskbar_thumb": "任务栏缩略图样式(重启应用后生效)",
      "current_artwork": "当前播放歌曲的封面",
      "main_window": "主窗口界面",
      "max_history_length": "搜索历史记录最多保存条数",
      "music_list_hide_columns": "歌曲列表隐藏列",
      "languages": "语言",
      "toast_switch_language_fail": "切换语言失败"
    },
    "play_music": {
      "case_sensitive_in_search": "歌单内搜索时区分大小写",
      "default_play_quality": "默认播放音质",
      "when_quality_missing": "播放音质缺失时",
      "play_lower_quality_version": "播放更低音质",
      "play_higher_quality_version": "播放更高音质",
      "play_skip_quality_version": "不寻找其他音质版本",
      "when_play_error": "播放失败时",
      "pause": "暂停播放",
      "skip_to_next": "自动播放下一首",
      "double_click_music_list": "双击音乐列表时",
      "add_music_to_playlist": "将目标单曲添加到播放队列",
      "replace_playlist_with_musiclist": "使用当前音乐列表替换播放队列",
      "audio_output_device": "音频输出设备",
      "when_device_removed": "音频设备移除时",
      "continue_playing": "继续播放"
    },
    "download": {
      "download_folder": "下载目录",
      "max_concurrency": "最多同时下载歌曲数",
      "default_download_quality": "默认下载音质",
      "when_quality_missing": "下载音质缺失时",
      "download_lower_quality_version": "下载更低音质",
      "download_higher_quality_version": "下载更高音质"
    },
    "lyric": {
      "enable_status_bar_lyric": "启用状态栏歌词",
      "enable_desktop_lyric": "启用桌面歌词",
      "lock_desktop_lyric": "锁定桌面歌词",
      "font": "字体",
      "font_size": "字体大小",
      "font_color": "字体颜色",
      "stroke_color": "描边颜色"
    },
    "plugin": {
      "auto_update_plugin": "打开软件时自动更新插件",
      "not_check_plugin_version": "安装插件时不校验版本"
    },
    "short_cut": {
      "enable_local": "启用软件内快捷键",
      "enable_global": "启用全局快捷键",
      "ability": "功能",
      "local_short_cut": "软件快捷键",
      "global_short_cut": "全局快捷键",
      "play/pause": "播放/暂停",
      "skip-next": "播放下一首",
      "skip-previous": "播放上一首",
      "volume-up": "增加音量",
      "volume-down": "降低音量",
      "toggle-desktop-lyric": "打开/关闭桌面歌词",
      "like/dislike": "喜欢/不喜欢当前歌曲",
      "no_short_cut": "空",
      "toggle-main-window-visible": "显示/隐藏主窗口"
    },
    "network": {
      "host": "主机",
      "port": "端口",
      "username": "账号",
      "password": "密码",
      "local_cache": "本地缓存:{{cacheSize}}",
      "clear_cache": "清空缓存",
      "enable_network_proxy": "启用网络代理"
    },
    "backup": {
      "resume_mode_append": "追加到已有歌单末尾",
      "resume_mode_overwrite": "覆盖已有歌单",
      "backup_by_file": "文件备份",
      "musicfree_backup_file": "MusicFree 备份文件",
      "backup_to": "备份到...",
      "backup_by_webdav": "WebDAV 备份",
      "backup_success": "备份成功~",
      "backup_fail": "备份失败:{{reason}}",
      "resume_success": "恢复成功~",
      "resume_fail": "恢复失败:{{reason}}",
      "backup_music_sheet": "备份歌单",
      "resume_music_sheet": "恢复歌单",
      "webdav_server_url": "URL",
      "username": "账号",
      "password": "密码",
      "webdav_data_not_complete": "URL、账号、密码不可为空",
      "webdav_backup_file_not_exist": "备份文件不存在"
    },
    "about": {
      "current_version": "当前版本: {{version}}",
      "already_latest": "当前已是最新版本!",
      "check_update": "检查更新",
      "software_author": "软件作者: ",
      "open_source_declaration": "源代码: 软件基于 AGPL3.0 协议开源.  <Github>Github地址</Github>  <Gitee>Gitee地址</Gitee>",
      "official_site": "软件官网",
      "mobile_version": "移动版"
    }
  },
  "main": {
    "previous_music": "上一首",
    "next_music": "下一首",
    "close_desktop_lyric": "关闭桌面歌词",
    "open_desktop_lyric": "开启桌面歌词",
    "unlock_desktop_lyric": "解锁桌面歌词",
    "lock_desktop_lyric": "锁定桌面歌词",
    "no_playing_music": "当前无正在播放的音乐"
  },
  "theme": {
    "tab_local": "本地主题",
    "tab_remote": "主题市场",
    "download_and_use": "下载并使用",
    "use_theme": "使用主题",
    "install_theme": "安装主题",
    "update_theme": "更新主题",
    "uninstall_theme": "卸载主题",
    "musicfree_theme": "MusicFree 主题",
    "all_files": "全部文件",
    "install_theme_success": "安装主题{{name}}成功~",
    "install_theme_fail": "安装主题失败: {{reason}}",
    "uninstall_theme_success": "卸载主题{{name}}成功~",
    "uninstall_theme_fail": "卸载主题失败: {{reason}}",
    "how_to_submit_new_theme": "💡如何提交新主题: 主题市场中的主题与 <Github>MusicFreeThemePacks</Github> 仓库同步,如果需要提交新主题请直接提PR。",
    "load_remote_theme_error": "出错啦...",
    "invalid_theme": "主题无效: {{reason}}"
  }
}

================================================
FILE: res/lang/zh-TW.json
================================================
{
  "common": {
    "cancel": "取消",
    "confirm": "確認",
    "download": "下載",
    "downloading": "下載中",
    "downloaded": "已下載",
    "remove": "移除",
    "delete": "刪除",
    "default": "預設",
    "version_code": "版本號",
    "operation": "操作",
    "update": "更新",
    "uninstall": "卸載",
    "install": "安裝",
    "about": "關於",
    "exit": "退出",
    "edit": "編輯",
    "undo": "撤銷",
    "redo": "重做",
    "cut": "剪下",
    "copy": "複製",
    "paste": "貼上",
    "select_all": "全選",
    "loading": "加載中",
    "create": "創建",
    "add": "新增",
    "save": "保存",
    "clear": "清除",
    "open": "打開",
    "status": "狀態"
  },

  "media": {
    "unknown_title": "無標題",
    "unknown_artist": "未知藝術家",
    "unknown_album": "未知專輯",

    "default_favorite_sheet_name": "喜愛",

    "playlist": "播放清單",

    "media_type_music": "音樂",
    "media_type_album": "專輯",
    "media_type_artist": "藝術家",
    "media_type_sheet": "歌單",
    "media_type_lyric": "歌詞",
    "media_type_comment": "評論",

    "media_title": "標題",
    "media_platform": "來源",
    "media_duration": "時長",
    "media_create_at": "創建時間",
    "media_play_count": "播放次數",
    "media_music_count": "歌曲數量",
    "media_description": "描述",

    "music_state_pause": "暫停",
    "music_state_play": "播放",
    "music_state_play_or_pause": "播放/暫停",
    "music_quality_low": "低音質",
    "music_quality_standard": "標準音質",
    "music_quality_high": "高音質",
    "music_quality_super": "超高音質",

    "music_repeat_mode": "重複模式",
    "music_repeat_mode_loop": "單曲重複",
    "music_repeat_mode_queue": "列表重複",
    "music_repeat_mode_shuffle": "隨機播放"
  },

  "plugin": {
    "prop_user_variable": "用戶變量",
    "method_search": "搜尋",
    "method_import_music_item": "導入歌曲",
    "method_import_music_sheet": "導入歌單",
    "method_get_top_lists": "排行榜",

    "info_hint_you_have_no_plugin": "你尚未安裝任何插件",
    "info_hint_you_have_no_plugin_with_supported_method": "你尚未安裝支持 <highlight>{{supportMethod}}</highlight> 的插件",
    "info_hint_install_plugin_before_use": "請先前往 <a>插件管理</a> 安裝插件~"
  },

  "download_page": {
    "waiting": "等待中...",
    "failed": "下載失敗"
  },
  "plugin_management_page": {
    "plugin_management": "插件管理",
    "choose_plugin": "選擇插件",
    "install": "安裝",
    "musicfree_plugin": "MusicFree 插件",
    "install_successfully": "插件安裝成功",
    "install_failed": "安裝失敗",
    "invalid_plugin": "無效的插件",
    "install_from_local_file": "從本地文件安裝",
    "install_from_network": "從網絡安裝",
    "install_plugin_from_network": "從網絡安裝插件",
    "installing": "安裝中",
    "info_hint_install_placeholder": "輸入插件來源 URL(以 json 或 js 結尾)",
    "error_hint_plugin_should_end_with_js_or_json": "插件 URL 應以 json 或 js 結尾",
    "info_hint_install_plugin": "插件需符合 MusicFree 特定協議,詳情請參考 <a>官方頁面</a>",
    "subscription_setting": "訂閱設定",
    "update_subscription": "更新訂閱",
    "update_successfully": "更新成功",
    "no_subscription": "當前沒有訂閱",

    "uninstall": "卸載",
    "uninstall_plugin": "卸載插件",
    "confirm_text_uninstall_plugin": "確認卸載插件 {{plugin}}?",
    "uninstall_successfully": "插件 {{plugin}} 已卸載",
    "uninstall_failed": "卸載失敗",

    "toast_plugin_is_latest": "插件 {{plugin}} 已是最新版本",
    "update_failed": "更新失敗",

    "update": "更新",

    "importing_media": "導入中",
    "placeholder_import_music_item": "輸入 {{plugin}} 歌曲 URL",
    "import_failed": "導入失敗",
    "placeholder_import_music_sheet": "輸入 {{plugin}} 歌單 URL"
  },
  "local_music_page": {
    "local_music": "本地音樂",
    "auto_scan": "自動掃描",
    "search_local_music": "搜尋本地音樂",
    "list_view": "列表視圖",
    "artist_view": "藝術家視圖",
    "album_view": "專輯視圖",
    "folder_view": "文件夾視圖",
    "total_music_num": "共 {{number}} 首歌曲"
  },

  "music_list_context_menu": {
    "next_play": "下一首播放",
    "add_to_my_sheets": "添加到我的歌單",
    "remove_from_sheet": "從歌單移除",
    "delete_local_download": "刪除本地下載",
    "reveal_local_music_in_file_explorer": "打開歌曲文件夾",
    "reveal_local_music_in_file_explorer_fail": "打開失敗:",

    "delete_local_downloaded_songs_success": "已刪除 {{musicNums}} 首本地歌曲",
    "delete_local_downloaded_song_success": "已刪除本地歌曲 [{{songName}}]"
  },

  "search_result_page": {
    "search_result_title": "搜尋結果"
  },
  "side_bar": {
    "toplist": "排行榜",
    "recommend_sheets": "推薦歌單",
    "download_management": "下載管理",
    "local_music": "本地音樂",
    "plugin_management": "插件管理",

    "my_sheets": "我的歌單",
    "create_local_sheet": "創建歌單",
    "starred_sheets": "我的收藏",

    "delete_sheet": "刪除歌單",
    "rename_sheet": "重歌單",
    "unstar_sheet": "取消收藏",
    "recently_play": "最近播放"
  },
  "app_header": {
    "nav_back": "返回",
    "nav_forward": "前進",
    "search_placeholder": "在這裡輸入搜尋",
    "search_history": "搜尋歷史",
    "settings": "設置",
    "minimize": "最小化",
    "minimode": "迷你模式",
    "exit": "退出",
    "theme": "主題"
  },
  "music_bar": {
    "open_music_detail_page": "打開歌曲詳情",
    "close_music_detail_page": "關閉歌曲詳情",
    "previous_music": "上一首",
    "next_music": "下一首",
    "mute": "靜音",
    "unmute": "取消靜音",
    "playback_speed": "播放速度",
    "choose_music_quality": "選擇音樂音質",
    "only_set_for_current_music": "僅針對當前歌曲",
    "desktop_lyric": "桌面歌詞"
  },
  "music_detail": {
    "search_lyric": "搜尋歌詞",
    "no_lyric": "暫無歌詞",

    "lyric_ctx_download_lyric": "下載歌詞",
    "lyric_ctx_download_lyric_lrc": "下載歌詞 (.lrc)",
    "lyric_ctx_download_lyric_txt": "下載歌詞 (.txt)",
    "lyric_ctx_download_success": "下載成功",
    "lyric_ctx_download_fail": "下載失敗",
    "lyric_ctx_set_font_size": "設置字體大小",

    "link_media_lyric": "鏈接歌詞",
    "media_lyric_linked": "已鏈接歌詞:",
    "unlink_media_lyric": "取消鏈接歌詞",
    "toast_media_lyric_unlinked": "已取消鏈接歌詞",
    "translation": "翻譯",
    "show_translation": "顯示翻譯",
    "hide_translation": "隱藏翻譯"
  },
  "bottom_loading_state": {
    "reached_end": "~~~ 沒有更多了 ~~~",
    "loading": "加載中...",
    "load_more": "加載更多"
  },
  "empty": {
    "hint_empty": "這裡什麼都沒有~~~"
  },
  "modal": {
    "add_to_my_sheets": "添加到我的歌單",
    "total_music_num": "共 {{number}} 首歌曲",
    "create_local_sheet": "創建歌單",
    "create_local_sheet_placeholder": "請輸入新的歌單名稱",
    "exit_confirm": "確認退出?",
    "plugin_subscription": "插件訂閱",
    "subscription_remarks": "備註:",
    "subscription_links": "鏈接:",
    "subscription_save_success": "訂閱地址已保存",
    "search_lyric": "搜尋歌詞",
    "search_lyric_result_empty": "未找到相關結果",
    "media_lyric_linked": "歌詞已鏈接~",
    "media_lyric_link_failed": "鏈接歌詞失敗:",
    "new_version_found": "發現新版本",
    "latest_version": "最新版本:",
    "current_version": "當前版本:",
    "skip_this_version": "跳過此版本",
    "scan_local_music": "掃描本地音樂",
    "scan_local_music_hint": "將自動掃描選擇的文件夾(實時同步)",
    "add_folder": "添加文件夾"
  },
  "panel": {
    "play_list_song_num": "播放清單({{number}} 首歌曲)",
    "user_variable": "用戶變量",
    "user_variable_setting_success": "設置成功~"
  },
  "music_sheet_like_view": {
    "play_all": "播放全部",
    "add_to_sheet": "添加到歌單",
    "star": "收藏"
  },
  "settings": {
    "choose_path": "選擇路徑",
    "change_path": "更改路徑",
    "folder_not_exist": "文件夾不存在",
    "open_folder": "打開文件夾",

    "section_name": {
      "normal": "一般",
      "play_music": "播放",
      "download": "下載",
      "lyric": "歌詞",
      "plugin": "插件",
      "theme": "主題",
      "short_cut": "快捷鍵",
      "network": "網絡",
      "backup": "備份與恢復",
      "about": "關於 MusicFree"
    },
    "normal": {
      "check_update": "啟動應用時檢查更新",
      "auto_load_more": "(歌單頁) 滑動到頁面底部時自動加載更多",
      "close_behavior": "點擊退出按鈕時",
      "exit_app": "退出應用",
      "minimize": "最小化到系統托盤",
      "taskbar_thumb": "任務欄縮略圖樣式(重啟應用後生效)",
      "current_artwork": "當前歌曲封面",
      "main_window": "主窗口界面",
      "max_history_length": "搜尋歷史記錄最大數量",
      "music_list_hide_columns": "歌曲列表隱藏列",
      "languages": "語言",
      "toast_switch_language_fail": "切換語言失敗"
    },
    "play_music": {
      "case_sensitive_in_search": "搜尋歌單時區分大小寫",
      "default_play_quality": "預設播放音質",
      "when_quality_missing": "當播放音質缺失時",
      "play_lower_quality_version": "播放低音質版本",
      "play_higher_quality_version": "播放高音質版本",
      "play_skip_quality_version": "不尋找其他音質版本",
      "when_play_error": "播放錯誤時",
      "pause": "暫停",
      "skip_to_next": "跳至下一首",
      "double_click_music_list": "雙擊歌曲列表時",
      "add_music_to_playlist": "添加歌曲到播放清單",
      "replace_playlist_with_musiclist": "用當前歌單替換播放清單",
      "audio_output_device": "音頻輸出設備",
      "when_device_removed": "當音頻裝置被移除時",
      "continue_playing": "繼續播放"
    },
    "download": {
      "download_folder": "下載文件夾",
      "max_concurrency": "最大同時下載數量",
      "default_download_quality": "預設下載音質",
      "when_quality_missing": "當下載音質缺失時",
      "download_lower_quality_version": "下載低音質版本",
      "download_higher_quality_version": "下載高音質版本"
    },
    "lyric": {
      "enable_status_bar_lyric": "啟用狀態欄歌詞",
      "enable_desktop_lyric": "啟用桌面歌詞",
      "lock_desktop_lyric": "鎖定桌面歌詞",
      "font": "字體",
      "font_size": "字體大小",
      "font_color": "字體顏色",
      "stroke_color": "描邊顏色"
    },
    "plugin": {
      "auto_update_plugin": "啟動應用時自動更新插件",
      "not_check_plugin_version": "安裝插件時不檢查版本"
    },
    "short_cut": {
      "enable_local": "啟用應用內快捷鍵",
      "enable_global": "啟用全局快捷鍵",
      "ability": "功能",
      "local_short_cut": "應用內快捷鍵",
      "global_short_cut": "全局快捷鍵",
      "play/pause": "播放/暫停",
      "skip-next": "下一首",
      "skip-previous": "上一首",
      "volume-up": "音量增加",
      "volume-down": "音量減少",
      "toggle-desktop-lyric": "開啟/關閉桌面歌詞",
      "like/dislike": "喜歡/不喜歡當前歌曲",
      "no_short_cut": "無",
      "toggle-main-window-visible": "顯示/隱藏主窗口"
    },
    "network": {
      "host": "主機",
      "port": "端口",
      "username": "用戶名",
      "password": "密碼",
      "local_cache": "本地緩存:{{cacheSize}}",
      "clear_cache": "清除緩存",
      "enable_network_proxy": "啟用網絡代理"
    },
    "backup": {
      "resume_mode_append": "附加到現有清單後",
      "resume_mode_overwrite": "覆蓋現有清單",
      "backup_by_file": "通過文件備份",
      "musicfree_backup_file": "MusicFree 備份文件",
      "backup_to": "備份到...",
      "backup_by_webdav": "WebDAV 備份",
      "backup_success": "備份成功~",
      "backup_fail": "備份失敗:{{reason}}",
      "resume_success": "恢復成功~",
      "resume_fail": "恢復失敗:{{reason}}",
      "backup_music_sheet": "備份歌單",
      "resume_music_sheet": "恢復歌單",
      "webdav_server_url": "URL",
      "username": "用戶名",
      "password": "密碼",
      "webdav_data_not_complete": "URL、用戶名和密碼不能為空",
      "webdav_backup_file_not_exist": "備份文件不存在"
    },
    "about": {
      "current_version": "當前版本:{{version}}",
      "already_latest": "已是最新版本!",
      "check_update": "檢查更新",
      "software_author": "軟件作者:",
      "open_source_declaration": "源碼:軟件是基於 AGPL3.0 授權的開源軟件。<Github>Github 地址</Github> <Gitee>Gitee 地址</Gitee>",
      "official_site": "官方網站",
      "mobile_version": "移動版"
    }
  },
  "main": {
    "previous_music": "上一首歌曲",
    "next_music": "下一首歌曲",
    "close_desktop_lyric": "關閉桌面歌詞",
    "open_desktop_lyric": "開啟桌面歌詞",
    "unlock_desktop_lyric": "解鎖桌面歌詞",
    "lock_desktop_lyric": "鎖定桌面歌詞",
    "no_playing_music": "目前無正在播放的音樂"
  },
  "theme": {
    "tab_local": "本地主題",
    "tab_remote": "主題市場",
    "download_and_use": "下載並使用",
    "use_theme": "使用主題",
    "install_theme": "安裝主題",
    "update_theme": "更新主題",
    "uninstall_theme": "卸載主題",
    "musicfree_theme": "MusicFree 主題",
    "all_files": "全部檔案",
    "install_theme_success": "安裝主題{{name}}成功~",
    "install_theme_fail": "安裝主題失敗: {{reason}}",
    "uninstall_theme_success": "卸載主題{{name}}成功~",
    "uninstall_theme_fail": "卸載主題失敗: {{reason}}",
    "how_to_submit_new_theme": "💡如何提交新主題: 主題市場中的主題與 <Github>MusicFreeThemePacks</Github> 倉庫同步,如果需要提交新主題請直接提PR。",
    "load_remote_theme_error": "出錯啦...",
    "invalid_theme": "主題無效: {{reason}}"
  }
}


================================================
FILE: scripts/feishu-upload.js
================================================
const fs = require('fs');
const path = require('path');
const { Readable } = require('stream');
const { Client } = require('@larksuiteoapi/node-sdk');

/**
 * 飞书云空间文件上传工具
 * 支持小文件直接上传和大文件分片上传
 * 包含重试机制和错误处理
 */
class FeishuFileUploader {
    constructor(appId, appSecret, tenantAccessToken = null) {
        this.client = new Client({
            appId: appId,
            appSecret: appSecret,
            disableTokenCache: true
        });
        this.appId = appId;
        this.appSecret = appSecret;
        this.tenantAccessToken = tenantAccessToken;
        this.tokenExpireTime = null;
        this.maxRetries = 5; // 最大重试次数
        this.retryDelay = 1000; // 重试延迟(毫秒)
        this.maxFileSize = 20 * 1024 * 1024; // 20MB - 小文件直接上传的阈值
        this.chunkSize = 4 * 1024 * 1024; // 4MB - 分片大小
    }

    /**
     * 获取tenant_access_token
     */
    async getTenantAccessToken() {
        // 如果token存在且未过期(剩余时间超过5分钟),直接返回
        if (this.tenantAccessToken && this.tokenExpireTime) {
            const now = Date.now();
            const remainingTime = this.tokenExpireTime - now;
            if (remainingTime > 5 * 60 * 1000) { // 5分钟
                return this.tenantAccessToken;
            }
        }

        console.log('正在获取 tenant_access_token...');

        try {
            const response = await fetch('https://open.feishu.cn/open-apis/auth/v3/tenant_access_token/internal', {
                method: 'POST',
                headers: {
                    'Content-Type': 'application/json; charset=utf-8'
                },
                body: JSON.stringify({
                    app_id: this.appId,
                    app_secret: this.appSecret
                })
            });

            const data = await response.json();

            if (data.code !== 0) {
                throw new Error(`获取 tenant_access_token 失败: ${data.msg}`);
            }

            this.tenantAccessToken = data.tenant_access_token;
            this.tokenExpireTime = Date.now() + (data.expire * 1000);

            console.log('tenant_access_token 获取成功');
            return this.tenantAccessToken;

        } catch (error) {
            console.error('获取 tenant_access_token 失败:', error.message);
            throw error;
        }
    }    /**
     * 计算Adler-32校验和
     */
    calculateAdler32(buffer) {
        const MOD = 65521;
        let s1 = 1;  // 初始低位累加和
        let s2 = 0;  // 初始高位累加和

        // 遍历缓冲区中的每个字节
        for (let i = 0; i < buffer.length; i++) {
            // 获取无符号字节值 (0-255)
            const byte = buffer[i];

            // 更新累加值,使用模数防止溢出
            s1 = (s1 + byte) % MOD;
            s2 = (s2 + s1) % MOD;
        }

        // 组合结果: (s2 << 16) | s1
        const combinedValue = (s2 << 16) | s1;

        // 确保结果是32位无符号整数
        // 注意:JavaScript 的位操作符返回的是32位有符号整数,所以需要转换
        const result = combinedValue >>> 0;

        // 返回十进制格式的字符串
        return result.toString(10);
    }

    /**
     * 延迟函数
     */
    delay(ms) {
        return new Promise(resolve => setTimeout(resolve, ms));
    }

    /**
     * 重试包装器
     */
    async withRetry(operation, operationName) {
        let lastError;

        for (let attempt = 1; attempt <= this.maxRetries; attempt++) {
            try {
                return await operation();
            } catch (error) {
                lastError = error;

                // 检查是否是可重试的错误
                const isRetryableError = this.isRetryableError(error);

                if (!isRetryableError || attempt === this.maxRetries) {
                    console.error(`${operationName} 失败 (尝试 ${attempt}/${this.maxRetries}):`, error.message);
                    throw error;
                }

                const delayTime = this.retryDelay * Math.pow(2, attempt - 1); // 指数退避
                console.log(`${operationName} 失败 (尝试 ${attempt}/${this.maxRetries}), ${delayTime}ms 后重试...`);
                await this.delay(delayTime);
            }
        }

        throw lastError;
    }

    /**
     * 判断是否为可重试的错误
     */
    isRetryableError(error) {
        if (error.response && error.response.data) {
            const code = error.response.data.code;
            // 1061045: 频率限制错误,可重试
            // 1061001: 内部错误,可重试
            // 1064230: 数据迁移中,可重试
            return [1061045, 1061001, 1064230].includes(code);
        }

        // 网络错误等也可以重试
        return error.code === 'ECONNRESET' ||
            error.code === 'ETIMEDOUT' ||
            error.code === 'ENOTFOUND';
    }    /**
     * 直接上传小文件
     */
    async uploadSmallFile(filePath, fileName, parentNode) {
        const fileBuffer = fs.readFileSync(filePath);
        const token = await this.getTenantAccessToken();

        return await this.withRetry(async () => {
            const response = await this.client.drive.v1.file.upload({
                data: {
                    file_name: fileName,
                    parent_type: 'explorer',
                    parent_node: parentNode,
                    size: fileBuffer.length,
                    file: fileBuffer
                }
            }, {
                headers: {
                    'Authorization': `Bearer ${token}`
                }
            });

            return response.data;
        }, '小文件上传');
    }    /**
     * 分片上传预处理
     */
    async uploadPrepare(fileName, parentNode, fileSize) {
        const token = await this.getTenantAccessToken();

        return await this.withRetry(async () => {
            const response = await this.client.drive.v1.file.uploadPrepare({
                data: {
                    file_name: fileName,
                    parent_type: 'explorer',
                    parent_node: parentNode,
                    size: fileSize
                }
            }, {
                headers: {
                    'Authorization': `Bearer ${token}`
                }
            });

            return response.data;
        }, '预上传');
    }/**
     * 上传单个分片
     */
    async uploadPart(uploadId, seq, chunkBuffer) {
        const checksum = this.calculateAdler32(chunkBuffer);
        const token = await this.getTenantAccessToken();

        // 创建一个真正的可读流
        const chunkStream = new Readable({
            read() { }
        });
        chunkStream.push(chunkBuffer);
        chunkStream.push(null); // 标记流结束        
        return await this.withRetry(async () => {
            const response = await this.client.drive.v1.file.uploadPart({
                data: {
                    upload_id: uploadId,
                    seq: seq,
                    size: chunkBuffer.length,
                    checksum: checksum,
                    file: chunkStream
                }
            }, {
                headers: {
                    'Authorization': `Bearer ${token}`
                }
            });

            return response?.data;
        }, `分片上传 (${seq})`);
    }

    /**
     * 完成分片上传
     */
    async uploadFinish(uploadId, blockNum) {
        const token = await this.getTenantAccessToken();

        return await this.withRetry(async () => {
            const response = await this.client.drive.v1.file.uploadFinish({
                data: {
                    upload_id: uploadId,
                    block_num: blockNum
                }
            }, {
                headers: {
                    'Authorization': `Bearer ${token}`
                }
            });

            return response.data;
        }, '完成上传');
    }

    /**
     * 分片上传大文件
     */
    async uploadLargeFile(filePath, fileName, parentNode) {
        const fileStats = fs.statSync(filePath);
        const fileSize = fileStats.size;

        console.log(`开始分片上传文件: ${fileName} (${fileSize} bytes)`);

        // 1. 预上传
        const prepareResult = await this.uploadPrepare(fileName, parentNode, fileSize);
        const { upload_id, block_size, block_num } = prepareResult;

        console.log(`预上传成功, upload_id: ${upload_id}, 分片数量: ${block_num}`);

        // 2. 分片上传
        const fileHandle = fs.openSync(filePath, 'r');
        try {
            for (let i = 0; i < block_num; i++) {
                const start = i * block_size;
                const end = Math.min(start + block_size, fileSize);
                const chunkSize = end - start;

                const chunkBuffer = Buffer.alloc(chunkSize);
                fs.readSync(fileHandle, chunkBuffer, 0, chunkSize, start);

                console.log(`上传分片 ${i + 1}/${block_num} (${chunkSize} bytes)`);
                await this.uploadPart(upload_id, i, chunkBuffer);

                // 避免频率限制,分片之间稍微延迟
                if (i < block_num - 1) {
                    await this.delay(200);
                }
            }
        } finally {
            fs.closeSync(fileHandle);
        }

        // 3. 完成上传
        console.log('完成分片上传...');
        const finishResult = await this.uploadFinish(upload_id, block_num);

        return finishResult;
    }

    /**
     * 主上传函数 - 自动选择上传方式
     */
    async uploadFile(filePath, fileName, parentNode) {
        if (!fs.existsSync(filePath)) {
            throw new Error(`文件不存在: ${filePath}`);
        }

        const fileStats = fs.statSync(filePath);
        const fileSize = fileStats.size;

        console.log(`准备上传文件: ${fileName}`);
        console.log(`文件大小: ${fileSize} bytes`);
        console.log(`目标文件夹: ${parentNode}`);

        try {
            let result;

            if (fileSize <= this.maxFileSize) {
                console.log('使用直接上传方式');
                result = await this.uploadSmallFile(filePath, fileName, parentNode);
            } else {
                console.log('使用分片上传方式');
                result = await this.uploadLargeFile(filePath, fileName, parentNode);
            }

            console.log('文件上传成功!');
            return result;

        } catch (error) {
            console.error('文件上传失败:', error.message);
            if (error.response && error.response.data) {
                console.error('错误详情:', error.response.data);
            }
            throw error;
        }
    }
}

/**
 * 主函数 - 从环境变量和命令行参数获取配置
 */
async function main() {
    try {
        // 从环境变量获取配置
        const appId = process.env.FEISHU_APP_ID;
        const appSecret = process.env.FEISHU_APP_SECRET;
        const parentNode = process.env.FEISHU_PARENT_NODE;

        // 从命令行参数获取文件路径和文件名
        const args = process.argv.slice(2);
        if (args.length < 1) {
            console.error('用法: node feishu-upload.js <文件路径> [上传文件名]');
            console.error('');
            console.error('环境变量:');
            console.error('  FEISHU_APP_ID         - 飞书应用ID');
            console.error('  FEISHU_APP_SECRET     - 飞书应用密钥');
            console.error('  FEISHU_PARENT_NODE    - 云空间文件夹token');
            process.exit(1);
        }

        const filePath = path.resolve(args[0]);
        const fileName = args[1] || path.basename(filePath);

        // 验证环境变量
        if (!appId || !appSecret || !parentNode) {
            console.error('错误: 缺少必要的环境变量');
            console.error('请设置: FEISHU_APP_ID, FEISHU_APP_SECRET, FEISHU_PARENT_NODE');
            process.exit(1);
        }

        // 创建上传器实例
        const uploader = new FeishuFileUploader(appId, appSecret);

        // 执行上传
        const result = await uploader.uploadFile(filePath, fileName, parentNode);

        console.log('上传结果:', result);

        if (result.file_token) {
            console.log(`文件上传成功! file_token: ${result.file_token}`);
        }

    } catch (error) {
        console.error('上传失败:', error.message);
        process.exit(1);
    }
}

// 如果直接运行此脚本,则执行主函数
if (require.main === module) {
    main();
}

// 导出类以供其他模块使用
module.exports = { FeishuFileUploader };


================================================
FILE: src/common/async-memoize.ts
================================================

export default function asyncMemoize<R, T extends (...args: any[]) => Promise<R>>(callback: T): T{
    let val: R;

    return (async (...args: any[]) => {
        if(!val) {
            val = await callback(...args);
        }

        return val;
    }) as T;
}


================================================
FILE: src/common/camel-to-snake.ts
================================================
export default function camelToSnake(camelCaseStr: string): string {
    return camelCaseStr.replace(/([A-Z])/g, "_$1").toLowerCase(); // 将整个字符串转换为小写
}


================================================
FILE: src/common/constant.ts
================================================
import { IAppConfig } from "@/types/app-config";
import { ICommand } from "@shared/message-bus/type";

export const internalDataKey = "$";
export const internalDataSymbol = Symbol.for("internal");
// 加入播放列表/歌单的时间
export const timeStampSymbol = Symbol.for("time-stamp");
// 加入播放列表的辅助顺序
export const sortIndexSymbol = Symbol.for("sort-index");
/**
 * 歌曲引用次数
 * TODO: 没必要算引用 如果真有需要直接取异或就可以了
 */
export const musicRefSymbol = "$$ref";

/** 本地存储路径 */
export const localFilePathSymbol = Symbol.for("local-file-path");
export const localPluginName = "本地";
export const localPluginHash = "本地";

export const supportedMediaType = [
    "music",
    "album",
    "artist",
    "sheet",
] as const;

export const rem = 13;

export enum RequestStateCode {
    /** 空闲 */
    IDLE = 0b00000000,
    PENDING_FIRST_PAGE = 0b00000010,
    // eslint-disable-next-line @typescript-eslint/no-duplicate-enum-values
    LOADING = 0b00000010,
    /** 检索中 */
    PENDING_REST_PAGE = 0b00000011,
    /** 部分结束 */
    PARTLY_DONE = 0b00000100,
    /** 全部结束 */
    FINISHED = 0b0001000,
    /** 出错了 */
    ERROR = 0b10000000,
}

/** 音质列表 */
export const qualityKeys: IMusic.IQualityKey[] = [
    "low",
    "standard",
    "high",
    "super",
];

export const supportLocalMediaType = [
    ".mp3",
    ".mp4",
    ".m4s",
    ".flac",
    ".wma",
    ".wav",
    ".m4a",
    ".ogg",
    ".acc",
    ".aac",
    // ".ape",
    ".opus",
];

export const toastDuration = {
    short: 1000,
    long: 2500,
};

export const defaultFont = {
    fullName: "默认",
    family: "",
    postscriptName: "",
    style: "",
};

type IShortCutKeys = keyof IAppConfig["shortCut.shortcuts"];
export const shortCutKeys: IShortCutKeys[] = [
    "play/pause",
    "skip-next",
    "skip-previous",
    "volume-up",
    "volume-down",
    "toggle-desktop-lyric",
    "like/dislike",
    "toggle-main-window-visible",
];

// 快捷键列表对应的指令
export const shortCutKeysCommands: Record<IShortCutKeys, keyof ICommand> =
{
    "play/pause": "TogglePlayerState",
    "skip-next": "SkipToNext",
    "skip-previous": "SkipToPrevious",
    "volume-down": "VolumeDown",
    "volume-up": "VolumeUp",
    "toggle-desktop-lyric": "ToggleDesktopLyric",
    "like/dislike": "ToggleFavorite",
    "toggle-main-window-visible": "ToggleMainWindowVisible",
};

// 主进程的Resource
export enum ResourceName {
    SKIP_LEFT_ICON = "skip-left.png",
    SKIP_RIGHT_ICON = "skip-right.png",
    PAUSE_ICON = "pause.png",
    PLAY_ICON = "play.png",
    DEFAULT_ALBUM_COVER_IMAGE = "album-cover.jpeg",
    LOGO_IMAGE = "logo.png",

}

/** 下载状态 */
export enum DownloadState {
    /** 空闲状态 */
    NONE = "NONE",
    /** 排队等待中 */
    WAITING = "WAITING",
    /** 下载中 */
    DOWNLOADING = "DOWNLOADING",
    /** 失败 */
    ERROR = "ERROR",
    /** 下载完成 */
    DONE = "DONE",
}

// 主题更新链接
export const themePackStoreBaseUrl = [
    "https://raw.githubusercontent.com/maotoumao/MusicFreeThemePacks/master/", //github
    "https://cdn.jsdelivr.net/gh/maotoumao/MusicFreeThemePacks@master/",
    "https://dev.azure.com/maotoumao/MusicFree/_apis/git/repositories/MusicFreeThemePacks/items?scopePath=/.publish/publish.json&api-version=6.0", // azure
];

export const appUpdateSources = [
    "https://gitee.com/maotoumao/MusicFreeDesktop/raw/master/release/version.json",
    "https://raw.githubusercontent.com/maotoumao/MusicFreeDesktop/master/release/version.json",
    "https://cdn.jsdelivr.net/gh/maotoumao/MusicFreeDesktop@master/release/version.json",
];

export enum TrackPlayerSyncType {
    SyncPlayerState = "SyncPlayerState",
    MusicChanged = "MusicChanged",
    PlayerStateChanged = "PlayerStateChanged",
    RepeatModeChanged = "RepeatModeChanged",
    LyricChanged = "LyricChanged",
    CurrentLyricChanged = "CurrentLyricChanged",
    ProgressChanged = "ProgressChanged",
}

/** 播放器状态 */
export enum PlayerState {
    /** 无音频 */
    None,
    /** 播放中 */
    Playing,
    /** 暂停 */
    Paused,
    /** 缓冲中 */
    Buffering,
}

/** 播放模式 */
export enum RepeatMode {
    /** 随机 */
    Shuffle = "shuffle",
    /** 播放队列 */
    Queue = "queue-repeat",
    /** 单曲循环 */
    Loop = "loop",
}


/** 窗口类型 */
export enum WindowType {
    MAIN = "MAIN",
    LYRIC = "LYRIC",
    MINIMODE = "MINIMODE",
}

export enum WindowRole {
    MAIN = "MAIN",
    SLAVE = "SLAVE",
}

export const CommonConst = {
    /** 新建歌单名称长度限制 */
    NEW_SHEET_NAME_LENGTH_LIMIT: 120,
};


================================================
FILE: src/common/debounce.ts
================================================
import debounce from "lodash.debounce";

export default function (
    ...args: Parameters<typeof debounce>
): ReturnType<typeof debounce> {
    const [
        func,
        wait = 500,
        options = {
            leading: true,
            trailing: false,
        },
    ] = args;

    return debounce(func, wait, options);
}


================================================
FILE: src/common/event-wrapper.ts
================================================
import EventEmitter from "eventemitter3";
import { useEffect } from "react";

class EventWrapper<EventTypes> {
    private ee: EventEmitter;

    constructor() {
        this.ee = new EventEmitter();
    }

    /**
   * 监听
   * @param eventName 事件名
   * @param callBack 回调
   */
    on<T extends EventTypes, K extends keyof T & (string | symbol)>(
        eventName: K,
        callBack: (payload: T[K]) => void,
    ) {
        this.ee.on(eventName, callBack);
    }

    once<T extends EventTypes, K extends keyof T & (string | symbol)>(
        eventName: K,
        callBack: (payload: T[K]) => void,
    ) {
        this.ee.once(eventName, callBack);
    }

    emit<T extends EventTypes, K extends keyof T & (string | symbol)>(
        eventName: K,
        payload?: T[K],
    ) {
        this.ee.emit(eventName, payload);
    }

    off<T extends EventTypes, K extends keyof T & (string | symbol)>(
        eventName: K,
        callBack: (payload: T[K]) => void,
    ) {
        this.ee.off(eventName, callBack);
    }

    use<T extends EventTypes, K extends keyof T & (string | symbol)>(
        eventName: K,
        callBack: (payload: T[K]) => void,
    ) {
        useEffect(() => {
            this.ee.on(eventName, callBack);
            return () => {
                this.ee.off(eventName, callBack);
            };
        }, []);
    }
}

export default EventWrapper;


================================================
FILE: src/common/file-util.ts
================================================
import { ICommonTagsResult, IPicture, parseFile } from "music-metadata";
import path from "path";
import { localPluginName, supportLocalMediaType } from "./constant";
import CryptoJS from "crypto-js";
import fs from "fs/promises";
import url from "url";
import type { BigIntStats, PathLike, StatOptions, Stats } from "original-fs";

function getB64Picture(picture: IPicture) {
    return `data:${picture.format};base64,${picture.data.toString("base64")}`;
}

const specialEncoding = ["GB2312"];

export async function parseLocalMusicItem(
    filePath: string,
): Promise<IMusic.IMusicItem> {
    const hash = CryptoJS.MD5(filePath).toString();
    try {
        const { common = {} as ICommonTagsResult } = await parseFile(filePath);

        const jschardet = await import("jschardet");

        // 检测编码
        let encoding: string | null = null;
        let conf = 0;
        const testItems = [common.title, common.artist, common.album];

        for (const testItem of testItems) {
            if (!testItem) {
                continue;
            }
            const testResult = jschardet.detect(testItem, {
                minimumThreshold: 0.4,
            });
            if (testResult.confidence > conf) {
                conf = testResult.confidence;
                encoding = testResult.encoding;
            }

            if (conf > 0.9) {
                break;
            }
        }

        if (specialEncoding.includes(encoding)) {
            const iconv = await import("iconv-lite");

            if (common.title) {
                common.title = iconv.decode(
                    common.title as unknown as Buffer,
                    encoding,
                );
            }
            if (common.artist) {
                common.artist = iconv.decode(
                    common.artist as unknown as Buffer,
                    encoding,
                );
            }
            if (common.artist) {
                common.album = iconv.decode(
                    common.album as unknown as Buffer,
                    encoding,
                );
            }
            if (common.lyrics) {
                common.lyrics = common.lyrics.map((it) =>
                    it ? iconv.decode(it as unknown as Buffer, encoding) : "",
                );
            }
        }

        return {
            title: common.title ?? path.parse(filePath).name,
            artist: common.artist ?? "未知作者",
            artwork: common.picture?.[0]
                ? getB64Picture(common.picture[0])
                : undefined,
            album: common.album ?? "未知专辑",
            url: addFileScheme(filePath),
            localPath: filePath,
            platform: localPluginName,
            id: hash,
            rawLrc: common.lyrics?.join(""),
        };
    } catch (e) {
        return {
            title: path.parse(filePath).name || filePath,
            id: hash,
            platform: localPluginName,
            localPath: filePath,
            url: addFileScheme(filePath),
            artist: "未知作者",
            album: "未知专辑",
        };
    }
}

export async function parseLocalMusicItemFolder(
    folderPath: string,
): Promise<IMusic.IMusicItem[]> {
    /**
   * 1. 筛选出符合条件的
   */

    try {
        const folderStat = await fs.stat(folderPath);
        if (folderStat.isDirectory()) {
            const files = await fs.readdir(folderPath);
            const validFiles = files.filter((fp) =>
                supportLocalMediaType.some((postfix) => fp.endsWith(postfix)),
            );
            // TODO: 分片
            return Promise.all(
                validFiles.map((fp) =>
                    parseLocalMusicItem(path.resolve(folderPath, fp)),
                ),
            );
        }
        throw new Error("Folder Not Found");
    } catch {
        return [];
    }
}

export function addFileScheme(filePath: string) {
    return filePath.startsWith("file:")
        ? filePath
        : url.pathToFileURL(filePath).toString();
}

export function addTailSlash(filePath: string) {
    return filePath.endsWith("/") || filePath.endsWith("\\")
        ? filePath
        : filePath + "/";
}

export async function safeStat(
    path: PathLike,
    opts?: StatOptions,
): Promise<Stats | BigIntStats | null> {
    try {
        return await fs.stat(path, opts);
    } catch {
        return null;
    }
}


================================================
FILE: src/common/get-resource-path.ts
================================================
/**
 * 只在主进程中使用 获取资源文件的绝对路径
 * @param resourceName 资源文件名
 * @return 资源文件的绝对路径
 */

import { app } from "electron";
import path from "path";

const resPath = app.isPackaged
    ? path.resolve(process.resourcesPath, "res")
    : path.resolve(__dirname, "../../res");

export default (resourceName: string) => {
    return path.resolve(resPath, resourceName);
};



================================================
FILE: src/common/index-map.ts
================================================
export interface IIndexMap {
    indexOf: (mediaItem?: IMedia.IMediaBase | null) => number;
    has: (mediaItem?: IMedia.IMediaBase | null) => boolean;
    update: (mediaItems?: IMedia.IMediaBase[]) => void;
}

export function createIndexMap(mediaItems?: IMedia.IMediaBase[]): IIndexMap {
    const indexMap: Map<string, Map<string, number>> = new Map();

    update(mediaItems);

    function update(mediaItems?: IMedia.IMediaBase[]) {
        indexMap.clear();
        if (!mediaItems) {
            return;
        }
        mediaItems?.forEach((mediaItem, index) => {
            if (!mediaItem) {
                return;
            }
            const { platform, id } = mediaItem;
            let idMap = indexMap.get(platform);
            if (!idMap) {
                idMap = new Map();
                indexMap.set(platform, idMap);
            }
            idMap.set(id, index);
        });
    }

    function indexOf(mediaItem?: IMedia.IMediaBase | null) {
        if (!mediaItem) {
            return -1;
        }
        return indexMap.get(mediaItem?.platform)?.get(mediaItem?.id) ?? -1;
    }

    function has(mediaItem?: IMedia.IMediaBase | null) {
        if (!mediaItem) {
            return false;
        }
        return indexMap.get(mediaItem?.platform)?.has(mediaItem?.id) ?? false;
    }

    return {
        update,
        indexOf,
        has,
    };
}


================================================
FILE: src/common/is-renderer.ts
================================================
export function isRenderer() {
    if (typeof process === "undefined" || !process) {
        // renderer process has no process variable with nodeIntegration off and sandbox on 
        return true;
    } 

    return process.type === "renderer";
}


================================================
FILE: src/common/media-util.ts
================================================
import { produce, setAutoFreeze } from "immer";
import {
    internalDataKey,
    localPluginName,
    qualityKeys,
    sortIndexSymbol,
    timeStampSymbol,
} from "./constant";
setAutoFreeze(false);

export function isSameMedia(
    a?: IMedia.IMediaBase | null,
    b?: IMedia.IMediaBase | null,
) {
    if (a && b) {
        return a.id === b.id && a.platform === b.platform;
    }
    return false;
}

export function resetMediaItem<T extends IMedia.IMediaBase>(
    mediaItem: T,
    platform?: string,
    newObj?: boolean,
): T {
    // 本地音乐不做处理
    if (mediaItem.platform === localPluginName || platform === localPluginName) {
        return newObj ? { ...mediaItem } : mediaItem;
    }
    if (!newObj) {
        mediaItem.platform = platform ?? mediaItem.platform;
        mediaItem[internalDataKey] = undefined;
        return mediaItem;
    } else {
        return produce(mediaItem, (_) => {
            _.platform = platform ?? mediaItem.platform;
            _[internalDataKey] = undefined;
        });
    }
}

export function getMediaPrimaryKey(mediaItem: IMedia.IUnique) {
    if (mediaItem) {
        return `${mediaItem.platform}@${mediaItem.id}`;
    }
    return "invalid@invalid";
}

export function sortByTimestampAndIndex(array: any[], newArray = false) {
    if (newArray) {
        array = [...array];
    }
    return array.sort((a, b) => {
        const ts = a[timeStampSymbol] - b[timeStampSymbol];
        if (ts !== 0) {
            return ts;
        }
        return a[sortIndexSymbol] - b[sortIndexSymbol];
    });
}

export function addSortProperty(
    mediaItems: IMedia.IMediaBase | IMedia.IMediaBase[],
) {
    const now = Date.now();
    if (Array.isArray(mediaItems)) {
        mediaItems.forEach((item, index) => {
            if (!item) {
                return;
            }
            item[timeStampSymbol] = now;
            item[sortIndexSymbol] = index;
        });
    } else {
        if (!mediaItems) {
            return;
        }
        mediaItems[timeStampSymbol] = now;
        mediaItems[sortIndexSymbol] = 0;
    }
}

export function flatMediaItem<T extends IMedia.IMediaBase>(mediaItem: T) {
    if (!mediaItem) {
        return mediaItem;
    }

    return {
        ...mediaItem,
        ...(mediaItem?.$raw || {}),
        platform: mediaItem.platform || mediaItem?.$raw?.platform,
        id: mediaItem.id || mediaItem?.$raw?.id,
    } as T;
}

export function removeInternalProperties<T extends IMedia.IMediaBase>(
    mediaItem: T,
) {
    if (!mediaItem) {
        return mediaItem;
    }

    const keys = Object.keys(mediaItem);
    return keys.reduce((obj, key) => {
        if (!key.startsWith("$")) {
            obj[key] = mediaItem[key];
        }
        return obj;
    }, {} as any) as T;
}

/**
 *  获取音质顺序
 *
 * higher: 优先高音质
 * lower:优先低音质
 */
export function getQualityOrder(
    qualityKey: IMusic.IQualityKey,
    sort: "higher" | "lower" | "skip",
) {
    if (sort === "skip") {
        return [qualityKey];
    }

    const idx = qualityKeys.indexOf(qualityKey);
    const left = qualityKeys.slice(0, idx);
    const right = qualityKeys.slice(idx + 1);
    if (sort === "higher") {
    /** 优先高音质 */
        return [qualityKey, ...right, ...left.reverse()];
    } else {
    /** 优先低音质 */
        return [qualityKey, ...left.reverse(), ...right];
    }
}

/** 获取内部属性 */
export function getInternalData<
    T extends Record<string, any>,
    K extends keyof T = keyof T,
>(mediaItem: IMedia.IMediaBase, internalProp: K): T[K] | null {
    if (!mediaItem || !mediaItem[internalDataKey]) {
        return null;
    }
    return mediaItem[internalDataKey][internalProp] ?? null;
}

export function setInternalData<
    T extends Record<string, any>,
    K extends keyof T = keyof T,
    R extends IMedia.IMediaBase = IMedia.IMediaBase,
>(mediaItem: R, internalProp: K, value: T[K] | null, newObj = false): R {
    if (newObj) {
        return {
            ...mediaItem,
            [internalDataKey]: {
                ...(mediaItem[internalDataKey] ?? {}),
                [internalProp]: value,
            },
        };
    }

    mediaItem[internalDataKey] = mediaItem[internalDataKey] ?? {};
    mediaItem[internalDataKey][internalProp] = value;
    return mediaItem;
}

export function toMediaBase(media: IMedia.IMediaBase) {
    return {
        platform: media.platform,
        id: media.id,
    };
}


================================================
FILE: src/common/normalize-util.ts
================================================
export function normalizeNumberCN(number: number): string {
    if (number < 10000) {
        return `${number}`;
    }
    number = number / 10000;
    if (number < 10000) {
        return `${number.toFixed(number < 1000 ? 1 : 0)}万`;
    }
    number = number / 10000;
    return `${number.toFixed(number < 1000 ? 1 : 0)}亿`;
}

export function normalizeNumberEN(number: number): string {
    if (number < 10000) {
        return `${number}`;
    }
    number = number / 1000;
    if (number < 1000) {
        return `${number.toFixed(number < 1000 ? 1 : 0)} K`;
    }
    number = number / 1000;
    if (number < 1000) {
        return `${number.toFixed(number < 1000 ? 1 : 0)} M`;
    }

    number = number / 100;
    return `${number.toFixed(number < 1000 ? 1 : 0)} B`;
}

export function normalizeNumber(number: number, en?: boolean): string {
    const _n = +number;
    if (isNaN(_n) || !isFinite(_n)) {
        return "-";
    } else if (isFinite(_n)) {
        return en ? normalizeNumberEN(_n) : normalizeNumberCN(_n);
    }
}

export function addRandomHash(url: string) {
    if (url.indexOf("#") === -1) {
        return `${url}#${Date.now()}`;
    }
    return url;
}

/** url hack */
export function encodeUrlHeaders(
    originalUrl: string,
    headers?: Record<string, string>,
) {
    let formalizedKey: string;
    const _setHeaders: Record<string, string> = {};

    for (const key in headers) {
        formalizedKey = key.toLowerCase();
        _setHeaders[formalizedKey] = headers[key];
    }
    const encodedUrl = new URL(originalUrl);
    encodedUrl.searchParams.set(
        "_setHeaders",
        encodeURIComponent(JSON.stringify(_setHeaders)),
    );
    return encodedUrl.toString();
}

export function isBetween(target: number, a: number, b: number) {
    if (a > b) {
        return a >= target && target >= b;
    }
    return b >= target && target >= a;
}

export function isBasicType(val: unknown) {
    const tp = typeof val;
    if (
        tp === "string" ||
    tp === "boolean" ||
    tp === "number" ||
    tp === "undefined" ||
    val === null
    ) {
        return true;
    }
    return false;
}

const fileSizeUnits = ["B", "KB", "MB", "GB", "TB"];
export function normalizeFileSize(bytes: number) {
    let ptr = 0;
    while (bytes >= 1024 && ptr < fileSizeUnits.length) {
        bytes = bytes / 1024;
        ++ptr;
    }
    return `${bytes.toFixed(1)}${fileSizeUnits[ptr]}`;
}


================================================
FILE: src/common/safe-serialization.ts
================================================
export function safeStringify(object: object) {
    try {
        return JSON.stringify(object);
    } catch {
        return "";
    }
}

export function safeParse(str: string) {
    try {
        return JSON.parse(str);
    } catch {
        return null;
    }
}


================================================
FILE: src/common/store.ts
================================================
// 数据存储方案
import { useEffect, useState } from "react";

export class StateMapper<T> {
    private getFun: () => T;
    public cbs: Set<() => void> = new Set([]);
    constructor(getFun: () => T) {
        this.getFun = getFun;
    }

    notify = () => {
        this.cbs.forEach((_) => _?.());
    };

    useMappedState = () => {
        const [_state, _setState] = useState<T>(this.getFun);

        const updateState = () => {
            _setState(this.getFun());
        };
        useEffect(() => {
            this.cbs.add(updateState);
            return () => {
                this.cbs.delete(updateState);
            };
        }, []);
        return _state;
    };
}

type UpdateFunc<T> = (prev: T) => T;

export default class Store<T> {
    private value: T;
    private stateMapper: StateMapper<T>;
    private valueChangeCbs: Set<(newValue: T, oldValue: T) => void> = new Set([]);

    constructor(initValue: T) {
        this.value = initValue;
        this.stateMapper = new StateMapper(this.getValue);
    }

    public getValue = () => {
        return this.value;
    };

    public useValue = () => {
        return this.stateMapper.useMappedState();
    };

    public setValue = (value: T | UpdateFunc<T>) => {
        let newValue: T;
        if (typeof value === "function") {
            newValue = (value as UpdateFunc<T>)(this.value);
        } else {
            newValue = value;
        }
        this.valueChangeCbs.forEach((cb) => {
            cb(newValue, this.value);
        });
        this.value = newValue;
        this.stateMapper.notify();
    };

    public onValueChange = (cb: (newValue: T, oldValue: T) => void) => {
        this.valueChangeCbs.add(cb);

        return () => {
            this.valueChangeCbs.delete(cb);
        };
    };
}

export function useStore<T>(store: Store<T>) {
    return [store.useValue(), store.setValue] as const;
}


================================================
FILE: src/common/thumb-bar-util.ts
================================================
/**
 * Thumb Bar Util
 */

import { BrowserWindow, nativeImage } from "electron";
import getResourcePath from "@/common/get-resource-path";
import { t } from "@shared/i18n/main";
import { ResourceName } from "@/common/constant";
import asyncMemoize from "@/common/async-memoize";
import fs from "fs/promises";
import logger from "@shared/logger/main";
import axios from "axios";
import messageBus from "@shared/message-bus/main";

/**
 * 设置缩略图按钮
 * @param window 当前窗口
 * @param isPlaying 当前是否正在播放音乐
 */
function setThumbBarButtons(window: BrowserWindow, isPlaying?: boolean) {
    if (!window) {
        return;
    }

    window.setThumbarButtons([
        {
            icon: nativeImage.createFromPath(getResourcePath(ResourceName.SKIP_LEFT_ICON)),
            tooltip: t("main.previous_music"),
            click() {
                messageBus.sendCommand("SkipToPrevious");
            },
        },
        {
            icon: nativeImage.createFromPath(
                getResourcePath(isPlaying ? ResourceName.PAUSE_ICON : ResourceName.PLAY_ICON),
            ),
            tooltip: isPlaying
                ? t("media.music_state_pause")
                : t("media.music_state_play"),
            click() {
                messageBus.sendCommand(
                    "TogglePlayerState",
                );
            },
        },
        {
            icon: nativeImage.createFromPath(getResourcePath(ResourceName.SKIP_RIGHT_ICON)),
            tooltip: t("main.next_music"),
            click() {
                messageBus.sendCommand("SkipToNext");
            },
        },
    ]);

}


// 获取默认的图片
const getDefaultAlbumCoverImage = asyncMemoize(async () => {
    return await fs.readFile((getResourcePath(ResourceName.DEFAULT_ALBUM_COVER_IMAGE)));
});

let hookedFlag = false;

/**
 * 设置缩略图
 * @param window 窗口
 * @param src 图片url
 */
async function setThumbImage(window: BrowserWindow, src: string) {
    if (!window) {
        return;
    }

    // only support windows
    if (process.platform !== "win32") {
        return;
    }

    try {
        const hwnd = window.getNativeWindowHandle().readBigUInt64LE(0);

        const taskBarThumbManager = (await import("@native/TaskbarThumbnailManager/TaskbarThumbnailManager.node")).default;

        if (!hookedFlag) {
            taskBarThumbManager.config(hwnd);
            hookedFlag = true;
        }

        let buffer: Buffer;
        if (!src) {
            buffer = await getDefaultAlbumCoverImage();
        } else if (src.startsWith("http")) {
            try {
                buffer = (
                    await axios.get(src, {
                        responseType: "arraybuffer",
                    })
                ).data;
            } catch {
                buffer = await getDefaultAlbumCoverImage();
            }
        } else if (src.startsWith("data:image")) {
            buffer = Buffer.from(src.split(";base64,").pop(), "base64");
        } else {
            buffer = await getDefaultAlbumCoverImage();
        }

        const size = 106;

        const sharp = (await import("sharp")).default;
        const result = await sharp(buffer)
            .resize(size, size, {
                fit: "cover",
            })
            .png()
            .ensureAlpha(1)
            .raw()
            .toBuffer({
                resolveWithObject: true,
            });

        taskBarThumbManager.sendIconicRepresentation(
            hwnd,
            {
                width: size,
                height: size,
            },
            result.data,
        );
    } catch (ex) {
        logger.logError("Fail to setThumbImage", ex);
    }


}


const ThumbBarManager = {
    setThumbBarButtons,
    setThumbImage,
};

export default ThumbBarManager;


================================================
FILE: src/common/time-util.ts
================================================
export function secondsToDuration(seconds: number | string) {
    if (typeof seconds === "string") {
        return seconds;
    } else {
        const sec = seconds % 60;
        seconds = Math.floor(seconds / 60);
        const min = seconds % 60;
        const hour = Math.floor(seconds / 60);
        const ms = `${min}`.padStart(2, "0") + ":" + `${Math.floor(sec)}`.padStart(2, "0");
        if (hour === 0) {
            return ms;
        } else {
            return `${hour}:${ms}`;
        }
    }
}

export function delay(millsecond: number) {
    return new Promise<void>((resolve) => {
        setTimeout(() => {
            resolve();
        }, millsecond);
    });
}


================================================
FILE: src/common/unique-map.ts
================================================
export interface IUniqueMap {
    getMap: () => Record<string, Set<string>>;
    has: (mediaItem?: IMedia.IMediaBase | null) => boolean;
    add: (mediaItem?: IMedia.IMediaBase | IMedia.IMediaBase[] | null) => void;
    remove: (mediaItem?: IMedia.IMediaBase | IMedia.IMediaBase[] | null) => void;
}

export function createUniqueMap(mediaItems?: IMedia.IMediaBase[]): IUniqueMap {
    const uniqueMap: Record<string, Set<string>> = {};

    mediaItems?.forEach((item) => {
        add(item);
    });

    function getMap() {
        return uniqueMap;
    }

    function has(mediaItem?: IMedia.IMediaBase | null) {
        if (!mediaItem) {
            return false;
        }

        return uniqueMap[`${mediaItem.platform}`]?.has(`${mediaItem.id}`) || false;
    }

    function add(mediaItem?: IMedia.IMediaBase | IMedia.IMediaBase[] | null) {
        if (!mediaItem) {
            return;
        }
        const _mediaItem = Array.isArray(mediaItem) ? mediaItem : [mediaItem];
        _mediaItem.forEach((item) => {
            if (!uniqueMap[`${item.platform}`]) {
                uniqueMap[`${item.platform}`] = new Set([`${item.id}`]);
            } else {
                uniqueMap[`${item.platform}`].add(`${item.id}`);
            }
        });
    }

    function remove(mediaItem?: IMedia.IMediaBase | IMedia.IMediaBase[] | null) {
        if (!mediaItem) {
            return;
        }
        const _mediaItem = Array.isArray(mediaItem) ? mediaItem : [mediaItem];

        _mediaItem.forEach((item) => {
            if (uniqueMap[`${item.platform}`]) {
                uniqueMap[`${item.platform}`].delete(`${item.id}`);
            }
        });
    }

    return {
        getMap,
        add,
        has,
        remove,
    };
}


================================================
FILE: src/common/void-callback.ts
================================================
// eslint-disable-next-line @typescript-eslint/no-empty-function
export default () => {};


================================================
FILE: src/hooks/useAppConfig.ts
================================================
import AppConfig from "@shared/app-config/renderer";
import { IAppConfig } from "@/types/app-config";
import { useEffect, useState } from "react";


export default function useAppConfig<K extends keyof IAppConfig>(configKey: K): IAppConfig[K] {
    const [state, setState] = useState<IAppConfig[K]>(AppConfig.getConfig(configKey));

    useEffect(() => {
        const callback = (patch: IAppConfig, fullConfig: IAppConfig) => {
            if (configKey in patch) {
                setState(fullConfig[configKey]);
            }
        };

        AppConfig.onConfigUpdate(callback);

        return () => {
            AppConfig.offConfigUpdate(callback);
        };
    }, []);


    return state;
}


================================================
FILE: src/hooks/useLocalFonts.ts
================================================
import Store from "@/common/store";
import { useEffect } from "react";

const fontsStore = new Store<FontData[] | null>(null);

async function initFonts() {
    if (fontsStore.getValue()) {
        return fontsStore.getValue();
    }
    try {
        const allFonts = await window.queryLocalFonts();
        fontsStore.setValue(allFonts);
        return allFonts;
    } catch (e) {
        console.log(e);
    }
    return null;
}

export default function useLocalFonts() {
    useEffect(() => {
        initFonts();
    }, []);

    return fontsStore.useValue();
}


================================================
FILE: src/hooks/useMediaDevices.ts
================================================
import { useEffect, useState } from "react";

export function useOutputAudioDevices() {
    const [devices, setDevices] = useState<MediaDeviceInfo[] | null>(null);

    useEffect(() => {
        navigator.mediaDevices
            .enumerateDevices()
            .then((res) => {
                setDevices(res.filter((item) => item.kind === "audiooutput"));
            })
            .catch(() => {})
            .finally(() => {});
    }, []);

    return devices;
}


================================================
FILE: src/hooks/useMounted.ts
================================================
import { useEffect, useRef } from "react";

export default function useMounted(){
    const isMounted = useRef(false);

    useEffect(() => {
        isMounted.current = true;

        return () => {
            isMounted.current = false;
        };
    }, []);

    return isMounted;
}

================================================
FILE: src/hooks/useStateRef.ts
================================================
import { useRef, useState } from "react";

export default function useStateRef<T>(initValue: T) {
    const [state, setState] = useState(initValue);
    const ref = useRef(initValue);

    ref.current = state;

    return [state, setState, ref] as const;
}


================================================
FILE: src/hooks/useVirtualList.ts
================================================
import {
    MutableRefObject,
    useCallback,
    useEffect,
    useRef,
    useState,
} from "react";
import throttle from "lodash.throttle";

interface IVirtualListProps<T> {
    /** 滚动的容器 */
    getScrollElement?: () => HTMLElement;
    /** 滚动容器的query */
    scrollElementQuery?: string;
    /** 元素高度和列表高度 */
    estimateItemHeight: number;

    /** 数据 */
    data: T[];
    /** 渲染数目 */
    renderCount?: number;
    /** 虚拟列表失效时的渲染数目 */
    fallbackRenderCount?: number;
    /** 偏移高度 */
    offsetHeight?: number | (() => number);
}

interface IVirtualItem<T> {
    /** 偏移 */
    top: number;
    /** 下标 */
    rowIndex: number;
    /** 数据 */
    dataItem: T;
}

export default function useVirtualList<T>(props: IVirtualListProps<T>) {
    const {
        estimateItemHeight,
        data,
        renderCount = 40,
        fallbackRenderCount = -1,
        getScrollElement,
        scrollElementQuery,
        offsetHeight = 0,
    } = props;
    const dataRef = useRef(data);
    dataRef.current = data;

    const [virtualItems, setVirtualItems] = useState<IVirtualItem<T>[]>([]);
    const [totalHeight, setTotalHeight] = useState<number>(
        data.length * estimateItemHeight,
    );

    const scrollElementRef = useRef<HTMLElement>();

    const scrollHandler = useCallback(
        throttle(
            () => {
                const scrollTop =
          (scrollElementRef.current?.scrollTop ?? 0) -
          (typeof offsetHeight === "number" ? offsetHeight : offsetHeight());
                const realData = dataRef.current;
                const estimizeStartIndex = Math.floor(scrollTop / estimateItemHeight);
                const startIndex = Math.max(
                    estimizeStartIndex - (estimizeStartIndex % 2 === 1 ? 3 : 2),
                    0,
                );

                setVirtualItems(
                    realData
                        .slice(
                            startIndex,
                            startIndex +
                (scrollElementRef.current
                    ? renderCount
                    : fallbackRenderCount < 0
                        ? realData.length
                        : fallbackRenderCount),
                        )
                        .map((item, index) => ({
                            rowIndex: startIndex + index,
                            dataItem: item,
                            top: (startIndex + index) * estimateItemHeight,
                        })),
                );
            },
            32,
            {
                trailing: true,
                leading: true,
            },
        ),
        [],
    );

    useEffect(() => {
        setTotalHeight(data.length * estimateItemHeight);
        scrollHandler();
    }, [data]);

    useEffect(() => {
        if (!scrollElementRef.current) {
            scrollElementRef.current = getScrollElement
                ? getScrollElement()
                : document.querySelector(scrollElementQuery);
        }
        if (scrollElementRef.current) {
            scrollElementRef.current.addEventListener("scroll", scrollHandler);
        }

        return () => {
            scrollElementRef.current?.removeEventListener?.("scroll", scrollHandler);
            scrollElementRef.current = null;
        };
    }, []);

    function setScrollElement(scrollElement: HTMLElement) {
        scrollElementRef.current?.removeEventListener("scroll", scrollHandler);
        scrollElementRef.current = scrollElement;
        if (scrollElement) {
            scrollElement.addEventListener("scroll", scrollHandler);
            scrollHandler();
        }
    }

    function scrollToIndex(index: number, behavior?: ScrollBehavior) {
        scrollElementRef.current.scrollTo({
            top:
        (typeof offsetHeight === "number" ? offsetHeight : offsetHeight()) +
        estimateItemHeight * index,
            behavior,
        });
    }

    return {
        virtualItems,
        totalHeight,
        startTop: virtualItems[0]?.top ?? 0,
        setScrollElement,
        scrollToIndex,
    };
}


================================================
FILE: src/main/deep-link/index.ts
================================================
import { supportLocalMediaType } from "@/common/constant";
import { parseLocalMusicItem, safeStat } from "@/common/file-util";
import PluginManager from "@shared/plugin-manager/main";
import voidCallback from "@/common/void-callback";
import messageBus from "@shared/message-bus/main";

export function handleDeepLink(url: string) {
    if (!url) {
        return;
    }

    try {
        const urlObj = new URL(url);
        if (urlObj.protocol === "musicfree:") {
            handleMusicFreeScheme(urlObj);
        }
    } catch {
        // pass
    }
}

async function handleMusicFreeScheme(url: URL) {
    const hostname = url.hostname;
    if (hostname === "install") {
        try {
            const pluginUrlStr =
                url.pathname.slice(1) || url.searchParams.get("plugin");
            const pluginUrls = pluginUrlStr.split(",").map(decodeURIComponent);
            await Promise.all(
                pluginUrls.map((it) => PluginManager.installPluginFromRemoteUrl(it).catch(voidCallback)),
            );
        } catch {
            // pass
        }
    }
}

async function handleBareUrl(url: string) {
    try {
        if (
            (await safeStat(url)).isFile() &&
            supportLocalMediaType.some((postfix) => url.endsWith(postfix))
        ) {
            const musicItem = await parseLocalMusicItem(url);
            messageBus.sendCommand("PlayMusic", musicItem);
        }
    } catch {
    }
}


================================================
FILE: src/main/index.ts
================================================
import { app, BrowserWindow, globalShortcut } from "electron";
import fs from "fs";
import path from "path";
import { setAutoFreeze } from "immer";
import { setupGlobalContext } from "@/shared/global-context/main";
import { setupI18n } from "@/shared/i18n/main";
import { handleDeepLink } from "./deep-link";
import logger from "@shared/logger/main";
import { PlayerState } from "@/common/constant";
import ThumbBarUtil from "@/common/thumb-bar-util";
import windowManager from "@main/window-manager";
import AppConfig from "@shared/app-config/main";
import TrayManager from "@main/tray-manager";
import WindowDrag from "@shared/window-drag/main";
import { IAppConfig } from "@/types/app-config";
import axios from "axios";
import { HttpsProxyAgent } from "https-proxy-agent";
import PluginManager from "@shared/plugin-manager/main";
import ServiceManager from "@shared/service-manager/main";
import utils from "@shared/utils/main";
import messageBus from "@shared/message-bus/main";
import shortCut from "@shared/short-cut/main";
import voidCallback from "@/common/void-callback";

// portable
if (process.platform === "win32") {
    try {
        const appPath = app.getPath("exe");
        const portablePath = path.resolve(appPath, "../portable");
        const portableFolderStat = fs.statSync(portablePath);
        if (portableFolderStat.isDirectory()) {
            const appPathNames = ["appData", "userData"];
            appPathNames.forEach((it) => {
                app.setPath(it, path.resolve(portablePath, it));
            });
        }
    } catch (e) {
        // pass
    }
}

setAutoFreeze(false);


if (process.defaultApp) {
    if (process.argv.length >= 2) {
        app.setAsDefaultProtocolClient("musicfree", process.execPath, [
            path.resolve(process.argv[1]),
        ]);
    }
} else {
    app.setAsDefaultProtocolClient("musicfree");
}

// Quit when all windows are closed, except on macOS. There, it's common
// for applications and their menu bar to stay active until the user quits
// explicitly with Cmd + Q.
app.on("window-all-closed", () => {
    if (process.platform !== "darwin") {
        app.quit();
    }
});

app.on("activate", () => {
    // On OS X it's common to re-create a window in the app when the
    // dock icon is clicked and there are no other windows open.
    if (BrowserWindow.getAllWindows().length === 0) {
        windowManager.showMainWindow();
    }
});

if (!app.requestSingleInstanceLock()) {
    app.exit(0);
}

app.on("second-instance", (_evt, commandLine) => {
    if (windowManager.mainWindow) {
        windowManager.showMainWindow();
    }

    if (process.platform !== "darwin") {
        handleDeepLink(commandLine.pop());
    }
});

app.on("open-url", (_evt, url) => {
    handleDeepLink(url);
});

app.on("will-quit", () => {
    globalShortcut.unregisterAll();
});

// In this file you can include the rest of your app's specific main process
// code. You can also put them in separate files and import them here.
app.whenReady().then(async () => {
    logger.logPerf("App Ready");
    setupGlobalContext();
    await AppConfig.setup(windowManager);

    await setupI18n({
        getDefaultLang() {
            return AppConfig.getConfig("normal.language");
        },
        onLanguageChanged(lang) {
            AppConfig.setConfig({
                "normal.language": lang,
            });
            if (process.platform === "win32") {

                ThumbBarUtil.setThumbBarButtons(windowManager.mainWindow, messageBus.getAppState().playerState === PlayerState.Playing);
            }
        },
    });
    utils.setup(windowManager);
    PluginManager.setup(windowManager);
    TrayManager.setup(windowManager);
    WindowDrag.setup();
    shortCut.setup().then(voidCallback);
    logger.logPerf("Create Main Window");
    // Setup message bus & app state
    messageBus.onAppStateChange((_, patch) => {
        if ("musicItem" in patch) {
            TrayManager.buildTrayMenu();
            const musicItem = patch.musicItem;
            const mainWindow = windowManager.mainWindow;

            if (mainWindow) {
                const thumbStyle = AppConfig.getConfig("normal.taskbarThumb");
                if (process.platform === "win32" && thumbStyle === "artwork") {
                    ThumbBarUtil.setThumbImage(mainWindow, musicItem?.artwork);
                }
                if (musicItem) {
                    mainWindow.setTitle(
                        musicItem.title + (musicItem.artist ? ` - ${musicItem.artist}` : ""),
                    );
                } else {
                    mainWindow.setTitle(app.name);
                }
            }
        } else if ("playerState" in patch) {
            TrayManager.buildTrayMenu();
            const playerState = patch.playerState;

            if (process.platform === "win32") {
                ThumbBarUtil.setThumbBarButtons(windowManager.mainWindow, playerState === PlayerState.Playing);
            }
        } else if ("repeatMode" in patch) {
            TrayManager.buildTrayMenu();
        } else if ("lyricText" in patch && process.platform === "darwin") {
            if (AppConfig.getConfig("lyric.enableStatusBarLyric")) {
                TrayManager.setTitle(patch.lyricText);
            } else {
                TrayManager.setTitle("");
            }
        }
    });

    messageBus.setup(windowManager);

    windowManager.showMainWindow();

    bootstrap();

});

async function bootstrap() {
    ServiceManager.setup(windowManager);

    const downloadPath = AppConfig.getConfig("download.path");
    if (!downloadPath) {
        AppConfig.setConfig({
            "download.path": app.getPath("downloads"),
        });
    }

    const minimodeEnabled = AppConfig.getConfig("private.minimode");

    if (minimodeEnabled) {
        windowManager.showMiniModeWindow();
    }

    /** 一些初始化设置 */
    // 初始化桌面歌词
    const desktopLyricEnabled = AppConfig.getConfig("lyric.enableDesktopLyric");

    if (desktopLyricEnabled) {
        windowManager.showLyricWindow();
    }

    AppConfig.onConfigUpdated((patch) => {
        // 桌面歌词锁定状态
        if ("lyric.lockLyric" in patch) {
            const lyricWindow = windowManager.lyricWindow;
            const lockState = patch["lyric.lockLyric"];

            if (!lyricWindow) {
                return;
            }
            if (lockState) {
                lyricWindow.setIgnoreMouseEvents(true, {
                    forward: true,
                });
            } else {
                lyricWindow.setIgnoreMouseEvents(false);
            }
        }
        if ("shortCut.enableGlobal" in patch) {
            const enableGlobal = patch["shortCut.enableGlobal"];
            if (enableGlobal) {
                shortCut.registerAllGlobalShortCuts();
            } else {
                shortCut.unregisterAllGlobalShortCuts();
            }
        }
    });


    // 初始化代理
    const proxyConfigKeys: Array<keyof IAppConfig> = [
        "network.proxy.enabled",
        "network.proxy.host",
        "network.proxy.port",
        "network.proxy.username",
        "network.proxy.password",
    ];

    AppConfig.onConfigUpdated((patch, config) => {
        let proxyUpdated = false;
        for (const proxyConfigKey of proxyConfigKeys) {
            if (proxyConfigKey in patch) {
                proxyUpdated = true;
                break;
            }
        }

        if (proxyUpdated) {
            if (config["network.proxy.enabled"]) {
                handleProxy(true, config["network.proxy.host"], config["network.proxy.port"], config["network.proxy.username"], config["network.proxy.password"]);
            } else {
                handleProxy(false);
            }
        }
    });

    handleProxy(
        AppConfig.getConfig("network.proxy.enabled"),
        AppConfig.getConfig("network.proxy.host"),
        AppConfig.getConfig("network.proxy.port"),
        AppConfig.getConfig("network.proxy.username"),
        AppConfig.getConfig("network.proxy.password"),
    );


}


function handleProxy(enabled: boolean, host?: string | null, port?: string | null, username?: string | null, password?: string | null) {
    try {
        if (!enabled) {
            axios.defaults.httpAgent = undefined;
            axios.defaults.httpsAgent = undefined;
        } else if (host) {
            const proxyUrl = new URL(host);
            proxyUrl.port = port;
            proxyUrl.username = username;
            proxyUrl.password = password;
            const agent = new HttpsProxyAgent(proxyUrl);

            axios.defaults.httpAgent = agent;
            axios.defaults.httpsAgent = agent;
        } else {
            throw new Error("Unknown Host");
        }
    } catch (e) {
        axios.defaults.httpAgent = undefined;
        axios.defaults.httpsAgent = undefined;
    }
}


================================================
FILE: src/main/native_modules/TaskbarThumbnailManager/TaskbarThumbnailManager.node.d.ts
================================================
declare module "@native/TaskbarThumbnailManager/TaskbarThumbnailManager.node" {
    interface ISize {
        width: number;
        height: number;
    }

    function config(hWnd: bigint): void; 
    function sendIconicRepresentation(hWnd: bigint, size: ISize, buf: Buffer);
    function sendLivePreviewBitmap(hWnd: bigint, size: ISize, buf: Buffer);
}

================================================
FILE: src/main/tray-manager/index.ts
================================================
import { app, Menu, MenuItem, MenuItemConstructorOptions, nativeImage, Tray } from "electron";
import { t } from "@shared/i18n/main";
import { IWindowManager } from "@/types/main/window-manager";
import getResourcePath from "@/common/get-resource-path";
import { PlayerState, RepeatMode, ResourceName } from "@/common/constant";
import AppConfig from "@shared/app-config/main";
import windowManager from "@main/window-manager";
import { IAppConfig } from "@/types/app-config";
import messageBus from "@shared/message-bus/main";

if (process.platform === "darwin") {
    Menu.setApplicationMenu(
        Menu.buildFromTemplate([
            {
                label: app.getName(),
                submenu: [
                    {
                        label: t("common.about"),
                        role: "about",
                    },
                    {
                        label: t("common.exit"),
                        click() {
                            app.quit();
                        },
                    },
                ],
            },
            {
                label: t("common.edit"),
                submenu: [
                    {
                        label: t("common.undo"),
                        accelerator: "Command+Z",
                        role: "undo",
                    },
                    {
                        label: t("common.redo"),
                        accelerator: "Shift+Command+Z",
                        role: "redo",
                    },
                    { type: "separator" },
                    { label: t("common.cut"), accelerator: "Command+X", role: "cut" },
                    { label: t("common.copy"), accelerator: "Command+C", role: "copy" },
                    { label: t("common.cut"), accelerator: "Command+V", role: "paste" },
                    { type: "separator" },
                    {
                        label: t("common.select_all"),
                        accelerator: "Command+A",
                        role: "selectAll",
                    },
                ],
            },
        ]),
    );
} else {
    Menu.setApplicationMenu(null);
}

class TrayManager {
    private static trayInstance: Tray | null = null;
    private windowManager: IWindowManager;

    private observedKey: Array<keyof IAppConfig> = [
        "lyric.lockLyric",
        "lyric.enableDesktopLyric",
        "normal.language",
    ];

    public setup(windowManager: IWindowManager) {
        this.windowManager = windowManager;
        const tray = new Tray(
            nativeImage.createFromPath(getResourcePath(ResourceName.LOGO_IMAGE)).resize({
                width: 32,
                height: 32,
            }),
        );

        if (process.platform === "linux") {
            tray.on("click", () => {
                windowManager.showMainWindow();
            });
        } else {
            tray.on("double-click", () => {
                windowManager.showMainWindow();
            });
        }

        let debugClickCount = 0;
        let debugClickTime = 0;

        const debugModeHandler = () => {
            const now = Date.now();
            if (now - debugClickTime < 500) {
                debugClickCount++;
                debugClickTime = now;
                if (debugClickCount === 5) {
                    windowManager.getAllWindows().forEach(win => {
                        win?.webContents?.openDevTools({
                            mode: "undocked",
                        });
                    });
                }
            } else {
                debugClickCount = 1;
                debugClickTime = Date.now();
            }
        };

        tray.on("click", debugModeHandler);

        // 配置变化时更新菜单
        AppConfig.onConfigUpdated((changedConfig) => {
            for (const k of this.observedKey) {
                if (k in changedConfig) {
                    this.buildTrayMenu();
                    return;
                }
            }
        });

        TrayManager.trayInstance = tray;
        this.buildTrayMenu();
    }

    private openMusicDetail() {
        this.windowManager.showMainWindow();
        messageBus.sendCommand("OpenMusicDetailPage");
    }

    public async buildTrayMenu() {
        if (!TrayManager.trayInstance) {
            return;
        }
        const ctxMenu: Array<MenuItemConstructorOptions | MenuItem> = [];

        const tray = TrayManager.trayInstance;

        /********* 音乐信息 **********/
        const { musicItem, playerState, repeatMode } =
            messageBus.getAppState();
        // 更新一下tooltip
        if (musicItem) {
            tray.setToolTip(
                `${musicItem.title ?? t("media.unknown_title")}${musicItem.artist ? ` - ${musicItem.artist}` : ""
                }`,
            );
        } else {
            tray.setToolTip("MusicFree");
        }
        if (musicItem) {
            const fullName = `${musicItem.title ?? t("media.unknown_title")}${musicItem.artist ? ` - ${musicItem.artist}` : ""
            }`;
            ctxMenu.push(
                {
                    label: fullName.length > 12 ? fullName.slice(0, 12) + "..." : fullName,
                    click: this.openMusicDetail.bind(this),
                },
                {
                    label: `${t("media.media_platform")}: ${musicItem.platform}`,
                    click: this.openMusicDetail.bind(this),
                },
            );
        } else {
            ctxMenu.push({
                label: t("main.no_playing_music"),
                enabled: false,
            });
        }

        ctxMenu.push(
            {
                label: musicItem
                    ? playerState === PlayerState.Playing
                        ? t("media.music_state_pause")
                        : t("media.music_state_play")
                    : t("media.music_state_play_or_pause"),
                enabled: !!musicItem,
                click() {
                    if (!musicItem) {
                        return;
                    }
                    messageBus.sendCommand("TogglePlayerState");
                },
            },
            {
                label: t("main.previous_music"),
                enabled: !!musicItem,
                click() {
                    messageBus.sendCommand("SkipToPrevious");
                },
            },
            {
                label: t("main.next_music"),
                enabled: !!musicItem,
                click() {
                    messageBus.sendCommand("SkipToNext");
                },
            },
        );

        ctxMenu.push({
            label: t("media.music_repeat_mode"),
            type: "submenu",
            submenu: Menu.buildFromTemplate([
                {
                    label: t("media.music_repeat_mode_loop"),
                    id: RepeatMode.Loop,
                    type: "radio",
                    checked: repeatMode === RepeatMode.Loop,
                    click() {
                        messageBus.sendCommand("SetRepeatMode", RepeatMode.Loop);
                    },
                },
                {
                    label: t("media.music_repeat_mode_queue"),
                    id: RepeatMode.Queue,
                    type: "radio",
                    checked: repeatMode === RepeatMode.Queue,
                    click() {
                        messageBus.sendCommand("SetRepeatMode", RepeatMode.Queue);
                    },
                },
                {
                    label: t("media.music_repeat_mode_shuffle"),
                    id: RepeatMode.Shuffle,
                    type: "radio",
                    checked: repeatMode === RepeatMode.Shuffle,
                    click() {
                        messageBus.sendCommand("SetRepeatMode", RepeatMode.Shuffle);
                    },
                },
            ]),
        });

        ctxMenu.push({
            type: "separator",
        });
        /** TODO: 桌面歌词 */
        // const lyricConfig = await getAppConfigPath("lyric");
        // if (lyricConfig?.enableDesktopLyric) {
        //     ctxMenu.push({
        //         label: t("main.close_desktop_lyric"),
        //         click() {
        //             setLyricWindow(false);
        //         },
        //     });
        // } else {
        //     ctxMenu.push({
        //         label: t("main.open_desktop_lyric"),
        //         click() {
        //             setLyricWindow(true);
        //         },
        //     });
        // }
        //
        // if (lyricConfig?.lockLyric) {
        //     ctxMenu.push({
        //         label: t("main.unlock_desktop_lyric"),
        //         click() {
        //             setDesktopLyricLock(false);
        //         },
        //     });
        // } else {
        //     ctxMenu.push({
        //         label: t("main.lock_desktop_lyric"),
        //         click() {
        //             setDesktopLyricLock(true);
        //         },
        //     });
        // }

        ctxMenu.push({
            type: "separator",
        });
        /********* 其他操作 **********/
        ctxMenu.push({
            label: t("app_header.settings"),
            click() {
                windowManager.showMainWindow();
                messageBus.sendCommand("Navigate", "/main/setting");
            },
        });
        ctxMenu.push({
            label: t("common.exit"),
            role: process.platform === "win32" ? undefined : "quit",
            click() {
                windowManager.mainWindow?.removeAllListeners?.();
                app.exit(0);
            },
        });

        TrayManager.trayInstance.setContextMenu(Menu.buildFromTemplate(ctxMenu));
    }

    public setTitle(title: string) {
        if (!title || !title.length) {
            TrayManager.trayInstance?.setTitle("");
            return;
        }
        if (title.length > 7) {
            TrayManager.trayInstance?.setTitle(" " + title.slice(0) + "...");
        } else {
            TrayManager.trayInstance?.setTitle(" " + title);
        }
    }

}

export default new TrayManager();


================================================
FILE: src/main/window-manager/index.ts
================================================
import { app, BrowserWindow, nativeImage, screen } from "electron";
import getResourcePath from "@/common/get-resource-path";
import { IWindowEvents, IWindowManager } from "@/types/main/window-manager";
import { localPluginName, PlayerState, ResourceName } from "@/common/constant";
import voidCallback from "@/common/void-callback";
import ThumbBarUtil from "@/common/thumb-bar-util";
import EventEmitter from "eventemitter3";
import WindowDrag from "@shared/window-drag/main";
import AppConfig from "@shared/app-config/main";
import messageBus from "@shared/message-bus/main";
import { IAppConfig } from "@/types/app-config";
import debounce from "@/common/debounce";


// This allows TypeScript to pick up the magic constants that's auto-generated by Forge's Webpack
// plugin that tells the Electron app where to look for the Webpack-bundled app code (depending on
// whether you're running in development or production).

declare const MAIN_WINDOW_WEBPACK_ENTRY: string;
declare const MAIN_WINDOW_PRELOAD_WEBPACK_ENTRY: string;
declare const LRC_WINDOW_WEBPACK_ENTRY: string;
declare const LRC_WINDOW_PRELOAD_WEBPACK_ENTRY: string;
declare const MINIMODE_WINDOW_WEBPACK_ENTRY: string;
declare const MINIMODE_WINDOW_PRELOAD_WEBPACK_ENTRY: string;


class WindowManager implements IWindowManager {
    private static mainWindow: BrowserWindow | null = null;
    private static lrcWindow: BrowserWindow | null = null;
    private static miniModeWindow: BrowserWindow | null = null;

    private ee: EventEmitter = new EventEmitter();

    getMainWindow(): BrowserWindow {
        return WindowManager.mainWindow;
    }

    get mainWindow() {
        return WindowManager.mainWindow;
    }

    get lyricWindow() {
        return WindowManager.lrcWindow;
    }

    get miniModeWindow() {
        return WindowManager.miniModeWindow;
    }

    getExtensionWindows(): BrowserWindow[] {
        const extWindows = [];
        if (WindowManager.lrcWindow) {
            extWindows.push(WindowManager.lrcWindow);
        }
        if (WindowManager.miniModeWindow) {
            extWindows.push(WindowManager.miniModeWindow);
        }
        return extWindows;
    }

    getAllWindows(): BrowserWindow[] {
        const windows = [];
        if (WindowManager.mainWindow) {
            windows.push(WindowManager.mainWindow);
        }
        if (WindowManager.lrcWindow) {
            windows.push(WindowManager.lrcWindow);
        }
        if (WindowManager.miniModeWindow) {
            windows.push(WindowManager.miniModeWindow);
        }
        return windows;
    }

    private emit<T extends keyof IWindowEvents>(event: T, data: IWindowEvents[T]) {
        this.ee.emit(event, data);
    }

    public on<T extends keyof IWindowEvents>(event: T, listener: (data: IWindowEvents[T]) => void) {
        this.ee.on(event, listener);
    }

    /**************************** Main Window ***************************/
    private createMainWindow() {
        // 清理旧窗口
        if (WindowManager.mainWindow) {
            WindowManager.mainWindow.removeAllListeners();
            if (!WindowManager.mainWindow.isDestroyed()) {
                WindowManager.mainWindow.close();
                WindowManager.mainWindow.destroy();
            }
            WindowManager.mainWindow = null;
        }
        // 1. 创建主窗口
        const initSize = AppConfig.getConfig("private.mainWindowSize");
        const mainWindow = new BrowserWindow({
            height: initSize?.height ?? 700,
            width: initSize?.width ?? 1050,
            minHeight: 700,
            minWidth: 1050,
            webPreferences: {
                preload: MAIN_WINDOW_PRELOAD_WEBPACK_ENTRY,
                nodeIntegration: true,
                nodeIntegrationInWorker: true,
                webSecurity: false,
                sandbox: false,
                webviewTag: true,
            },
            frame: false,
            icon: nativeImage.createFromPath(getResourcePath(ResourceName.LOGO_IMAGE)),
        });

        const updateWindowSizeConfig = debounce(() => {
            const [wWidth, wHeight] = mainWindow.getSize();
            AppConfig.setConfig({
                "private.mainWindowSize": {
                    width: wWidth,
                    height: wHeight,
                },
            });
        }, 300, {
            leading: false,
            trailing: true,
        });
        mainWindow.on("resize", updateWindowSizeConfig);

        // 2. 加载主界面
        const initUrl = new URL(MAIN_WINDOW_WEBPACK_ENTRY);
        initUrl.hash = `/main/musicsheet/${localPluginName}/favorite`;
        mainWindow.loadURL(initUrl.toString()).then(voidCallback);

        // 3. 开发者工具
        if (!app.isPackaged) {
            mainWindow.on("ready-to-show", () => {
                mainWindow.webContents.openDevTools();
            });
        }

        // 4. 主窗口http hack逻辑
        mainWindow.webContents.session.webRequest.onBeforeSendHeaders(
            (details, callback) => {
                /** hack headers */
                try {
                    const url = new URL(details.url);
                    const setHeadersOptions = url.searchParams.get("_setHeaders");
                    if (!setHeadersOptions) {
                        throw new Error("No Need To Hack");
                    }
                    const originalRequestHeaders = details.requestHeaders ?? {};
                    let requestHeaders: Record<string, string> = {};
                    if (setHeadersOptions) {
                        const decodedHeaders = JSON.parse(
                            decodeURIComponent(setHeadersOptions),
                        );
                        for (const k in originalRequestHeaders) {
                            requestHeaders[k.toLowerCase()] = originalRequestHeaders[k];
                        }
                        for (const k in decodedHeaders) {
                            requestHeaders[k.toLowerCase()] = decodedHeaders[k];
                        }
                    } else {
                        requestHeaders = details.requestHeaders;
                    }
                    callback({
                        requestHeaders,
                    });
                } catch {
                    callback({
                        requestHeaders: details.requestHeaders,
                    });
                }
            },
        );

        mainWindow.on("close", (e) => {
            if (process.platform === "win32" && AppConfig.getConfig("normal.closeBehavior") === "minimize") {
                e.preventDefault();
                mainWindow.hide();
                mainWindow.setSkipTaskbar(true);
            }
        });

        // 5. 更新thumbbar
        ThumbBarUtil.setThumbBarButtons(mainWindow, false);
        WindowManager.mainWindow = mainWindow;

        // 6. 发出信号
        this.emit("WindowCreated", {
            windowName: "main",
            browserWindow: mainWindow,
        });
    }

    public showMainWindow() {
        if (!WindowManager.mainWindow || WindowManager.mainWindow.isDestroyed()) {
            this.createMainWindow();
        }

        const mainWindow = WindowManager.mainWindow;

        if (mainWindow.isMinimized()) {
            mainWindow.restore();
        } else if (mainWindow.isVisible()) {
            mainWindow.focus();
        } else {
            mainWindow.show();
        }
        mainWindow.moveTop();
        mainWindow.setSkipTaskbar(false);

        if (process.platform === "win32") {
            const appState = messageBus.getAppState();
            ThumbBarUtil.setThumbBarButtons(mainWindow, appState.playerState === PlayerState.Playing);
        }
    }

    public closeMainWindow() {
        WindowManager.mainWindow.close();
        WindowManager.mainWindow = null;
    }

    /**************************** Lyric Window ***************************/
    private static lyricWindowMinSize: ICommon.ISize = {
        width: 920,
        height: 92, // 60 + 16 * 2
    };
    private static lyricWindowMaxSize: ICommon.ISize = {
        width: Infinity,
        height: 240, // 60 + 80 * 2
    };

    private formatLyricWindowSize(width?: number, height?: number): ICommon.ISize {
        return {
            width: Math.min(Math.max(width ?? Infinity, WindowManager.lyricWindowMinSize.width), WindowManager.lyricWindowMaxSize.width),
            height: Math.min(Math.max(height ?? Infinity, WindowManager.lyricWindowMinSize.height), WindowManager.lyricWindowMaxSize.height),
        };
    }

    private evaluateWindowHeight() {
        const fontSize = AppConfig.getConfig("lyric.fontSize") || 54;
        return 60 + fontSize * 2;
    }

    private createLyricWindow() {
        const initPosition = AppConfig.getConfig("private.lyricWindowPosition");
        const initSize = AppConfig.getConfig("private.lyricWindowSize");

        let {
            width,
            height,
        } = this.formatLyricWindowSize(initSize?.width ?? WindowManager.lyricWindowMinSize.width, this.evaluateWindowHeight());

        const lyricWindow = new BrowserWindow({
            height,
            width,
            x: initPosition?.x,
            y: initPosition?.y,
            transparent: true,
            webPreferences: {
                preload: LRC_WINDOW_PRELOAD_WEBPACK_ENTRY,
                nodeIntegration: true,
                webSecurity: false,
                sandbox: false,
            },
            minWidth: WindowManager.lyricWindowMinSize.width,
            minHeight: WindowManager.lyricWindowMinSize.height,
            maxHeight: WindowManager.lyricWindowMaxSize.height,
            resizable: true,
            frame: false,
            skipTaskbar: true,
            alwaysOnTop: true,
            icon: nativeImage.createFromPath(getResourcePath(ResourceName.LOGO_IMAGE)),
        });

        const display = screen.getDisplayNearestPoint(lyricWindow.getBounds());
        WindowManager.lyricWindowMaxSize.width = display.bounds.width;
        lyricWindow.setMaximumSize(WindowManager.lyricWindowMaxSize.width, WindowManager.lyricWindowMaxSize.height);

        // and load the index.html of the app.
        lyricWindow.loadURL(LRC_WINDOW_WEBPACK_ENTRY);

        if (!app.isPackaged) {
            // Open the DevTools.
            lyricWindow.webContents.openDevTools();
        }

        // 设置窗口可拖拽
        WindowDrag.setWindowDraggable(lyricWindow, {
            width, // 实际不生效
            height, // 实际不生效
            getWindowSize() {
                return {
                    width,
                    height,
                };
            },
            onDragEnd(point) {
                AppConfig.setConfig({
                    "private.lyricWindowPosition": point,
                });
                const currentDisplayBounds =
                    screen.getDisplayNearestPoint(point).bounds;
                if (currentDisplayBounds.width !== WindowManager.lyricWindowMaxSize.width) {
                    WindowManager.lyricWindowMaxSize.width = currentDisplayBounds.width;
                    lyricWindow.setMaximumSize(WindowManager.lyricWindowMaxSize.width, WindowManager.lyricWindowMaxSize.height);
                }
            },
        });

        const updateCallback = (patch: IAppConfig, _: any, from: "main" | "renderer") => {
            if (from === "renderer") {
                if (patch["lyric.fontSize"]) {
                    height = this.evaluateWindowHeight();
                    lyricWindow.setSize(width, height);
                }
            }
        };
        AppConfig.onConfigUpdated(updateCallback);
        lyricWindow.on("closed", () => {
            AppConfig.offConfigUpdated(updateCallback);
        });


        lyricWindow.on("resize", () => {
            const [wWidth, wHeight] = lyricWindow.getSize();
            const fontSize = Math.max(Math.min(Math.floor((height - 60) / 2), 80), 16);
            AppConfig.setConfig({
                "lyric.fontSize": fontSize,
                "private.lyricWindowSize": {
                    width,
                    height,
                },
            });
            width = wWidth;
            height = wHeight;

        });

        // 初始化设置
        lyricWindow.once("ready-to-show", async () => {
            const position = AppConfig.getConfig("private.lyricWindowPosition");
            if (position) {
                this.normalizeWindowPosition(lyricWindow, position, async (position) => {
                    AppConfig.setConfig({
                        "private.lyricWindowPosition": position,
                    });
                });
            }

            const lockState = AppConfig.getConfig("lyric.lockLyric");

            if (lockState) {
                lyricWindow.setIgnoreMouseEvents(true, {
                    forward: true,
                });
            }
        });

        if (process.platform === "darwin") {
            // @ts-ignore ignore error in windows legacy
            lyricWindow.invalidateShadow();
        }

        WindowManager.lrcWindow = lyricWindow;
        this.emit("WindowCreated", {
            windowName: "lyric",
            browserWindow: lyricWindow,
        });
    }


    public showLyricWindow() {
        if (!WindowManager.lrcWindow) {
            this.createLyricWindow();
        }

        const lrcWindow = WindowManager.lrcWindow;

        lrcWindow.show();
        AppConfig.setConfig({
            "lyric.enableDesktopLyric": true,
        });

    }

    public closeLyricWindow() {
        WindowManager.lrcWindow?.close();
        WindowManager.lrcWindow = null;
        AppConfig.setConfig({
            "lyric.enab
Download .txt
gitextract_9squytp3/

├── .github/
│   ├── PULL_REQUEST_TEMPLATE.md
│   └── workflows/
│       ├── build.yml
│       └── release.yml
├── .gitignore
├── .husky/
│   └── pre-commit
├── .vscode/
│   └── settings.json
├── LICENSE
├── README.md
├── changelog.md
├── config/
│   ├── webpack.main.config.ts
│   ├── webpack.plugins.ts
│   ├── webpack.renderer.config.ts
│   └── webpack.rules.ts
├── eslint.config.mjs
├── forge.config.ts
├── package.json
├── release/
│   ├── build-windows.iss
│   └── version.json
├── res/
│   ├── .service/
│   │   └── request-forwarder.js
│   ├── lang/
│   │   ├── en-US.json
│   │   ├── zh-CN.json
│   │   └── zh-TW.json
│   └── logo.icns
├── scripts/
│   └── feishu-upload.js
├── src/
│   ├── common/
│   │   ├── async-memoize.ts
│   │   ├── camel-to-snake.ts
│   │   ├── constant.ts
│   │   ├── debounce.ts
│   │   ├── event-wrapper.ts
│   │   ├── file-util.ts
│   │   ├── get-resource-path.ts
│   │   ├── index-map.ts
│   │   ├── is-renderer.ts
│   │   ├── media-util.ts
│   │   ├── normalize-util.ts
│   │   ├── safe-serialization.ts
│   │   ├── store.ts
│   │   ├── thumb-bar-util.ts
│   │   ├── time-util.ts
│   │   ├── unique-map.ts
│   │   └── void-callback.ts
│   ├── hooks/
│   │   ├── useAppConfig.ts
│   │   ├── useLocalFonts.ts
│   │   ├── useMediaDevices.ts
│   │   ├── useMounted.ts
│   │   ├── useStateRef.ts
│   │   └── useVirtualList.ts
│   ├── main/
│   │   ├── deep-link/
│   │   │   └── index.ts
│   │   ├── index.ts
│   │   ├── native_modules/
│   │   │   └── TaskbarThumbnailManager/
│   │   │       ├── TaskbarThumbnailManager.node
│   │   │       └── TaskbarThumbnailManager.node.d.ts
│   │   ├── tray-manager/
│   │   │   └── index.ts
│   │   └── window-manager/
│   │       └── index.ts
│   ├── preload/
│   │   ├── common-preload.ts
│   │   ├── extension.ts
│   │   └── index.ts
│   ├── renderer/
│   │   ├── app.scss
│   │   ├── app.tsx
│   │   ├── components/
│   │   │   ├── A/
│   │   │   │   └── index.tsx
│   │   │   ├── AnimatedDiv/
│   │   │   │   └── index.tsx
│   │   │   ├── ArtistItem/
│   │   │   │   ├── index.scss
│   │   │   │   └── index.tsx
│   │   │   ├── BottomLoadingState/
│   │   │   │   ├── index.scss
│   │   │   │   └── index.tsx
│   │   │   ├── Checkbox/
│   │   │   │   ├── index.scss
│   │   │   │   └── index.tsx
│   │   │   ├── Condition/
│   │   │   │   └── index.tsx
│   │   │   ├── ContextMenu/
│   │   │   │   ├── index.scss
│   │   │   │   └── index.tsx
│   │   │   ├── DragReceiver/
│   │   │   │   ├── index.scss
│   │   │   │   └── index.tsx
│   │   │   ├── Empty/
│   │   │   │   ├── index.scss
│   │   │   │   └── index.tsx
│   │   │   ├── Header/
│   │   │   │   ├── index.scss
│   │   │   │   ├── index.tsx
│   │   │   │   └── widgets/
│   │   │   │       ├── Navigator/
│   │   │   │       │   ├── index.scss
│   │   │   │       │   └── index.tsx
│   │   │   │       └── SearchHistory/
│   │   │   │           ├── index.scss
│   │   │   │           └── index.tsx
│   │   │   ├── Loading/
│   │   │   │   ├── index.scss
│   │   │   │   └── index.tsx
│   │   │   ├── Modal/
│   │   │   │   ├── index.tsx
│   │   │   │   └── templates/
│   │   │   │       ├── AddMusicToSheet/
│   │   │   │       │   ├── index.scss
│   │   │   │       │   └── index.tsx
│   │   │   │       ├── AddNewSheet/
│   │   │   │       │   └── index.tsx
│   │   │   │       ├── Base/
│   │   │   │       │   ├── index.scss
│   │   │   │       │   └── index.tsx
│   │   │   │       ├── ExitConfirm/
│   │   │   │       │   ├── index.scss
│   │   │   │       │   └── index.tsx
│   │   │   │       ├── ImportMusicSheet/
│   │   │   │       │   ├── index.scss
│   │   │   │       │   └── index.tsx
│   │   │   │       ├── PluginSubscription/
│   │   │   │       │   ├── index.scss
│   │   │   │       │   └── index.tsx
│   │   │   │       ├── Reconfirm/
│   │   │   │       │   ├── index.scss
│   │   │   │       │   └── index.tsx
│   │   │   │       ├── SearchLyric/
│   │   │   │       │   ├── hooks/
│   │   │   │       │   │   ├── searchResultStore.ts
│   │   │   │       │   │   └── useSearchLyric.ts
│   │   │   │       │   ├── index.scss
│   │   │   │       │   ├── index.tsx
│   │   │   │       │   ├── searchResult.scss
│   │   │   │       │   └── searchResult.tsx
│   │   │   │       ├── SelectOne/
│   │   │   │       │   ├── index.scss
│   │   │   │       │   └── index.tsx
│   │   │   │       ├── SimpleInputWithState/
│   │   │   │       │   ├── index.scss
│   │   │   │       │   └── index.tsx
│   │   │   │       ├── Sparkles/
│   │   │   │       │   ├── index.scss
│   │   │   │       │   └── index.tsx
│   │   │   │       ├── Update/
│   │   │   │       │   ├── index.scss
│   │   │   │       │   └── index.tsx
│   │   │   │       ├── WatchLocalDir/
│   │   │   │       │   ├── index.scss
│   │   │   │       │   └── index.tsx
│   │   │   │       └── index.ts
│   │   │   ├── MusicBar/
│   │   │   │   ├── index.scss
│   │   │   │   ├── index.tsx
│   │   │   │   └── widgets/
│   │   │   │       ├── Controller/
│   │   │   │       │   ├── index.scss
│   │   │   │       │   └── index.tsx
│   │   │   │       ├── Extra/
│   │   │   │       │   ├── index.scss
│   │   │   │       │   └── index.tsx
│   │   │   │       ├── MusicInfo/
│   │   │   │       │   ├── index.scss
│   │   │   │       │   └── index.tsx
│   │   │   │       └── Slider/
│   │   │   │           ├── index.scss
│   │   │   │           └── index.tsx
│   │   │   ├── MusicDetail/
│   │   │   │   ├── index.scss
│   │   │   │   ├── index.tsx
│   │   │   │   ├── store.ts
│   │   │   │   └── widgets/
│   │   │   │       ├── Header/
│   │   │   │       │   ├── index.scss
│   │   │   │       │   └── index.tsx
│   │   │   │       └── Lyric/
│   │   │   │           ├── index.scss
│   │   │   │           └── index.tsx
│   │   │   ├── MusicDownloaded/
│   │   │   │   ├── index.scss
│   │   │   │   └── index.tsx
│   │   │   ├── MusicFavorite/
│   │   │   │   └── index.tsx
│   │   │   ├── MusicList/
│   │   │   │   ├── index.scss
│   │   │   │   └── index.tsx
│   │   │   ├── MusicSheetlikeItem/
│   │   │   │   ├── index.scss
│   │   │   │   └── index.tsx
│   │   │   ├── MusicSheetlikeList/
│   │   │   │   ├── index.scss
│   │   │   │   └── index.tsx
│   │   │   ├── MusicSheetlikeView/
│   │   │   │   ├── components/
│   │   │   │   │   ├── Body/
│   │   │   │   │   │   ├── index.scss
│   │   │   │   │   │   └── index.tsx
│   │   │   │   │   └── Header/
│   │   │   │   │       ├── index.scss
│   │   │   │   │       └── index.tsx
│   │   │   │   ├── index.scss
│   │   │   │   ├── index.tsx
│   │   │   │   └── store.ts
│   │   │   ├── NoPlugin/
│   │   │   │   ├── index.scss
│   │   │   │   └── index.tsx
│   │   │   ├── Panel/
│   │   │   │   ├── index.tsx
│   │   │   │   └── templates/
│   │   │   │       ├── Base/
│   │   │   │       │   ├── index.scss
│   │   │   │       │   └── index.tsx
│   │   │   │       ├── MusicComment/
│   │   │   │       │   ├── index.scss
│   │   │   │       │   ├── index.tsx
│   │   │   │       │   └── useComment.ts
│   │   │   │       ├── PlayList/
│   │   │   │       │   ├── index.scss
│   │   │   │       │   └── index.tsx
│   │   │   │       ├── UserVariables/
│   │   │   │       │   ├── index.scss
│   │   │   │       │   └── index.tsx
│   │   │   │       └── index.ts
│   │   │   ├── SvgAsset/
│   │   │   │   └── index.tsx
│   │   │   ├── SwitchCase/
│   │   │   │   └── index.tsx
│   │   │   └── Tag/
│   │   │       ├── index.scss
│   │   │       └── index.tsx
│   │   ├── core/
│   │   │   ├── backup-resume/
│   │   │   │   └── index.ts
│   │   │   ├── db/
│   │   │   │   └── music-sheet-db.ts
│   │   │   ├── downloader/
│   │   │   │   ├── downloaded-sheet.ts
│   │   │   │   ├── ee.ts
│   │   │   │   ├── index.new.ts
│   │   │   │   ├── index.ts
│   │   │   │   └── store.ts
│   │   │   ├── link-lyric/
│   │   │   │   └── index.ts
│   │   │   ├── local-music/
│   │   │   │   ├── index.ts
│   │   │   │   └── store.ts
│   │   │   ├── music-sheet/
│   │   │   │   ├── backend/
│   │   │   │   │   └── index.ts
│   │   │   │   ├── common/
│   │   │   │   │   └── default-sheet.ts
│   │   │   │   ├── frontend/
│   │   │   │   │   ├── index.old.ts
│   │   │   │   │   └── index.ts
│   │   │   │   └── index.ts
│   │   │   ├── recently-playlist/
│   │   │   │   └── index.ts
│   │   │   └── track-player/
│   │   │       ├── controller/
│   │   │       │   ├── audio-controller.ts
│   │   │       │   └── controller-base.ts
│   │   │       ├── enum.ts
│   │   │       ├── hooks.ts
│   │   │       ├── index.ts
│   │   │       └── store.ts
│   │   ├── document/
│   │   │   ├── bootstrap.ts
│   │   │   ├── fallback.tsx
│   │   │   ├── index.html
│   │   │   ├── index.tsx
│   │   │   ├── styles/
│   │   │   │   ├── base.scss
│   │   │   │   ├── components.scss
│   │   │   │   ├── fallback.scss
│   │   │   │   ├── index.scss
│   │   │   │   ├── tables.scss
│   │   │   │   ├── utilities.scss
│   │   │   │   └── variables.scss
│   │   │   └── useBootstrap.ts
│   │   ├── pages/
│   │   │   └── main-page/
│   │   │       ├── components/
│   │   │       │   └── SideBar/
│   │   │       │       ├── index.scss
│   │   │       │       ├── index.tsx
│   │   │       │       └── widgets/
│   │   │       │           ├── ListItem/
│   │   │       │           │   ├── index.scss
│   │   │       │           │   └── index.tsx
│   │   │       │           ├── MySheets/
│   │   │       │           │   ├── index.scss
│   │   │       │           │   └── index.tsx
│   │   │       │           └── StarredSheets/
│   │   │       │               ├── index.scss
│   │   │       │               └── index.tsx
│   │   │       ├── index.scss
│   │   │       ├── index.tsx
│   │   │       └── views/
│   │   │           ├── album-view/
│   │   │           │   ├── hooks/
│   │   │           │   │   └── useAlbumDetail.ts
│   │   │           │   ├── index.scss
│   │   │           │   └── index.tsx
│   │   │           ├── artist-view/
│   │   │           │   ├── components/
│   │   │           │   │   ├── Body/
│   │   │           │   │   │   ├── index.scss
│   │   │           │   │   │   ├── index.tsx
│   │   │           │   │   │   └── widgets/
│   │   │           │   │   │       ├── AlbumResult/
│   │   │           │   │   │       │   ├── index.scss
│   │   │           │   │   │       │   └── index.tsx
│   │   │           │   │   │       └── MusicResult/
│   │   │           │   │   │           └── index.tsx
│   │   │           │   │   └── Header/
│   │   │           │   │       ├── index.scss
│   │   │           │   │       └── index.tsx
│   │   │           │   ├── hooks/
│   │   │           │   │   └── useQueryArtist.ts
│   │   │           │   ├── index.scss
│   │   │           │   ├── index.tsx
│   │   │           │   └── store/
│   │   │           │       └── index.ts
│   │   │           ├── download-view/
│   │   │           │   ├── components/
│   │   │           │   │   ├── Downloaded/
│   │   │           │   │   │   └── index.tsx
│   │   │           │   │   └── Downloading/
│   │   │           │   │       ├── DownloadStatus.tsx
│   │   │           │   │       ├── index.scss
│   │   │           │   │       └── index.tsx
│   │   │           │   ├── index.scss
│   │   │           │   └── index.tsx
│   │   │           ├── local-music-view/
│   │   │           │   ├── index.scss
│   │   │           │   ├── index.tsx
│   │   │           │   └── views/
│   │   │           │       ├── album/
│   │   │           │       │   ├── index.scss
│   │   │           │       │   └── index.tsx
│   │   │           │       ├── artist/
│   │   │           │       │   ├── index.scss
│   │   │           │       │   └── index.tsx
│   │   │           │       ├── folder/
│   │   │           │       │   ├── index.scss
│   │   │           │       │   └── index.tsx
│   │   │           │       └── list/
│   │   │           │           └── index.tsx
│   │   │           ├── music-sheet-view/
│   │   │           │   ├── index.scss
│   │   │           │   ├── index.tsx
│   │   │           │   ├── local-sheet/
│   │   │           │   │   └── index.tsx
│   │   │           │   ├── remote-sheet/
│   │   │           │   │   ├── hooks/
│   │   │           │   │   │   └── usePluginSheetMusicList.ts
│   │   │           │   │   └── index.tsx
│   │   │           │   └── store/
│   │   │           │       └── musicSheetStore.ts
│   │   │           ├── plugin-manager-view/
│   │   │           │   ├── components/
│   │   │           │   │   └── plugin-table/
│   │   │           │   │       ├── index.scss
│   │   │           │   │       └── index.tsx
│   │   │           │   ├── index.scss
│   │   │           │   └── index.tsx
│   │   │           ├── recently-play-view/
│   │   │           │   └── index.tsx
│   │   │           ├── recommend-sheets-view/
│   │   │           │   ├── components/
│   │   │           │   │   └── Body/
│   │   │           │   │       ├── index.scss
│   │   │           │   │       ├── index.tsx
│   │   │           │   │       ├── tag-panel.scss
│   │   │           │   │       └── tag-panel.tsx
│   │   │           │   ├── hooks/
│   │   │           │   │   ├── useRecommendListTags.ts
│   │   │           │   │   └── useRecommendSheets.ts
│   │   │           │   └── index.tsx
│   │   │           ├── search-view/
│   │   │           │   ├── components/
│   │   │           │   │   └── SearchResult/
│   │   │           │   │       ├── AlbumResult/
│   │   │           │   │       │   ├── index.scss
│   │   │           │   │       │   └── index.tsx
│   │   │           │   │       ├── ArtistResult/
│   │   │           │   │       │   ├── index.scss
│   │   │           │   │       │   └── index.tsx
│   │   │           │   │       ├── MusicResult/
│   │   │           │   │       │   └── index.tsx
│   │   │           │   │       ├── SheetResult/
│   │   │           │   │       │   ├── index.scss
│   │   │           │   │       │   └── index.tsx
│   │   │           │   │       ├── index.scss
│   │   │           │   │       └── index.tsx
│   │   │           │   ├── hooks/
│   │   │           │   │   └── useSearch.ts
│   │   │           │   ├── index.scss
│   │   │           │   ├── index.tsx
│   │   │           │   └── store/
│   │   │           │       └── search-result.ts
│   │   │           ├── setting-view/
│   │   │           │   ├── components/
│   │   │           │   │   ├── CheckBoxSettingItem/
│   │   │           │   │   │   └── index.tsx
│   │   │           │   │   ├── ColorPickerSettingItem/
│   │   │           │   │   │   ├── index.scss
│   │   │           │   │   │   └── index.tsx
│   │   │           │   │   ├── FontPickerSettingItem/
│   │   │           │   │   │   ├── index.scss
│   │   │           │   │   │   └── index.tsx
│   │   │           │   │   ├── InputSettingItem/
│   │   │           │   │   │   ├── index.scss
│   │   │           │   │   │   └── index.tsx
│   │   │           │   │   ├── ListBoxSettingItem/
│   │   │           │   │   │   ├── index.scss
│   │   │           │   │   │   └── index.tsx
│   │   │           │   │   ├── MultiRadioGroupSettingItem/
│   │   │           │   │   │   ├── index.scss
│   │   │           │   │   │   └── index.tsx
│   │   │           │   │   ├── PathSettingItem/
│   │   │           │   │   │   ├── index.scss
│   │   │           │   │   │   └── index.tsx
│   │   │           │   │   └── RadioGroupSettingItem/
│   │   │           │   │       ├── index.scss
│   │   │           │   │       └── index.tsx
│   │   │           │   ├── index.scss
│   │   │           │   ├── index.tsx
│   │   │           │   └── routers/
│   │   │           │       ├── About/
│   │   │           │       │   ├── index.scss
│   │   │           │       │   └── index.tsx
│   │   │           │       ├── Backup/
│   │   │           │       │   ├── index.scss
│   │   │           │       │   └── index.tsx
│   │   │           │       ├── Download/
│   │   │           │       │   ├── index.scss
│   │   │           │       │   └── index.tsx
│   │   │           │       ├── Lyric/
│   │   │           │       │   ├── index.scss
│   │   │           │       │   └── index.tsx
│   │   │           │       ├── Network/
│   │   │           │       │   ├── index.scss
│   │   │           │       │   └── index.tsx
│   │   │           │       ├── Normal/
│   │   │           │       │   ├── index.scss
│   │   │           │       │   └── index.tsx
│   │   │           │       ├── PlayMusic/
│   │   │           │       │   ├── index.scss
│   │   │           │       │   └── index.tsx
│   │   │           │       ├── Plugin/
│   │   │           │       │   ├── index.scss
│   │   │           │       │   └── index.tsx
│   │   │           │       ├── ShortCut/
│   │   │           │       │   ├── index.scss
│   │   │           │       │   └── index.tsx
│   │   │           │       └── index.ts
│   │   │           ├── theme-view/
│   │   │           │   ├── components/
│   │   │           │   │   ├── LocalThemes/
│   │   │           │   │   │   ├── index.scss
│   │   │           │   │   │   └── index.tsx
│   │   │           │   │   ├── RemoteThemes/
│   │   │           │   │   │   ├── hooks/
│   │   │           │   │   │   │   └── useRemoteThemes.ts
│   │   │           │   │   │   ├── index.scss
│   │   │           │   │   │   └── index.tsx
│   │   │           │   │   └── ThemeItem/
│   │   │           │   │       ├── index.scss
│   │   │           │   │       └── index.tsx
│   │   │           │   ├── index.scss
│   │   │           │   └── index.tsx
│   │   │           ├── toplist-detail-view/
│   │   │           │   ├── hooks/
│   │   │           │   │   └── useTopListDetail.ts
│   │   │           │   └── index.tsx
│   │   │           └── toplist-view/
│   │   │               ├── hooks/
│   │   │               │   └── useGetTopList.ts
│   │   │               ├── index.scss
│   │   │               ├── index.tsx
│   │   │               └── store/
│   │   │                   └── index.ts
│   │   └── utils/
│   │       ├── check-update.ts
│   │       ├── classnames.ts
│   │       ├── create-tmp-file.ts
│   │       ├── get-text-width.ts
│   │       ├── get-url-ext.ts
│   │       ├── groupBy.ts
│   │       ├── img-on-error.ts
│   │       ├── is-local-music.ts
│   │       ├── lyric-parser.ts
│   │       ├── preload-util.ts
│   │       ├── raf2.ts
│   │       ├── search-history.ts
│   │       └── user-perference.ts
│   ├── renderer-lrc/
│   │   ├── document/
│   │   │   ├── bootstrap.ts
│   │   │   ├── index.html
│   │   │   ├── index.tsx
│   │   │   └── styles/
│   │   │       └── index.scss
│   │   └── pages/
│   │       ├── index.scss
│   │       └── index.tsx
│   ├── renderer-minimode/
│   │   ├── document/
│   │   │   ├── bootstrap.ts
│   │   │   ├── index.html
│   │   │   ├── index.tsx
│   │   │   └── styles/
│   │   │       └── index.scss
│   │   └── pages/
│   │       ├── index.scss
│   │       └── index.tsx
│   ├── shared/
│   │   ├── app-config/
│   │   │   ├── default-app-config.ts
│   │   │   ├── main.ts
│   │   │   ├── preload.ts
│   │   │   └── renderer.ts
│   │   ├── database/
│   │   │   ├── main.ts
│   │   │   ├── preload-backup.ts
│   │   │   ├── preload.ts
│   │   │   └── renderer.ts
│   │   ├── global-context/
│   │   │   ├── internal/
│   │   │   │   └── common.ts
│   │   │   ├── main.ts
│   │   │   ├── preload.ts
│   │   │   ├── renderer.ts
│   │   │   └── type.d.ts
│   │   ├── i18n/
│   │   │   ├── main.ts
│   │   │   ├── preload.ts
│   │   │   ├── renderer.ts
│   │   │   └── type.d.ts
│   │   ├── logger/
│   │   │   ├── main.ts
│   │   │   └── renderer.ts
│   │   ├── message-bus/
│   │   │   ├── main.ts
│   │   │   ├── preload/
│   │   │   │   ├── extension.ts
│   │   │   │   └── main.ts
│   │   │   ├── renderer/
│   │   │   │   ├── extension.ts
│   │   │   │   └── main.ts
│   │   │   └── type.d.ts
│   │   ├── plugin-manager/
│   │   │   ├── main/
│   │   │   │   ├── index.ts
│   │   │   │   ├── internal-plugins/
│   │   │   │   │   └── local-plugin.ts
│   │   │   │   ├── plugin-methods.ts
│   │   │   │   ├── plugin.ts
│   │   │   │   └── polyfill/
│   │   │   │       ├── react-native-cookies.ts
│   │   │   │       └── storage.ts
│   │   │   ├── preload.ts
│   │   │   └── renderer.ts
│   │   ├── service-manager/
│   │   │   ├── common.ts
│   │   │   ├── main.ts
│   │   │   ├── preload.ts
│   │   │   └── renderer.ts
│   │   ├── short-cut/
│   │   │   ├── main.ts
│   │   │   ├── preload.ts
│   │   │   └── renderer.ts
│   │   ├── themepack/
│   │   │   ├── main.ts
│   │   │   ├── preload.ts
│   │   │   ├── renderer.ts
│   │   │   └── type.d.ts
│   │   ├── utils/
│   │   │   ├── main.ts
│   │   │   ├── preload.ts
│   │   │   └── renderer.ts
│   │   └── window-drag/
│   │       ├── main.ts
│   │       ├── preload.ts
│   │       └── renderer.ts
│   ├── types/
│   │   ├── app-config.d.ts
│   │   ├── assets.d.ts
│   │   ├── audio-controller.d.ts
│   │   ├── common.d.ts
│   │   ├── main/
│   │   │   └── window-manager.d.ts
│   │   ├── media.d.ts
│   │   ├── model.d.ts
│   │   ├── plugin.d.ts
│   │   ├── preload.d.ts
│   │   ├── user-perference.d.ts
│   │   └── window.d.ts
│   └── webworkers/
│       ├── db-worker/
│       │   ├── const.ts
│       │   ├── index.ts
│       │   └── utils.ts
│       ├── db-worker.ts
│       ├── downloader.ts
│       └── local-file-watcher.ts
└── tsconfig.json
Download .txt
SYMBOL INDEX (941 symbols across 248 files)

FILE: config/webpack.plugins.ts
  method apply (line 12) | apply(compiler: any) {

FILE: res/.service/request-forwarder.js
  function forwardRequest (line 10) | function forwardRequest(clientRes, url, method, headers) {
  function safeParse (line 51) | function safeParse(data) {
  function startServer (line 60) | function startServer(port) {

FILE: scripts/feishu-upload.js
  class FeishuFileUploader (line 11) | class FeishuFileUploader {
    method constructor (line 12) | constructor(appId, appSecret, tenantAccessToken = null) {
    method getTenantAccessToken (line 31) | async getTenantAccessToken() {
    method calculateAdler32 (line 74) | calculateAdler32(buffer) {
    method delay (line 103) | delay(ms) {
    method withRetry (line 110) | async withRetry(operation, operationName) {
    method isRetryableError (line 139) | isRetryableError(error) {
    method uploadSmallFile (line 155) | async uploadSmallFile(filePath, fileName, parentNode) {
    method uploadPrepare (line 179) | async uploadPrepare(fileName, parentNode, fileSize) {
    method uploadPart (line 201) | async uploadPart(uploadId, seq, chunkBuffer) {
    method uploadFinish (line 233) | async uploadFinish(uploadId, blockNum) {
    method uploadLargeFile (line 255) | async uploadLargeFile(filePath, fileName, parentNode) {
    method uploadFile (line 300) | async uploadFile(filePath, fileName, parentNode) {
  function main (line 339) | async function main() {

FILE: src/common/async-memoize.ts
  function asyncMemoize (line 2) | function asyncMemoize<R, T extends (...args: any[]) => Promise<R>>(callb...

FILE: src/common/camel-to-snake.ts
  function camelToSnake (line 1) | function camelToSnake(camelCaseStr: string): string {

FILE: src/common/constant.ts
  type RequestStateCode (line 30) | enum RequestStateCode {
  type IShortCutKeys (line 81) | type IShortCutKeys = keyof IAppConfig["shortCut.shortcuts"];
  type ResourceName (line 107) | enum ResourceName {
  type DownloadState (line 118) | enum DownloadState {
  type TrackPlayerSyncType (line 144) | enum TrackPlayerSyncType {
  type PlayerState (line 155) | enum PlayerState {
  type RepeatMode (line 167) | enum RepeatMode {
  type WindowType (line 178) | enum WindowType {
  type WindowRole (line 184) | enum WindowRole {

FILE: src/common/event-wrapper.ts
  class EventWrapper (line 4) | class EventWrapper<EventTypes> {
    method constructor (line 7) | constructor() {
    method on (line 16) | on<T extends EventTypes, K extends keyof T & (string | symbol)>(
    method once (line 23) | once<T extends EventTypes, K extends keyof T & (string | symbol)>(
    method emit (line 30) | emit<T extends EventTypes, K extends keyof T & (string | symbol)>(
    method off (line 37) | off<T extends EventTypes, K extends keyof T & (string | symbol)>(
    method use (line 44) | use<T extends EventTypes, K extends keyof T & (string | symbol)>(

FILE: src/common/file-util.ts
  function getB64Picture (line 9) | function getB64Picture(picture: IPicture) {
  function parseLocalMusicItem (line 15) | async function parseLocalMusicItem(
  function parseLocalMusicItemFolder (line 100) | async function parseLocalMusicItemFolder(
  function addFileScheme (line 127) | function addFileScheme(filePath: string) {
  function addTailSlash (line 133) | function addTailSlash(filePath: string) {
  function safeStat (line 139) | async function safeStat(

FILE: src/common/index-map.ts
  type IIndexMap (line 1) | interface IIndexMap {
  function createIndexMap (line 7) | function createIndexMap(mediaItems?: IMedia.IMediaBase[]): IIndexMap {

FILE: src/common/is-renderer.ts
  function isRenderer (line 1) | function isRenderer() {

FILE: src/common/media-util.ts
  function isSameMedia (line 11) | function isSameMedia(
  function resetMediaItem (line 21) | function resetMediaItem<T extends IMedia.IMediaBase>(
  function getMediaPrimaryKey (line 42) | function getMediaPrimaryKey(mediaItem: IMedia.IUnique) {
  function sortByTimestampAndIndex (line 49) | function sortByTimestampAndIndex(array: any[], newArray = false) {
  function addSortProperty (line 62) | function addSortProperty(
  function flatMediaItem (line 83) | function flatMediaItem<T extends IMedia.IMediaBase>(mediaItem: T) {
  function removeInternalProperties (line 96) | function removeInternalProperties<T extends IMedia.IMediaBase>(
  function getQualityOrder (line 118) | function getQualityOrder(
  function getInternalData (line 139) | function getInternalData<
  function setInternalData (line 149) | function setInternalData<
  function toMediaBase (line 169) | function toMediaBase(media: IMedia.IMediaBase) {

FILE: src/common/normalize-util.ts
  function normalizeNumberCN (line 1) | function normalizeNumberCN(number: number): string {
  function normalizeNumberEN (line 13) | function normalizeNumberEN(number: number): string {
  function normalizeNumber (line 30) | function normalizeNumber(number: number, en?: boolean): string {
  function addRandomHash (line 39) | function addRandomHash(url: string) {
  function encodeUrlHeaders (line 47) | function encodeUrlHeaders(
  function isBetween (line 66) | function isBetween(target: number, a: number, b: number) {
  function isBasicType (line 73) | function isBasicType(val: unknown) {
  function normalizeFileSize (line 88) | function normalizeFileSize(bytes: number) {

FILE: src/common/safe-serialization.ts
  function safeStringify (line 1) | function safeStringify(object: object) {
  function safeParse (line 9) | function safeParse(str: string) {

FILE: src/common/store.ts
  class StateMapper (line 4) | class StateMapper<T> {
    method constructor (line 7) | constructor(getFun: () => T) {
  type UpdateFunc (line 31) | type UpdateFunc<T> = (prev: T) => T;
  class Store (line 33) | class Store<T> {
    method constructor (line 38) | constructor(initValue: T) {
  function useStore (line 74) | function useStore<T>(store: Store<T>) {

FILE: src/common/thumb-bar-util.ts
  function setThumbBarButtons (line 20) | function setThumbBarButtons(window: BrowserWindow, isPlaying?: boolean) {
  function setThumbImage (line 70) | async function setThumbImage(window: BrowserWindow, src: string) {

FILE: src/common/time-util.ts
  function secondsToDuration (line 1) | function secondsToDuration(seconds: number | string) {
  function delay (line 18) | function delay(millsecond: number) {

FILE: src/common/unique-map.ts
  type IUniqueMap (line 1) | interface IUniqueMap {
  function createUniqueMap (line 8) | function createUniqueMap(mediaItems?: IMedia.IMediaBase[]): IUniqueMap {

FILE: src/hooks/useAppConfig.ts
  function useAppConfig (line 6) | function useAppConfig<K extends keyof IAppConfig>(configKey: K): IAppCon...

FILE: src/hooks/useLocalFonts.ts
  function initFonts (line 6) | async function initFonts() {
  function useLocalFonts (line 20) | function useLocalFonts() {

FILE: src/hooks/useMediaDevices.ts
  function useOutputAudioDevices (line 3) | function useOutputAudioDevices() {

FILE: src/hooks/useMounted.ts
  function useMounted (line 3) | function useMounted(){

FILE: src/hooks/useStateRef.ts
  function useStateRef (line 3) | function useStateRef<T>(initValue: T) {

FILE: src/hooks/useVirtualList.ts
  type IVirtualListProps (line 10) | interface IVirtualListProps<T> {
  type IVirtualItem (line 28) | interface IVirtualItem<T> {
  function useVirtualList (line 37) | function useVirtualList<T>(props: IVirtualListProps<T>) {

FILE: src/main/deep-link/index.ts
  function handleDeepLink (line 7) | function handleDeepLink(url: string) {
  function handleMusicFreeScheme (line 22) | async function handleMusicFreeScheme(url: URL) {
  function handleBareUrl (line 38) | async function handleBareUrl(url: string) {

FILE: src/main/index.ts
  method getDefaultLang (line 102) | getDefaultLang() {
  method onLanguageChanged (line 105) | onLanguageChanged(lang) {
  function bootstrap (line 167) | async function bootstrap() {
  function handleProxy (line 258) | function handleProxy(enabled: boolean, host?: string | null, port?: stri...

FILE: src/main/native_modules/TaskbarThumbnailManager/TaskbarThumbnailManager.node.d.ts
  type ISize (line 2) | interface ISize {

FILE: src/main/tray-manager/index.ts
  method click (line 23) | click() {
  class TrayManager (line 60) | class TrayManager {
    method setup (line 70) | public setup(windowManager: IWindowManager) {
    method openMusicDetail (line 126) | private openMusicDetail() {
    method buildTrayMenu (line 131) | public async buildTrayMenu() {
    method setTitle (line 296) | public setTitle(title: string) {

FILE: src/main/window-manager/index.ts
  class WindowManager (line 27) | class WindowManager implements IWindowManager {
    method getMainWindow (line 34) | getMainWindow(): BrowserWindow {
    method mainWindow (line 38) | get mainWindow() {
    method lyricWindow (line 42) | get lyricWindow() {
    method miniModeWindow (line 46) | get miniModeWindow() {
    method getExtensionWindows (line 50) | getExtensionWindows(): BrowserWindow[] {
    method getAllWindows (line 61) | getAllWindows(): BrowserWindow[] {
    method emit (line 75) | private emit<T extends keyof IWindowEvents>(event: T, data: IWindowEve...
    method on (line 79) | public on<T extends keyof IWindowEvents>(event: T, listener: (data: IW...
    method createMainWindow (line 84) | private createMainWindow() {
    method showMainWindow (line 194) | public showMainWindow() {
    method closeMainWindow (line 217) | public closeMainWindow() {
    method formatLyricWindowSize (line 232) | private formatLyricWindowSize(width?: number, height?: number): ICommo...
    method evaluateWindowHeight (line 239) | private evaluateWindowHeight() {
    method createLyricWindow (line 244) | private createLyricWindow() {
    method showLyricWindow (line 372) | public showLyricWindow() {
    method closeLyricWindow (line 386) | public closeLyricWindow() {
    method createMiniModeWindow (line 395) | private createMiniModeWindow() {
    method showMiniModeWindow (line 458) | public showMiniModeWindow() {
    method closeMiniModeWindow (line 480) | public closeMiniModeWindow() {
    method normalizeWindowPosition (line 488) | private normalizeWindowPosition(window: BrowserWindow, position: IComm...

FILE: src/renderer-lrc/document/index.tsx
  function Root (line 16) | function Root() {

FILE: src/renderer-lrc/pages/index.tsx
  function LyricWindowPage (line 14) | function LyricWindowPage() {
  function LyricContent (line 138) | function LyricContent() {

FILE: src/renderer-minimode/document/index.tsx
  function Root (line 18) | function Root() {

FILE: src/renderer-minimode/pages/index.tsx
  function MinimodePage (line 13) | function MinimodePage() {

FILE: src/renderer/app.tsx
  function App (line 9) | function App() {

FILE: src/renderer/components/A/index.tsx
  function A (line 3) | function A(

FILE: src/renderer/components/AnimatedDiv/index.tsx
  type IProps (line 5) | interface IProps
  function AnimatedDiv (line 24) | function AnimatedDiv(props: IProps) {

FILE: src/renderer/components/ArtistItem/index.tsx
  type IArtistItemProps (line 6) | interface IArtistItemProps {
  function ArtistItem (line 11) | function ArtistItem(props: IArtistItemProps) {

FILE: src/renderer/components/BottomLoadingState/index.tsx
  type IProps (line 7) | interface IProps {
  function BottomLoadingState (line 12) | function BottomLoadingState(props: IProps) {

FILE: src/renderer/components/Checkbox/index.tsx
  type ICheckboxProps (line 5) | interface ICheckboxProps {
  function Checkbox (line 11) | function Checkbox(props: ICheckboxProps) {

FILE: src/renderer/components/Condition/index.tsx
  type IConditionProps (line 3) | interface IConditionProps {
  function Condition (line 10) | function Condition(props: IConditionProps) {
  type IIfProps (line 15) | interface IIfProps {
  type ICondProps (line 20) | interface ICondProps {
  function Truthy (line 23) | function Truthy(props: ICondProps) {
  function Falsy (line 27) | function Falsy(props: ICondProps) {
  function If (line 31) | function If(props: IIfProps) {
  function IfTruthy (line 66) | function IfTruthy(props: IIfProps) {
  function IfFalsy (line 72) | function IfFalsy(props: IIfProps) {

FILE: src/renderer/components/ContextMenu/index.tsx
  type IContextMenuItem (line 7) | interface IContextMenuItem {
  type IContextMenuData (line 22) | interface IContextMenuData {
  function showContextMenu (line 44) | function showContextMenu(
  function showCustomContextMenu (line 50) | function showCustomContextMenu(
  function hideContextMenu (line 59) | function hideContextMenu() {
  function SingleColumnContextMenuComponent (line 67) | function SingleColumnContextMenuComponent(props: IContextMenuData) {
  function ContextMenuComponent (line 159) | function ContextMenuComponent() {

FILE: src/renderer/components/DragReceiver/index.tsx
  type IDragReceiverProps (line 5) | interface IDragReceiverProps {
  function DragReceiver (line 18) | function DragReceiver(props: IDragReceiverProps) {
  function startDrag (line 66) | function startDrag(

FILE: src/renderer/components/Empty/index.tsx
  type IEmptyProps (line 5) | interface IEmptyProps {
  function Empty (line 9) | function Empty(props: IEmptyProps) {

FILE: src/renderer/components/Header/index.tsx
  function AppHeader (line 17) | function AppHeader() {

FILE: src/renderer/components/Header/widgets/Navigator/index.tsx
  function HeaderNavigator (line 7) | function HeaderNavigator() {

FILE: src/renderer/components/Header/widgets/SearchHistory/index.tsx
  type ISearchHistoryProps (line 13) | interface ISearchHistoryProps {
  function SearchHistory (line 19) | function SearchHistory(props: ISearchHistoryProps) {
  function useSearchHistory (line 83) | function useSearchHistory() {

FILE: src/renderer/components/Loading/index.tsx
  type ILoadingProps (line 4) | interface ILoadingProps {
  function Loading (line 7) | function Loading(props: ILoadingProps) {

FILE: src/renderer/components/Modal/index.tsx
  type ITemplate (line 5) | type ITemplate = typeof templates;
  type IModalType (line 6) | type IModalType = keyof ITemplate;
  type IModalInfo (line 8) | interface IModalInfo {
  function ModalComponent (line 18) | function ModalComponent() {
  function showModal (line 32) | function showModal<T extends keyof ITemplate>(
  function hideModal (line 42) | function hideModal() {

FILE: src/renderer/components/Modal/templates/AddMusicToSheet/index.tsx
  type IAddMusicToSheetProps (line 10) | interface IAddMusicToSheetProps {
  function AddMusicToSheet (line 14) | function AddMusicToSheet(props: IAddMusicToSheetProps) {

FILE: src/renderer/components/Modal/templates/AddNewSheet/index.tsx
  type IProps (line 9) | interface IProps {
  function AddNewSheet (line 13) | function AddNewSheet(props: IProps) {

FILE: src/renderer/components/Modal/templates/Base/index.tsx
  type IBaseModalProps (line 6) | interface IBaseModalProps {
  function Base (line 18) | function Base(props: IBaseModalProps) {
  type IHeaderProps (line 62) | interface IHeaderProps {
  function Header (line 65) | function Header(props: IHeaderProps) {

FILE: src/renderer/components/Modal/templates/ExitConfirm/index.tsx
  function ExitConfirm (line 5) | function ExitConfirm() {

FILE: src/renderer/components/Modal/templates/ImportMusicSheet/index.tsx
  type IProps (line 9) | interface IProps {
  function ImportMusicSheet (line 13) | function ImportMusicSheet(props: IProps) {

FILE: src/renderer/components/Modal/templates/PluginSubscription/index.tsx
  function PluginSubscription (line 14) | function PluginSubscription() {

FILE: src/renderer/components/Modal/templates/Reconfirm/index.tsx
  type IReconfirmProps (line 7) | interface IReconfirmProps {
  function Reconfirm (line 14) | function Reconfirm(props: IReconfirmProps) {

FILE: src/renderer/components/Modal/templates/SearchLyric/hooks/searchResultStore.ts
  type ISearchLyricResult (line 4) | interface ISearchLyricResult {
  type ISearchLyricStoreData (line 10) | interface ISearchLyricStoreData {

FILE: src/renderer/components/Modal/templates/SearchLyric/index.tsx
  type IProps (line 12) | interface IProps {
  function SearchLyric (line 18) | function SearchLyric(props: IProps) {

FILE: src/renderer/components/Modal/templates/SearchLyric/searchResult.tsx
  type ISearchResultProps (line 17) | interface ISearchResultProps {
  function SearchResult (line 22) | function SearchResult(props: ISearchResultProps) {

FILE: src/renderer/components/Modal/templates/SelectOne/index.tsx
  type IProps (line 10) | interface IProps {
  function SelectOne (line 22) | function SelectOne(props: IProps) {

FILE: src/renderer/components/Modal/templates/SimpleInputWithState/index.tsx
  type ISimpleInputWithStateProps (line 9) | interface ISimpleInputWithStateProps<PromiseItem> {
  function SimpleInputWithState (line 23) | function SimpleInputWithState<PromiseItem>(

FILE: src/renderer/components/Modal/templates/Sparkles/index.tsx
  function Sparkles (line 6) | function Sparkles() {

FILE: src/renderer/components/Modal/templates/Update/index.tsx
  type IUpdateProps (line 8) | interface IUpdateProps {
  function Update (line 12) | function Update(props: IUpdateProps) {

FILE: src/renderer/components/Modal/templates/WatchLocalDir/index.tsx
  function WatchLocalDir (line 18) | function WatchLocalDir() {

FILE: src/renderer/components/MusicBar/index.tsx
  function MusicBar (line 8) | function MusicBar() {

FILE: src/renderer/components/MusicBar/widgets/Controller/index.tsx
  function Controller (line 8) | function Controller() {

FILE: src/renderer/components/MusicBar/widgets/Extra/index.tsx
  function Extra (line 20) | function Extra() {
  function VolumeBtn (line 75) | function VolumeBtn() {
  function SpeedBtn (line 149) | function SpeedBtn() {
  function QualityBtn (line 216) | function QualityBtn() {
  function LyricBtn (line 286) | function LyricBtn() {

FILE: src/renderer/components/MusicBar/widgets/MusicInfo/index.tsx
  function MusicInfo (line 16) | function MusicInfo() {
  function Progress (line 113) | function Progress() {

FILE: src/renderer/components/MusicBar/widgets/Slider/index.tsx
  function Slider (line 6) | function Slider() {

FILE: src/renderer/components/MusicDetail/index.tsx
  function MusicDetail (line 17) | function MusicDetail() {

FILE: src/renderer/components/MusicDetail/widgets/Header/index.tsx
  function Header (line 9) | function Header() {

FILE: src/renderer/components/MusicDetail/widgets/Lyric/index.tsx
  function Lyric (line 22) | function Lyric() {
  type ILyricContextMenuProps (line 167) | interface ILyricContextMenuProps {
  function LyricContextMenu (line 172) | function LyricContextMenu(props: ILyricContextMenuProps) {

FILE: src/renderer/components/MusicDownloaded/index.tsx
  type IMusicDownloadedProps (line 9) | interface IMusicDownloadedProps {
  function MusicDownloaded (line 14) | function MusicDownloaded(props: IMusicDownloadedProps) {

FILE: src/renderer/components/MusicFavorite/index.tsx
  type IMusicFavoriteProps (line 4) | interface IMusicFavoriteProps {
  function MusicFavorite (line 9) | function MusicFavorite(props: IMusicFavoriteProps) {

FILE: src/renderer/components/MusicList/index.tsx
  type IMusicListProps (line 39) | interface IMusicListProps {
  function showMusicContextMenu (line 147) | function showMusicContextMenu(
  function _MusicList (line 311) | function _MusicList(props: IMusicListProps) {

FILE: src/renderer/components/MusicSheetlikeItem/index.tsx
  type IMusicSheetlikeItemProps (line 11) | interface IMusicSheetlikeItemProps {
  function MusicSheetlikeItem (line 16) | function MusicSheetlikeItem(props: IMusicSheetlikeItemProps) {

FILE: src/renderer/components/MusicSheetlikeList/index.tsx
  type IMusicSheetlikeListProps (line 9) | interface IMusicSheetlikeListProps {
  function MusicSheetlikeList (line 16) | function MusicSheetlikeList(props: IMusicSheetlikeListProps) {

FILE: src/renderer/components/MusicSheetlikeView/components/Body/index.tsx
  type IProps (line 15) | interface IProps {
  function Body (line 22) | function Body(props: IProps) {

FILE: src/renderer/components/MusicSheetlikeView/components/Header/index.tsx
  type IProps (line 13) | interface IProps {
  function Header (line 19) | function Header(props: IProps) {

FILE: src/renderer/components/MusicSheetlikeView/index.tsx
  type IMusicSheetlikeViewProps (line 8) | interface IMusicSheetlikeViewProps {
  function MusicSheetlikeView (line 19) | function MusicSheetlikeView(props: IMusicSheetlikeViewProps) {

FILE: src/renderer/components/NoPlugin/index.tsx
  type INoPluginProps (line 5) | interface INoPluginProps {
  function NoPlugin (line 10) | function NoPlugin(props: INoPluginProps) {

FILE: src/renderer/components/Panel/index.tsx
  type ITemplate (line 5) | type ITemplate = typeof templates;
  type IPanelType (line 6) | type IPanelType = keyof ITemplate;
  type IPanelInfo (line 8) | interface IPanelInfo {
  function PanelComponent (line 18) | function PanelComponent() {
  function showPanel (line 30) | function showPanel<T extends keyof ITemplate>(
  function hidePanel (line 40) | function hidePanel() {
  function getCurrentPanel (line 48) | function getCurrentPanel(){

FILE: src/renderer/components/Panel/templates/Base/index.tsx
  type IBaseModalProps (line 6) | interface IBaseModalProps {
  function Base (line 25) | function Base(props: IBaseModalProps) {
  type IHeaderProps (line 86) | interface IHeaderProps {
  function Header (line 90) | function Header(props: IHeaderProps) {

FILE: src/renderer/components/Panel/templates/MusicComment/index.tsx
  type IProps (line 11) | interface IProps {
  function MusicComment (line 16) | function MusicComment(props: IProps) {
  type IMusicCommentItemProps (line 41) | interface IMusicCommentItemProps {
  function MusicCommentItem (line 45) | function MusicCommentItem(props: IMusicCommentItemProps) {

FILE: src/renderer/components/Panel/templates/MusicComment/useComment.ts
  function useComment (line 5) | function useComment(musicItem: IMusic.IMusicItem) {

FILE: src/renderer/components/Panel/templates/PlayList/index.tsx
  constant DRAG_TAG (line 21) | const DRAG_TAG = "Playlist";
  type IProps (line 23) | interface IProps {
  function PlayList (line 27) | function PlayList(props: IProps) {
  type IPlayListMusicItemProps (line 238) | interface IPlayListMusicItemProps {
  function _PlayListMusicItem (line 244) | function _PlayListMusicItem(props: IPlayListMusicItemProps) {

FILE: src/renderer/components/Panel/templates/UserVariables/index.tsx
  type IUserVariablesProps (line 9) | interface IUserVariablesProps {

FILE: src/renderer/components/SvgAsset/index.tsx
  type SvgAssetIconNames (line 3) | type SvgAssetIconNames =
  type IProps (line 72) | interface IProps {
  function SvgAsset (line 83) | function SvgAsset(props: IProps) {

FILE: src/renderer/components/SwitchCase/index.tsx
  type ISwitchProps (line 3) | interface ISwitchProps {
  function Switch (line 8) | function Switch(props: ISwitchProps){
  type ICaseProps (line 20) | interface ICaseProps {
  function Case (line 24) | function Case(props: ICaseProps) {

FILE: src/renderer/components/Tag/index.tsx
  type ITagProps (line 4) | interface ITagProps {
  function Tag (line 10) | function Tag(props: ITagProps) {

FILE: src/renderer/core/backup-resume/index.ts
  function resume (line 8) | async function resume(data: string | Record<string, any>, overwrite?: bo...

FILE: src/renderer/core/db/music-sheet-db.ts
  class MusicSheetDB (line 4) | class MusicSheetDB extends Dexie {
    method constructor (line 17) | constructor() {

FILE: src/renderer/core/downloader/downloaded-sheet.ts
  function setupDownloadedMusicList (line 22) | async function setupDownloadedMusicList() {
  function getDownloadedDetails (line 30) | async function getDownloadedDetails(mediaBases: IMedia.IMediaBase[]) {
  function primaryKeyMap (line 44) | function primaryKeyMap(media: IMedia.IMediaBase) {
  function addDownloadedMusicToList (line 52) | async function addDownloadedMusicToList(
  function removeDownloadedMusic (line 100) | async function removeDownloadedMusic(
  function isDownloaded (line 199) | function isDownloaded(musicItem: IMedia.IMediaBase) {
  function useDownloaded (line 205) | function useDownloaded(musicItem: IMedia.IMediaBase) {

FILE: src/renderer/core/downloader/ee.ts
  type DownloadEvts (line 5) | enum DownloadEvts {

FILE: src/renderer/core/downloader/index.new.ts
  type ProxyMarkedFunction (line 17) | type ProxyMarkedFunction<T> = T &
  type IDownloadFileOptions (line 21) | interface IDownloadFileOptions {
  type IDownloaderWorker (line 27) | interface IDownloaderWorker {
  type DownloaderEvent (line 33) | enum DownloaderEvent {
  type IDownloaderEvent (line 38) | interface IDownloaderEvent {
  type ITaskStatus (line 42) | interface ITaskStatus {
  class Downloader (line 48) | class Downloader extends EventEmitter<IDownloaderEvent> {
    method constructor (line 56) | constructor() {
    method setup (line 67) | public async setup() {
    method download (line 93) | public async download(musicItems: IMusic.IMusicItem | IMusic.IMusicIte...
    method downloadMusicImpl (line 168) | private async downloadMusicImpl(musicItem: IMusic.IMusicItem, fileName...
    method setConcurrency (line 241) | public setConcurrency(concurrency: number) {
    method getTaskStatus (line 250) | public getTaskStatus(musicItem: IMusic.IMusicItem): ITaskStatus | null {
    method setTaskStatus (line 257) | private setTaskStatus(musicItem: IMusic.IMusicItem, taskStatus: ITaskS...

FILE: src/renderer/core/downloader/index.ts
  type IDownloadStatus (line 26) | interface IDownloadStatus {
  type ProxyMarkedFunction (line 36) | type ProxyMarkedFunction<T extends (...args: any) => void> = T &
  type IOnStateChangeFunc (line 39) | type IOnStateChangeFunc = (data: IDownloadStatus) => void;
  type IDownloaderWorker (line 41) | interface IDownloaderWorker {
  function setupDownloader (line 51) | async function setupDownloader() {
  function setupDownloaderWorker (line 56) | function setupDownloaderWorker() {
  function setDownloadingConcurrency (line 71) | function setDownloadingConcurrency(concurrency: number) {
  function startDownload (line 81) | async function startDownload(
  function downloadMusicImpl (line 130) | async function downloadMusicImpl(
  function useDownloadStatus (line 200) | function useDownloadStatus(musicItem: IMusic.IMusicItem) {
  function useDownloadState (line 227) | function useDownloadState(musicItem: IMusic.IMusicItem) {

FILE: src/renderer/core/link-lyric/index.ts
  function linkLyric (line 17) | async function linkLyric(
  function unlinkLyric (line 49) | async function unlinkLyric(musicItem: IMusic.IMusicItem) {
  function getLinkedLyric (line 71) | async function getLinkedLyric(musicItem: IMusic.IMusicItem) {

FILE: src/renderer/core/local-music/index.ts
  type ProxyMarkedFunction (line 7) | type ProxyMarkedFunction<T extends (...args: any) => void> = T &
  type IMusicItemWithLocalPath (line 10) | type IMusicItemWithLocalPath = IMusic.IMusicItem & { $$localPath: string };
  type ILocalFileWatcherWorker (line 12) | interface ILocalFileWatcherWorker {
  function isSubDir (line 27) | function isSubDir(parent: string, target: string) {
  function setupLocalMusic (line 34) | async function setupLocalMusic() {
  function changeWatchPath (line 94) | async function changeWatchPath(logs: Map<string, "add" | "delete">) {

FILE: src/renderer/core/music-sheet/backend/index.ts
  function getAllSheets (line 29) | function getAllSheets() {
  function getAllStarredSheets (line 33) | function getAllStarredSheets() {
  function queryAllSheets (line 43) | async function queryAllSheets() {
  function queryAllStarredSheets (line 86) | async function queryAllStarredSheets() {
  function addSheet (line 101) | async function addSheet(sheetName: string) {
  function updateSheet (line 132) | async function updateSheet(
  function removeSheet (line 170) | async function removeSheet(sheetId: string) {
  function clearSheet (line 202) | async function clearSheet(sheetId: string) {
  function starMusicSheet (line 227) | async function starMusicSheet(sheet: IMedia.IMediaBase) {
  function unstarMusicSheet (line 237) | async function unstarMusicSheet(sheet: IMedia.IMediaBase) {
  function setStarredMusicSheets (line 249) | async function setStarredMusicSheets(sheets: IMedia.IMediaBase[]) {
  function addMusicToSheet (line 262) | async function addMusicToSheet(
  function removeMusicFromSheet (line 342) | async function removeMusicFromSheet(
  function getSheetItemDetail (line 434) | async function getSheetItemDetail(
  function isFavoriteMusic (line 475) | function isFavoriteMusic(musicItem: IMusic.IMusicItem) {
  function exportAllSheetDetails (line 480) | async function exportAllSheetDetails() {

FILE: src/renderer/core/music-sheet/frontend/index.old.ts
  function refreshFavoriteState (line 18) | function refreshFavoriteState() {
  function setupMusicSheets (line 25) | async function setupMusicSheets() {
  function addSheet (line 39) | async function addSheet(sheetName: string) {
  function updateSheet (line 53) | async function updateSheet(
  function updateSheetMusicOrder (line 68) | async function updateSheetMusicOrder(
  function removeSheet (line 92) | async function removeSheet(sheetId: string) {
  function clearSheet (line 104) | async function clearSheet(sheetId: string) {
  function starMusicSheet (line 116) | async function starMusicSheet(sheet: IMedia.IMediaBase) {
  function unstarMusicSheet (line 125) | async function unstarMusicSheet(sheet: IMedia.IMediaBase) {
  function setStarredMusicSheets (line 133) | async function setStarredMusicSheets(sheets: IMedia.IMediaBase[]) {
  function addMusicToSheet (line 146) | async function addMusicToSheet(
  function addMusicToFavorite (line 163) | async function addMusicToFavorite(
  function removeMusicFromSheet (line 175) | async function removeMusicFromSheet(
  function removeMusicFromFavorite (line 192) | async function removeMusicFromFavorite(
  function isFavoriteMusic (line 199) | function isFavoriteMusic(musicItem: IMusic.IMusicItem) {
  function useMusicIsFavorite (line 204) | function useMusicIsFavorite(musicItem: IMusic.IMusicItem) {
  function updateSheetDetail (line 226) | function updateSheetDetail(newSheet: IMusic.IMusicSheetItem) {
  function refetchSheetDetail (line 234) | async function refetchSheetDetail(sheetId: string) {
  function useMusicSheet (line 254) | function useMusicSheet(sheetId: string) {
  function exportAllSheetDetails (line 369) | async function exportAllSheetDetails() {

FILE: src/renderer/core/recently-playlist/index.ts
  constant HARD_LIMIT (line 17) | const HARD_LIMIT = 500;
  function fetchRecentlyPlaylist (line 19) | async function fetchRecentlyPlaylist() {
  function setRecentlyPlaylist (line 23) | async function setRecentlyPlaylist(musicItems: IMusic.IMusicItem[]) {
  function setupRecentlyPlaylist (line 28) | async function setupRecentlyPlaylist() {
  function addToRecentlyPlaylist (line 34) | async function addToRecentlyPlaylist(musicItem: IMusic.IMusicItem) {
  function removeRecentlyPlayList (line 52) | async function removeRecentlyPlayList(musicItem: IMusic.IMusicItem) {
  function clearRecentlyPlaylist (line 65) | async function clearRecentlyPlaylist() {
  function useRecentlyPlaylistSheet (line 69) | function useRecentlyPlaylistSheet() {

FILE: src/renderer/core/track-player/controller/audio-controller.ts
  class AudioController (line 19) | class AudioController extends ControllerBase implements IAudioController {
    method playerState (line 24) | get playerState() {
    method playerState (line 27) | set playerState(value: PlayerState) {
    method hasSource (line 37) | get hasSource() {
    method constructor (line 41) | constructor() {
    method initHls (line 97) | private initHls(config?: Partial<HlsConfig>) {
    method destroyHls (line 107) | private destroyHls() {
    method destroy (line 116) | destroy(): void {
    method pause (line 121) | pause(): void {
    method play (line 127) | play(): void {
    method reset (line 133) | reset(): void {
    method seekTo (line 141) | seekTo(seconds: number): void {
    method setLoop (line 151) | setLoop(isLoop: boolean): void {
    method setSinkId (line 155) | setSinkId(deviceId: string): Promise<void> {
    method setSpeed (line 159) | setSpeed(speed: number): void {
    method prepareTrack (line 164) | prepareTrack(musicItem: IMusic.IMusicItem) {
    method setTrackSource (line 186) | setTrackSource(trackSource: IMusic.IMusicSource, musicItem: IMusic.IMu...
    method setVolume (line 275) | setVolume(volume: number): void {

FILE: src/renderer/core/track-player/controller/controller-base.ts
  class ControllerBase (line 4) | class ControllerBase {

FILE: src/renderer/core/track-player/enum.ts
  type ErrorReason (line 4) | enum ErrorReason {
  type ICurrentLyric (line 11) | interface ICurrentLyric {
  type PlayerEvents (line 17) | enum PlayerEvents {
  type CurrentTime (line 42) | interface CurrentTime {

FILE: src/renderer/core/track-player/index.ts
  type InternalPlayerEvents (line 47) | interface InternalPlayerEvents {
  type IPlayOptions (line 57) | interface IPlayOptions {
  type ITrackOptions (line 64) | interface ITrackOptions {
  class TrackPlayer (line 70) | class TrackPlayer {
    method currentMusic (line 71) | get currentMusic() {
    method currentMusicBasicInfo (line 76) | get currentMusicBasicInfo() {
    method progress (line 92) | get progress() {
    method playerState (line 96) | get playerState() {
    method repeatMode (line 100) | get repeatMode() {
    method currentQuality (line 104) | get currentQuality() {
    method speed (line 108) | get speed() {
    method volume (line 112) | get volume() {
    method lyric (line 116) | get lyric() {
    method musicQueue (line 120) | get musicQueue() {
    method isEmpty (line 124) | get isEmpty() {
    method constructor (line 136) | constructor() {
    method on (line 142) | on<T extends keyof InternalPlayerEvents>(event: T, callback: InternalP...
    method setupEvents (line 146) | private setupEvents() {
    method createAudioController (line 170) | private createAudioController() {
    method setup (line 226) | public async setup() {
    method toggleRepeatMode (line 284) | public toggleRepeatMode() {
    method playIndex (line 301) | public async playIndex(index: number, options: IPlayOptions = {}) {
    method playMusic (line 376) | public async playMusic(musicItem: IMusic.IMusicItem, options: IPlayOpt...
    method playMusicWithReplaceQueue (line 398) | public async playMusicWithReplaceQueue(musicList: IMusic.IMusicItem[],...
    method skipToPrev (line 411) | public skipToPrev() {
    method skipToNext (line 420) | public skipToNext() {
    method reset (line 431) | public reset() {
    method seekTo (line 440) | public seekTo(seconds: number) {
    method pause (line 444) | public pause() {
    method resume (line 451) | public resume() {
    method setVolume (line 459) | public setVolume(volume: number) {
    method setSpeed (line 463) | public setSpeed(speed: number) {
    method addNext (line 467) | public addNext(musicItems: IMusic.IMusicItem | IMusic.IMusicItem[]) {
    method removeMusic (line 527) | public removeMusic(musicItems: IMusic.IMusicItem | IMusic.IMusicItem[]...
    method setQuality (line 571) | public async setQuality(quality: IMusic.IQualityKey) {
    method setRepeatMode (line 585) | public setRepeatMode(repeatMode: RepeatMode) {
    method setAudioOutputDevice (line 596) | public async setAudioOutputDevice(deviceId?: string) {
    method setMusicQueue (line 604) | public setMusicQueue(musicQueue: IMusic.IMusicItem[]) {
    method fetchCurrentLyric (line 612) | public async fetchCurrentLyric(forceLoad = false) {
    method fetchMediaSource (line 669) | private async fetchMediaSource(musicItem: IMusic.IMusicItem, quality?:...
    method setCurrentMusic (line 725) | private setCurrentMusic(musicItem: IMusic.IMusicItem | null) {
    method setProgress (line 743) | private setProgress(progress: CurrentTime) {
    method setCurrentQuality (line 749) | private setCurrentQuality(quality: IMusic.IQualityKey) {
    method setCurrentLyric (line 754) | private setCurrentLyric(lyric?: ICurrentLyric) {
    method setPlayerState (line 765) | private setPlayerState(playerState: PlayerState) {
    method findMusicIndex (line 771) | private findMusicIndex(musicItem?: IMusic.IMusicItem | null) {
    method resetProgress (line 779) | private resetProgress() {
    method setTrack (line 784) | private setTrack(mediaSource: IPlugin.IMediaSourceResult, musicItem: I...
    method isCurrentMusic (line 801) | public isCurrentMusic(musicItem: IMusic.IMusicItem) {

FILE: src/renderer/core/track-player/store.ts
  function resetProgress (line 39) | function resetProgress() {

FILE: src/renderer/document/bootstrap.ts
  function dropHandler (line 57) | function dropHandler() {
  function clearDefaultBehavior (line 106) | function clearDefaultBehavior() {
  function setupCommandAndEvents (line 138) | function setupCommandAndEvents() {
  function setupDeviceChange (line 258) | async function setupDeviceChange() {

FILE: src/renderer/document/fallback.tsx
  type IProps (line 4) | interface IProps {
  function Fallback (line 9) | function Fallback(props: IProps) {

FILE: src/renderer/document/index.tsx
  function Root (line 33) | function Root() {
  function BootstrapComponent (line 60) | function BootstrapComponent(): null {

FILE: src/renderer/document/useBootstrap.ts
  function useBootstrap (line 9) | function useBootstrap() {

FILE: src/renderer/pages/main-page/components/SideBar/widgets/ListItem/index.tsx
  type IProps (line 4) | interface IProps {
  function ListItem (line 12) | function ListItem(props: IProps) {

FILE: src/renderer/pages/main-page/components/SideBar/widgets/MySheets/index.tsx
  function MySheets (line 14) | function MySheets() {

FILE: src/renderer/pages/main-page/components/SideBar/widgets/StarredSheets/index.tsx
  function StarredSheets (line 10) | function StarredSheets() {

FILE: src/renderer/pages/main-page/index.tsx
  function MainPage (line 20) | function MainPage() {

FILE: src/renderer/pages/main-page/views/album-view/hooks/useAlbumDetail.ts
  function useAlbumDetail (line 11) | function useAlbumDetail(

FILE: src/renderer/pages/main-page/views/album-view/index.tsx
  function AlbumView (line 7) | function AlbumView() {

FILE: src/renderer/pages/main-page/views/artist-view/components/Body/index.tsx
  type IBodyProps (line 9) | interface IBodyProps {
  function Body (line 14) | function Body(props: IBodyProps) {

FILE: src/renderer/pages/main-page/views/artist-view/components/Body/widgets/AlbumResult/index.tsx
  type IBodyProps (line 11) | interface IBodyProps {
  function AlbumResult (line 15) | function AlbumResult(props: IBodyProps) {

FILE: src/renderer/pages/main-page/views/artist-view/components/Body/widgets/MusicResult/index.tsx
  type IBodyProps (line 9) | interface IBodyProps {
  function MusicResult (line 13) | function MusicResult(props: IBodyProps) {

FILE: src/renderer/pages/main-page/views/artist-view/components/Header/index.tsx
  type IProps (line 8) | interface IProps {
  function Header (line 12) | function Header(props: IProps) {

FILE: src/renderer/pages/main-page/views/artist-view/hooks/useQueryArtist.ts
  function useQueryArtist (line 9) | function useQueryArtist() {

FILE: src/renderer/pages/main-page/views/artist-view/index.tsx
  function ArtistView (line 8) | function ArtistView() {

FILE: src/renderer/pages/main-page/views/artist-view/store/index.ts
  type IQueryResult (line 5) | interface IQueryResult<
  type IQueryResults (line 13) | type IQueryResults<

FILE: src/renderer/pages/main-page/views/download-view/components/Downloaded/index.tsx
  function Downloaded (line 5) | function Downloaded() {

FILE: src/renderer/pages/main-page/views/download-view/components/Downloading/DownloadStatus.tsx
  type IProps (line 8) | interface IProps {
  function DownloadStatus (line 12) | function DownloadStatus(props: IProps) {

FILE: src/renderer/pages/main-page/views/download-view/components/Downloading/index.tsx
  function Downloading (line 59) | function Downloading() {

FILE: src/renderer/pages/main-page/views/download-view/index.tsx
  function DownloadView (line 7) | function DownloadView() {

FILE: src/renderer/pages/main-page/views/local-music-view/index.tsx
  type DisplayView (line 15) | enum DisplayView {
  function LocalMusicView (line 22) | function LocalMusicView() {

FILE: src/renderer/pages/main-page/views/local-music-view/views/album/index.tsx
  type IProps (line 7) | interface IProps {
  function AlbumView (line 11) | function AlbumView(props: IProps) {

FILE: src/renderer/pages/main-page/views/local-music-view/views/artist/index.tsx
  type IProps (line 8) | interface IProps {
  function ArtistView (line 12) | function ArtistView(props: IProps) {

FILE: src/renderer/pages/main-page/views/local-music-view/views/folder/index.tsx
  type IProps (line 8) | interface IProps {
  function FolderView (line 12) | function FolderView(props: IProps) {

FILE: src/renderer/pages/main-page/views/local-music-view/views/list/index.tsx
  type IProps (line 4) | interface IProps {
  function ListView (line 8) | function ListView(props: IProps) {

FILE: src/renderer/pages/main-page/views/music-sheet-view/index.tsx
  function MusicSheetView (line 16) | function MusicSheetView() {

FILE: src/renderer/pages/main-page/views/music-sheet-view/local-sheet/index.tsx
  function LocalSheet (line 7) | function LocalSheet() {

FILE: src/renderer/pages/main-page/views/music-sheet-view/remote-sheet/hooks/usePluginSheetMusicList.ts
  function usePluginSheetMusicList (line 6) | function usePluginSheetMusicList(

FILE: src/renderer/pages/main-page/views/music-sheet-view/remote-sheet/index.tsx
  function RemoteSheet (line 11) | function RemoteSheet() {
  type IProps (line 32) | interface IProps {
  function RemoteSheetOptions (line 35) | function RemoteSheetOptions(props: IProps) {

FILE: src/renderer/pages/main-page/views/plugin-manager-view/components/plugin-table/index.tsx
  function renderOptions (line 23) | function renderOptions(info: any) {
  method cell (line 186) | cell(info) {
  function PluginTable (line 221) | function PluginTable() {
  type IActionButtonProps (line 324) | interface IActionButtonProps {
  function ActionButton (line 329) | function ActionButton(props: IActionButtonProps) {

FILE: src/renderer/pages/main-page/views/plugin-manager-view/index.tsx
  function PluginManagerView (line 11) | function PluginManagerView() {

FILE: src/renderer/pages/main-page/views/recently-play-view/index.tsx
  function RecentlyPlayView (line 9) | function RecentlyPlayView() {

FILE: src/renderer/pages/main-page/views/recommend-sheets-view/components/Body/index.tsx
  function getDefaultTag (line 14) | function getDefaultTag(): IMedia.IUnique {
  type IBodyProps (line 21) | interface IBodyProps {
  function Body (line 25) | function Body(props: IBodyProps) {

FILE: src/renderer/pages/main-page/views/recommend-sheets-view/components/Body/tag-panel.tsx
  type ITagPanelProps (line 5) | interface ITagPanelProps {
  function TagPanel (line 11) | function TagPanel(props: ITagPanelProps) {

FILE: src/renderer/pages/main-page/views/recommend-sheets-view/index.tsx
  function RecommendSheetsView (line 8) | function RecommendSheetsView() {

FILE: src/renderer/pages/main-page/views/search-view/components/SearchResult/AlbumResult/index.tsx
  type IMediaResultProps (line 8) | interface IMediaResultProps {
  function AlbumResult (line 14) | function AlbumResult(props: IMediaResultProps) {

FILE: src/renderer/pages/main-page/views/search-view/components/SearchResult/ArtistResult/index.tsx
  type IMediaResultProps (line 9) | interface IMediaResultProps {
  function ArtistResult (line 15) | function ArtistResult(props: IMediaResultProps) {

FILE: src/renderer/pages/main-page/views/search-view/components/SearchResult/MusicResult/index.tsx
  type IMediaResultProps (line 6) | interface IMediaResultProps {
  function MusicResult (line 12) | function MusicResult(props: IMediaResultProps) {

FILE: src/renderer/pages/main-page/views/search-view/components/SearchResult/SheetResult/index.tsx
  type IMediaResultProps (line 8) | interface IMediaResultProps {
  function SheetResult (line 14) | function SheetResult(props: IMediaResultProps) {

FILE: src/renderer/pages/main-page/views/search-view/components/SearchResult/index.tsx
  type ISearchResultProps (line 15) | interface ISearchResultProps {
  function SearchResult (line 21) | function SearchResult(props: ISearchResultProps) {
  type ISearchResultBodyProps (line 72) | interface ISearchResultBodyProps {
  function _SearchResultBody (line 77) | function _SearchResultBody(props: ISearchResultBodyProps) {

FILE: src/renderer/pages/main-page/views/search-view/hooks/useSearch.ts
  function useSearch (line 7) | function useSearch() {

FILE: src/renderer/pages/main-page/views/search-view/index.tsx
  function SearchView (line 13) | function SearchView() {

FILE: src/renderer/pages/main-page/views/search-view/store/search-result.ts
  type ISearchResult (line 6) | interface ISearchResult<T extends IMedia.SupportMediaType> {
  type ISearchResults (line 17) | type ISearchResults<
  function resetStore (line 39) | function resetStore(){

FILE: src/renderer/pages/main-page/views/setting-view/components/CheckBoxSettingItem/index.tsx
  type ICheckBoxSettingItemProps (line 7) | interface ICheckBoxSettingItemProps<T extends keyof IAppConfig> {
  function CheckBoxSettingItem (line 13) | function CheckBoxSettingItem<T extends keyof IAppConfig>(

FILE: src/renderer/pages/main-page/views/setting-view/components/ColorPickerSettingItem/index.tsx
  type IColorPickerSettingItemProps (line 9) | interface IColorPickerSettingItemProps<T extends keyof IAppConfig> {
  function ColorPickerSettingItem (line 14) | function ColorPickerSettingItem<T extends keyof IAppConfig>(

FILE: src/renderer/pages/main-page/views/setting-view/components/FontPickerSettingItem/index.tsx
  type FontPickerSettingItemProps (line 9) | interface FontPickerSettingItemProps<T extends keyof IAppConfig> {
  function useFonts (line 14) | function useFonts() {
  function FontPickerSettingItem (line 31) | function FontPickerSettingItem<T extends keyof IAppConfig>(

FILE: src/renderer/pages/main-page/views/setting-view/components/InputSettingItem/index.tsx
  type InputSettingItemProps (line 7) | interface InputSettingItemProps<T extends keyof IAppConfig> {
  function InputSettingItem (line 18) | function InputSettingItem<T extends keyof IAppConfig>(

FILE: src/renderer/pages/main-page/views/setting-view/components/ListBoxSettingItem/index.tsx
  type ListBoxSettingItemProps (line 15) | interface ListBoxSettingItemProps<T extends keyof IAppConfig> {
  function ListBoxSettingItem (line 25) | function ListBoxSettingItem<T extends keyof IAppConfig>(
  type IListBoxOptionsProps (line 103) | interface IListBoxOptionsProps<T extends keyof IAppConfig> {
  function ListBoxOptions (line 109) | function ListBoxOptions<T extends keyof IAppConfig>(

FILE: src/renderer/pages/main-page/views/setting-view/components/MultiRadioGroupSettingItem/index.tsx
  type ExtractArrayItem (line 8) | type ExtractArrayItem<T> = T extends Array<infer R> ? R : never;
  type IRadioGroupSettingItemProps (line 10) | interface IRadioGroupSettingItemProps<T extends keyof IAppConfig> {
  function MultiRadioGroupSettingItem (line 23) | function MultiRadioGroupSettingItem<T extends keyof IAppConfig>(

FILE: src/renderer/pages/main-page/views/setting-view/components/PathSettingItem/index.tsx
  type PathSettingItemProps (line 9) | interface PathSettingItemProps<T extends keyof IAppConfig> {
  function PathSettingItem (line 14) | function PathSettingItem<T extends keyof IAppConfig>(

FILE: src/renderer/pages/main-page/views/setting-view/components/RadioGroupSettingItem/index.tsx
  type IRadioGroupSettingItemProps (line 10) | interface IRadioGroupSettingItemProps<T extends keyof IAppConfig> {
  function RadioGroupSettingItem (line 18) | function RadioGroupSettingItem<T extends keyof IAppConfig>(

FILE: src/renderer/pages/main-page/views/setting-view/index.tsx
  function SettingView (line 8) | function SettingView() {

FILE: src/renderer/pages/main-page/views/setting-view/routers/About/index.tsx
  function About (line 9) | function About() {

FILE: src/renderer/pages/main-page/views/setting-view/routers/Backup/index.tsx
  function Backup (line 14) | function Backup() {

FILE: src/renderer/pages/main-page/views/setting-view/routers/Download/index.tsx
  function Download (line 14) | function Download() {

FILE: src/renderer/pages/main-page/views/setting-view/routers/Lyric/index.tsx
  function Lyric (line 15) | function Lyric() {

FILE: src/renderer/pages/main-page/views/setting-view/routers/Network/index.tsx
  function Network (line 11) | function Network() {

FILE: src/renderer/pages/main-page/views/setting-view/routers/Normal/index.tsx
  function Normal (line 13) | function Normal() {

FILE: src/renderer/pages/main-page/views/setting-view/routers/PlayMusic/index.tsx
  function PlayMusic (line 11) | function PlayMusic() {

FILE: src/renderer/pages/main-page/views/setting-view/routers/Plugin/index.tsx
  function Plugin (line 7) | function Plugin() {

FILE: src/renderer/pages/main-page/views/setting-view/routers/ShortCut/index.tsx
  function ShortCut (line 14) | function ShortCut() {
  type IShortCutKeys (line 32) | type IShortCutKeys = keyof IAppConfig["shortCut.shortcuts"];
  function ShortCutTable (line 35) | function ShortCutTable() {
  type IShortCutItemProps (line 89) | interface IShortCutItemProps {
  function formatValue (line 98) | function formatValue(val: string[]) {
  function keyCodeMap (line 102) | function keyCodeMap(code: string) {
  function ShortCutItem (line 117) | function ShortCutItem(props: IShortCutItemProps) {

FILE: src/renderer/pages/main-page/views/theme-view/components/LocalThemes/index.tsx
  function LocalThemes (line 10) | function LocalThemes() {

FILE: src/renderer/pages/main-page/views/theme-view/components/RemoteThemes/hooks/useRemoteThemes.ts
  type IThemeStoreItem (line 9) | interface IThemeStoreItem {
  function raceWithData (line 17) | function raceWithData<T>(promises: Array<Promise<T>>): Promise<T> {

FILE: src/renderer/pages/main-page/views/theme-view/components/RemoteThemes/index.tsx
  function RemoteThemes (line 11) | function RemoteThemes() {

FILE: src/renderer/pages/main-page/views/theme-view/components/ThemeItem/index.tsx
  type IProps (line 9) | interface IProps {
  function ThemeItem (line 20) | function ThemeItem(props: IProps) {

FILE: src/renderer/pages/main-page/views/theme-view/index.tsx
  function ThemeView (line 9) | function ThemeView() {

FILE: src/renderer/pages/main-page/views/toplist-detail-view/hooks/useTopListDetail.ts
  function useTopListDetail (line 5) | function useTopListDetail(

FILE: src/renderer/pages/main-page/views/toplist-detail-view/index.tsx
  function TopListDetailView (line 5) | function TopListDetailView() {

FILE: src/renderer/pages/main-page/views/toplist-view/hooks/useGetTopList.ts
  function useGetTopList (line 8) | function useGetTopList() {

FILE: src/renderer/pages/main-page/views/toplist-view/index.tsx
  function ToplistView (line 17) | function ToplistView() {
  type IToplistBodyProps (line 67) | interface IToplistBodyProps {
  function ToplistBody (line 71) | function ToplistBody(props: IToplistBodyProps) {
  type IToplistGroupItemProps (line 103) | interface IToplistGroupItemProps {
  function ToplistGroupItem (line 107) | function ToplistGroupItem(props: IToplistGroupItemProps) {

FILE: src/renderer/pages/main-page/views/toplist-view/store/index.ts
  type IPluginTopListResult (line 4) | interface IPluginTopListResult {

FILE: src/renderer/utils/check-update.ts
  function checkUpdate (line 6) | async function checkUpdate(forceCheck?: boolean) {

FILE: src/renderer/utils/classnames.ts
  function classNames (line 1) | function classNames(cls: Record<string, boolean> | Array<string>) {

FILE: src/renderer/utils/create-tmp-file.ts
  function createTmpFile (line 5) | async function createTmpFile(data: string) {

FILE: src/renderer/utils/get-text-width.ts
  type IConfig (line 4) | interface IConfig {

FILE: src/renderer/utils/get-url-ext.ts
  function getUrlExt (line 1) | function getUrlExt(url?: string) {

FILE: src/renderer/utils/groupBy.ts
  type IndexableType (line 1) | type IndexableType = number | string | symbol;
  function groupBy (line 3) | function groupBy<T extends Record<IndexableType, any>, K extends keyof T...

FILE: src/renderer/utils/img-on-error.ts
  function setFallbackAlbum (line 4) | function setFallbackAlbum(evt: SyntheticEvent<HTMLImageElement>) {

FILE: src/renderer/utils/is-local-music.ts
  function isLocalMusic (line 3) | function isLocalMusic(mediaItem: IMedia.IMediaBase) {

FILE: src/renderer/utils/lyric-parser.ts
  type LyricMeta (line 4) | type LyricMeta = Record<string, any>;
  type IOptions (line 6) | interface IOptions {
  type IParsedLrcItem (line 11) | interface IParsedLrcItem {
  class LyricParser (line 22) | class LyricParser {
    method musicItem (line 32) | get musicItem() {
    method constructor (line 36) | constructor(raw: string, options?: IOptions) {
    method getPosition (line 76) | getPosition(position: number): IParsedLrcItem | null {
    method getLyricItems (line 113) | getLyricItems() {
    method getMeta (line 117) | getMeta() {
    method toString (line 121) | toString(options?: {
    method parseTime (line 144) | private parseTime(timeStr: string): number {
    method timeToLrctime (line 153) | private timeToLrctime(sec: number) {
    method parseMetaImpl (line 163) | private parseMetaImpl(metaStr: string) {
    method parseLyricImpl (line 182) | private parseLyricImpl(raw: string) {

FILE: src/renderer/utils/search-history.ts
  function getSearchHistory (line 4) | async function getSearchHistory() {
  function addSearchHistory (line 8) | async function addSearchHistory(searchItem: string) {
  function removeSearchHistory (line 18) | async function removeSearchHistory(searchItem: string) {
  function clearSearchHistory (line 26) | async function clearSearchHistory() {

FILE: src/renderer/utils/user-perference.ts
  type EvtNames (line 10) | enum EvtNames {
  function setUserPreference (line 14) | function setUserPreference<K extends keyof IUserPreference.IType>(
  function removeUserPreference (line 32) | function removeUserPreference(key: keyof IUserPreference.IType) {
  function getUserPreference (line 39) | function getUserPreference<K extends keyof IUserPreference.IType>(
  function useUserPreference (line 54) | function useUserPreference<K extends keyof IUserPreference.IType>(
  class UserPreferenceDB (line 94) | class UserPreferenceDB extends Dexie {
    method constructor (line 98) | constructor() {
  function setUserPreferenceIDB (line 113) | async function setUserPreferenceIDB<
  function getUserPreferenceIDB (line 131) | async function getUserPreferenceIDB<
  function useUserPreferenceIDBValue (line 147) | function useUserPreferenceIDBValue<

FILE: src/shared/app-config/main.ts
  class AppConfig (line 12) | class AppConfig {
    method configPath (line 19) | get configPath() {
    method checkPath (line 27) | private async checkPath() {
    method setup (line 55) | async setup(windowManager: IWindowManager) {
    method onConfigUpdated (line 79) | public onConfigUpdated(callback: (patch: IAppConfig, config: IAppConfi...
    method offConfigUpdated (line 83) | public offConfigUpdated(callback: (patch: IAppConfig, config: IAppConf...
    method migrateOldVersionConfig (line 87) | async migrateOldVersionConfig() {
    method loadConfig (line 166) | async loadConfig() {
    method getAllConfig (line 194) | public getAllConfig() {
    method reset (line 198) | public reset() {
    method getConfig (line 203) | public getConfig<T extends keyof IAppConfig>(key: T): IAppConfig[T] {
    method setConfig (line 207) | public setConfig(data: IAppConfig) {
    method _setConfig (line 211) | private _setConfig(data: IAppConfig, from: "main" | "renderer") {

FILE: src/shared/app-config/preload.ts
  function syncConfig (line 4) | async function syncConfig() {
  function setConfig (line 8) | function setConfig(config: any) {
  function reset (line 12) | function reset() {
  function onConfigUpdate (line 16) | function onConfigUpdate(callback: (patch: any) => void) {

FILE: src/shared/app-config/renderer.ts
  type IMod (line 5) | interface IMod {
  class AppConfig (line 17) | class AppConfig {
    method notifyCallbacks (line 24) | private notifyCallbacks(patch: IAppConfig) {
    method setup (line 30) | async setup() {
    method onConfigUpdate (line 41) | public onConfigUpdate(callback: (patch: IAppConfig, config: IAppConfig...
    method offConfigUpdate (line 45) | public offConfigUpdate(callback: (patch: IAppConfig, config: IAppConfi...
    method getAllConfig (line 49) | public getAllConfig() {
    method getConfig (line 53) | public getConfig<T extends keyof IAppConfig>(key: T): IAppConfig[T] {
    method setConfig (line 57) | public setConfig(data: IAppConfig) {
    method reset (line 61) | public reset() {

FILE: src/shared/database/preload-backup.ts
  constant DATABASE_LATEST_VERSION (line 21) | const DATABASE_LATEST_VERSION = 1;
  function createInitialTables (line 24) | function createInitialTables() {
  function migrateDatabase (line 101) | function migrateDatabase() {
  class LocalMusicSheetDB (line 139) | class LocalMusicSheetDB {
    method addMusicSheet (line 149) | static addMusicSheet(musicSheet: IDataBaseModel.IMusicSheetModel): boo...
    method batchAddMusicSheets (line 191) | static batchAddMusicSheets(musicSheets: IDataBaseModel.IMusicSheetMode...
    method deleteMusicSheet (line 255) | static deleteMusicSheet(platform: string, id: string): boolean {
    method batchDeleteMusicSheets (line 271) | static batchDeleteMusicSheets(sheets: Array<{ platform: string; id: st...
    method getMusicSheet (line 306) | static getMusicSheet(platform: string, id: string): IDataBaseModel.IMu...
    method getAllMusicSheets (line 341) | static getAllMusicSheets(orderBy: string = "_sortIndex", order: "ASC" ...
    method getMusicSheetsByPlatform (line 381) | static getMusicSheetsByPlatform(platform: string, orderBy: string = "_...
    method updateMusicSheet (line 421) | static updateMusicSheet(
    method batchUpdateMusicSheets (line 467) | static batchUpdateMusicSheets(
    method updateMusicSheetSort (line 507) | static updateMusicSheetSort(platform: string, id: string, newSortIndex...
    method insertMusicSheetBetween (line 532) | static insertMusicSheetBetween(
    method rebalanceSortIndexes (line 590) | static rebalanceSortIndexes(): boolean {
    method getMusicItemsInSheet (line 623) | static getMusicItemsInSheet(
    method getMusicItemCountInSheet (line 668) | static getMusicItemCountInSheet(platform: string, id: string): number {
    method existsMusicSheet (line 688) | static existsMusicSheet(platform: string, id: string): boolean {
    method searchMusicSheets (line 705) | static searchMusicSheets(
    method batchMoveMusicSheets (line 773) | static batchMoveMusicSheets(

FILE: src/shared/database/preload.ts
  constant DATABASE_LATEST_VERSION (line 19) | const DATABASE_LATEST_VERSION = 1;
  function createInitialTables (line 22) | function createInitialTables() {
  function migrateDatabase (line 99) | function migrateDatabase() {
  class LocalMusicSheetDB (line 135) | class LocalMusicSheetDB {
    method addMusicSheet (line 144) | static addMusicSheet(musicSheet: IDataBaseModel.IMusicSheetModel): boo...
    method batchAddMusicSheets (line 185) | static batchAddMusicSheets(musicSheets: IDataBaseModel.IMusicSheetMode...
    method deleteMusicSheet (line 250) | static deleteMusicSheet(platform: string, id: string): boolean {
    method batchDeleteMusicSheets (line 265) | static batchDeleteMusicSheets(sheets: Array<{ platform: string; id: st...
    method getMusicSheet (line 301) | static getMusicSheet(platform: string, id: string): IDataBaseModel.IMu...
    method getAllMusicSheets (line 337) | static getAllMusicSheets(orderBy: string = "_sortIndex", order: "ASC" ...
    method getMusicSheetsByPlatform (line 376) | static getMusicSheetsByPlatform(platform: string, orderBy: string = "_...
    method updateMusicSheet (line 415) | static updateMusicSheet(
    method rebalanceSortIndexes (line 459) | static rebalanceSortIndexes(): boolean {
    method batchMoveMusicSheets (line 504) | static batchMoveMusicSheets(
    method searchMusicSheets (line 585) | static searchMusicSheets(
    method getMusicItemsInSheet (line 639) | static getMusicItemsInSheet(
    method getMusicItemCountInSheet (line 683) | static getMusicItemCountInSheet(platform: string, id: string): number {
    method existsMusicSheet (line 702) | static existsMusicSheet(platform: string, id: string): boolean {

FILE: src/shared/global-context/internal/common.ts
  type _IpcRendererEvt (line 5) | enum _IpcRendererEvt {

FILE: src/shared/global-context/main.ts
  function setupGlobalContext (line 9) | function setupGlobalContext() {

FILE: src/shared/global-context/preload.ts
  function getGlobalContext (line 7) | function getGlobalContext() {

FILE: src/shared/global-context/type.d.ts
  type IGlobalContext (line 1) | interface IGlobalContext {

FILE: src/shared/i18n/main.ts
  function readLangContent (line 19) | async function readLangContent(
  type ISetupI18nOptions (line 36) | interface ISetupI18nOptions {
  function setupI18n (line 41) | async function setupI18n(options?: ISetupI18nOptions) {

FILE: src/shared/i18n/preload.ts
  function setupLang (line 4) | async function setupLang() {
  function changeLang (line 9) | async function changeLang(lang: string) {

FILE: src/shared/i18n/renderer.ts
  function setupI18n (line 14) | async function setupI18n() {
  function changeLang (line 27) | async function changeLang(lang: string): Promise<boolean> {

FILE: src/shared/i18n/type.d.ts
  type ISetupData (line 1) | interface ISetupData {
  type IChangeLangData (line 7) | interface IChangeLangData {
  type IMod (line 12) | interface IMod {

FILE: src/shared/logger/main.ts
  function logError (line 5) | function logError(msg: string, error: Error, extra?: any) {
  function logInfo (line 9) | function logInfo(msg: string, extra?: any) {
  function logPerf (line 15) | function logPerf(msg: string) {

FILE: src/shared/logger/renderer.ts
  function logError (line 6) | function logError(msg: string, error: Error, extra?: any) {
  function logInfo (line 10) | function logInfo(msg: string, extra?: any) {
  function logPerf (line 15) | function logPerf(msg: string) {

FILE: src/shared/message-bus/main.ts
  class MessageBus (line 11) | class MessageBus {
    method setup (line 25) | public setup(windowManager: IWindowManager) {
    method onAppStateChange (line 48) | public onAppStateChange(cb: (state: IAppState, changedAppState: IAppSt...
    method sendCommand (line 57) | public sendCommand<T extends keyof ICommand>(command: T, data?: IComma...
    method getAppState (line 71) | public getAppState() {
    method createPortForExtensionWindow (line 76) | private createPortForExtensionWindow(bWindow: BrowserWindow) {

FILE: src/shared/message-bus/preload/extension.ts
  function sendCommand (line 50) | function sendCommand<T extends keyof ICommand>(command: T, data?: IComma...
  function subscribeAppState (line 67) | function subscribeAppState(keys: (keyof IAppState)[]) {
  function getAppState (line 81) | function getAppState() {
  function onStateChange (line 85) | function onStateChange(
  function offStateChange (line 91) | function offStateChange(

FILE: src/shared/message-bus/preload/main.ts
  function handleMessage (line 53) | function handleMessage(data: IPortMessage, from: number | null) {
  function onCommand (line 78) | function onCommand<K extends keyof ICommand>(
  function sendCommand (line 89) | function sendCommand<K extends keyof ICommand>(command: K, data: IComman...
  function syncAppState (line 101) | function syncAppState(appState: IAppState, to?: "main" | number) {
  function syncAppStateTo (line 114) | function syncAppStateTo(appState: IAppState, processId: "main" | number) {

FILE: src/shared/message-bus/renderer/extension.ts
  type IMod (line 4) | interface IMod {
  function useAppState (line 21) | function useAppState() {
  function useAppStatePartial (line 35) | function useAppStatePartial<K extends keyof IAppState>(key: K) {

FILE: src/shared/message-bus/renderer/main.ts
  type IMod (line 3) | interface IMod {

FILE: src/shared/message-bus/type.d.ts
  type IAppState (line 4) | interface IAppState {
  type ICommand (line 15) | interface ICommand {
  type IPortMessagePayload (line 46) | interface IPortMessagePayload<
  type IPortMessage (line 60) | interface IPortMessage<

FILE: src/shared/plugin-manager/main/index.ts
  type ICallPluginMethodParams (line 24) | interface ICallPluginMethodParams<
  class PluginManager (line 34) | class PluginManager {
    method plugins (line 40) | public get plugins() {
    method plugins (line 44) | public set plugins(newPlugins: Plugin[]) {
    method pluginBasePath (line 69) | private get pluginBasePath() {
    method setup (line 80) | public async setup(windowManager: IWindowManager) {
    method callPluginMethod (line 136) | private callPluginMethod({
    method syncPlugins (line 157) | private syncPlugins() {
    method installPluginFromRawCodeImpl (line 166) | private async installPluginFromRawCodeImpl(funcCode: string) {
    method installPluginFromUrlImpl (line 210) | private async installPluginFromUrlImpl(urlLike: string) {
    method loadAllPlugins (line 218) | public async loadAllPlugins() {
    method installPluginFromLocalFile (line 246) | public async installPluginFromLocalFile(urlLike: string) {
    method installPluginFromRemoteUrl (line 265) | public async installPluginFromRemoteUrl(urlLike: string) {
    method updateAllPlugins (line 283) | public async updateAllPlugins() {
    method uninstallPlugin (line 292) | public async uninstallPlugin(hash: string) {

FILE: src/shared/plugin-manager/main/internal-plugins/local-plugin.ts
  function localPluginDefine (line 6) | function localPluginDefine(): IPlugin.IPluginInstance {

FILE: src/shared/plugin-manager/main/plugin-methods.ts
  class PluginMethods (line 10) | class PluginMethods implements IPlugin.IPluginInstanceMethods {
    method constructor (line 12) | constructor(plugin: Plugin) {
    method search (line 16) | async search<T extends IMedia.SupportMediaType>(
    method getMediaSource (line 46) | async getMediaSource(
    method getMusicInfo (line 97) | async getMusicInfo(
    method getLyric (line 116) | async getLyric(
    method getAlbumInfo (line 228) | async getAlbumInfo(
    method getMusicSheetInfo (line 276) | async getMusicSheetInfo(
    method getArtistWorks (line 321) | async getArtistWorks<T extends IArtist.ArtistMediaType>(
    method importMusicSheet (line 358) | async importMusicSheet(urlLike: string): Promise<IMusic.IMusicItem[]> {
    method importMusicItem (line 372) | async importMusicItem(urlLike: string): Promise<IMusic.IMusicItem | nu...
    method getTopLists (line 387) | async getTopLists(): Promise<IMusic.IMusicSheetGroupItem[]> {
    method getTopListDetail (line 400) | async getTopListDetail(
    method getRecommendSheetTags (line 430) | async getRecommendSheetTags(): Promise<IPlugin.IGetRecommendSheetTagsR...
    method getRecommendSheetsByTag (line 445) | async getRecommendSheetsByTag(
    method getMusicComments (line 475) | async getMusicComments(musicItem: IMusic.IMusicItem, page = 1): Promis...

FILE: src/shared/plugin-manager/main/plugin.ts
  type PluginStateCode (line 19) | enum PluginStateCode {
  class Plugin (line 67) | class Plugin {
    method constructor (line 81) | constructor(
    method checkValid (line 184) | private checkValid(_instance: IPlugin.IPluginInstance) {

FILE: src/shared/plugin-manager/main/polyfill/react-native-cookies.ts
  type Cookie (line 3) | interface Cookie {
  type Cookies (line 14) | interface Cookies {
  function set (line 18) | async function set(
  function get (line 33) | async function get(url: string): Promise<Cookies> {
  function flush (line 48) | async function flush(): Promise<void> {

FILE: src/shared/plugin-manager/main/polyfill/storage.ts
  constant MAX_STORAGE_SIZE (line 6) | const MAX_STORAGE_SIZE = 1024 * 1024 * 10;
  function loadStorage (line 10) | async function loadStorage() {
  function saveStorage (line 24) | async function saveStorage(newStorage: Record<string, string>) {
  function setItem (line 53) | async function setItem(key: string, value: unknown) {
  function getItem (line 64) | async function getItem(key: string) {
  function removeItem (line 71) | async function removeItem(key: string) {

FILE: src/shared/plugin-manager/preload.ts
  function onPluginUpdated (line 9) | function onPluginUpdated(callback: (plugins: IPlugin.IPluginDelegate[]) ...
  type IPluginDelegateLike (line 14) | interface IPluginDelegateLike {
  function callPluginMethod (line 19) | async function callPluginMethod<
  function reloadPlugins (line 34) | async function reloadPlugins() {
  function uninstallPlugin (line 39) | async function uninstallPlugin(hash: string) {
  function updateAllPlugins (line 43) | async function updateAllPlugins() {
  function installPluginFromRemote (line 47) | async function installPluginFromRemote(url: string) {
  function installPluginFromLocal (line 51) | async function installPluginFromLocal(url: string) {

FILE: src/shared/plugin-manager/renderer.ts
  type IPluginDelegateLike (line 6) | interface IPluginDelegateLike {
  type IMod (line 11) | interface IMod {
  function getSupportedPlugin (line 38) | function getSupportedPlugin(
  function getSortedSupportedPlugin (line 46) | function getSortedSupportedPlugin(
  function getSearchablePlugins (line 62) | function getSearchablePlugins(
  function getSortedSearchablePlugins (line 73) | function getSortedSearchablePlugins(
  function getPluginByHash (line 83) | function getPluginByHash(hash: string) {
  function getPluginByPlatform (line 87) | function getPluginByPlatform(platform: string) {
  function isSupportFeatureMethod (line 91) | function isSupportFeatureMethod(platform: string, featureMethod: keyof I...
  function getPluginPrimaryKey (line 99) | function getPluginPrimaryKey(pluginItem: IPluginDelegateLike) {
  function setup (line 108) | async function setup() {
  function useSupportedPlugin (line 131) | function useSupportedPlugin(
  function useSortedSupportedPlugin (line 139) | function useSortedSupportedPlugin(
  function useSortedPlugins (line 155) | function useSortedPlugins() {

FILE: src/shared/service-manager/common.ts
  type ServiceName (line 1) | enum ServiceName {

FILE: src/shared/service-manager/main.ts
  class ServiceInstance (line 8) | class ServiceInstance {
    method constructor (line 18) | constructor(serviceName: string, subprocessPath: string) {
    method onHostChange (line 24) | onHostChange(callback: (host: string | null) => void) {
    method start (line 29) | start() {
    method stop (line 69) | stop() {
  type IServiceData (line 81) | interface IServiceData {
  class ServiceManager (line 86) | class ServiceManager {
    method addService (line 91) | private addService(serviceName: ServiceName) {
    method startService (line 105) | startService(serviceName: ServiceName) {
    method stopService (line 109) | stopService(serviceName: ServiceName) {
    method setup (line 113) | setup(windowManager: IWindowManager) {

FILE: src/shared/service-manager/preload.ts
  function setup (line 16) | async function setup() {
  function getServiceHost (line 24) | function getServiceHost(serviceName: ServiceName) {

FILE: src/shared/service-manager/renderer.ts
  type IMod (line 3) | interface IMod {
  class RequestForwarderService (line 11) | class RequestForwarderService {
    method forwardRequest (line 13) | static forwardRequest(url: string, method?: string, headers?: Record<a...

FILE: src/shared/short-cut/main.ts
  type IShortCutKeys (line 7) | type IShortCutKeys = keyof IAppConfig["shortCut.shortcuts"];
  class ShortCut (line 9) | class ShortCut {
    method setup (line 10) | async setup() {
    method registerAllGlobalShortCuts (line 22) | public async registerAllGlobalShortCuts() {
    method unregisterAllGlobalShortCuts (line 37) | public unregisterAllGlobalShortCuts() {
    method registerGlobalShortCut (line 42) | public async registerGlobalShortCut(key: IShortCutKeys, shortCut: stri...
    method unregisterGlobalShortCut (line 76) | public async unregisterGlobalShortCut(key: IShortCutKeys) {

FILE: src/shared/short-cut/preload.ts
  function registerGlobalShortCut (line 4) | function registerGlobalShortCut(key: string, shortCut: string[]) {
  function unregisterGlobalShortCut (line 8) | function unregisterGlobalShortCut(key: string) {

FILE: src/shared/short-cut/renderer.ts
  type IShortCutKeys (line 7) | type IShortCutKeys = keyof IAppConfig["shortCut.shortcuts"];
  type IMod (line 9) | interface IMod {
  class ShortCut (line 26) | class ShortCut {
    method setup (line 29) | setup() {
    method registerLocalShortCut (line 44) | registerLocalShortCut(key: IShortCutKeys, shortCut: string[]) {
    method unregisterLocalShortCut (line 70) | unregisterLocalShortCut(key: IShortCutKeys) {
    method registerGlobalShortCut (line 89) | registerGlobalShortCut(key: IShortCutKeys, shortCut: string[]) {
    method unregisterGlobalShortCut (line 93) | unregisterGlobalShortCut(key: IShortCutKeys) {

FILE: src/shared/themepack/preload.ts
  function selectTheme (line 39) | async function selectTheme(themePack: ICommon.IThemePack | null) {
  function replaceAlias (line 106) | function replaceAlias(
  function checkPath (line 117) | async function checkPath() {
  function parseThemePack (line 159) | async function parseThemePack(
  function initCurrentTheme (line 201) | async function initCurrentTheme() {
  function loadThemePacks (line 217) | async function loadThemePacks() {
  function installRemoteThemePack (line 235) | async function installRemoteThemePack(remoteUrl: string) {
  function installThemePack (line 255) | async function installThemePack(themePackPath: string) {
  function uninstallThemePack (line 281) | async function uninstallThemePack(themePack: ICommon.IThemePack) {

FILE: src/shared/themepack/renderer.ts
  function selectTheme (line 14) | async function selectTheme(themePack: ICommon.IThemePack | null) {
  function selectThemeByHash (line 22) | async function selectThemeByHash(hash: string) {
  function setupThemePacks (line 34) | async function setupThemePacks() {
  function loadThemePacks (line 58) | async function loadThemePacks() {
  function installThemePack (line 65) | async function installThemePack(themePackPath: string) {
  function installRemoteThemePack (line 79) | async function installRemoteThemePack(remoteUrl: string, id?: string) {
  function uninstallThemePack (line 101) | async function uninstallThemePack(themePack: ICommon.IThemePack) {
  function useLocalThemePacks (line 115) | function useLocalThemePacks() {

FILE: src/shared/themepack/type.d.ts
  type IMod (line 1) | type IMod = typeof import("./preload").mod;

FILE: src/shared/utils/main.ts
  class Utils (line 8) | class Utils {
    method setup (line 11) | public setup(windowManager: IWindowManager) {
    method setupAppUtil (line 21) | private setupAppUtil() {
    method setupWindowUtil (line 65) | private setupWindowUtil() {
    method setupShellUtil (line 134) | private setupShellUtil() {
    method setupDialogUtil (line 154) | private setupDialogUtil() {

FILE: src/shared/utils/preload.ts
  function writeFile (line 11) | function writeFile(...args: Parameters<typeof originalFsWriteFile>): Ret...
  function readFile (line 15) | function readFile(...args: Parameters<typeof originalFsReadFile>): Retur...
  function isFile (line 19) | async function isFile(path: string) {
  function isFolder (line 28) | async function isFolder(path: string) {
  function addFileScheme (line 37) | function addFileScheme(filePath: string) {
  function exitApp (line 53) | function exitApp() {
  function getPath (line 57) | async function getPath(pathName: "home" | "appData" | "userData" | "sess...
  function checkUpdate (line 61) | async function checkUpdate() {
  function getCacheSize (line 65) | async function getCacheSize() {
  function clearCache (line 69) | async function clearCache() {
  function minMainWindow (line 83) | function minMainWindow(skipTaskBar: boolean) {
  function showMainWindow (line 87) | function showMainWindow() {
  function setLyricWindow (line 91) | function setLyricWindow(enabled: boolean) {
  function setMinimodeWindow (line 95) | function setMinimodeWindow(enabled: boolean) {
  function ignoreMouseEvent (line 99) | function ignoreMouseEvent(ignore: boolean) {
  function toggleMainWindowVisible (line 103) | function toggleMainWindowVisible() {
  function toggleMainWindowMaximize (line 107) | function toggleMainWindowMaximize() {
  function openExternal (line 122) | function openExternal(url: string) {
  function openPath (line 126) | function openPath(path: string) {
  function showItemInFolder (line 130) | async function showItemInFolder(path: string): Promise<boolean> {
  function showOpenDialog (line 141) | function showOpenDialog(options: Electron.OpenDialogOptions): Promise<El...
  function showSaveDialog (line 145) | function showSaveDialog(options: Electron.SaveDialogOptions): Promise<El...

FILE: src/shared/utils/renderer.ts
  type IMod (line 4) | interface IMod {

FILE: src/shared/window-drag/main.ts
  constant WM_MOUSEMOVE (line 9) | const WM_MOUSEMOVE = 0x0200;
  constant WM_LBUTTONUP (line 10) | const WM_LBUTTONUP = 0x0202;
  constant MK_LBUTTON (line 12) | const MK_LBUTTON = 0x0001;
  type IDragOptions (line 14) | interface IDragOptions {
  class WindowDrag (line 92) | class WindowDrag {
    method setup (line 95) | setup(): void {
    method setWindowDraggable (line 118) | setWindowDraggable(window: BrowserWindow, options: IDragOptions): void {

FILE: src/shared/window-drag/preload.ts
  function dragWindow (line 3) | function dragWindow(position: ICommon.IPoint) {

FILE: src/shared/window-drag/renderer.ts
  type IMod (line 4) | interface IMod {
  function injectHandler (line 15) | function injectHandler() {

FILE: src/types/app-config.d.ts
  type _IAppConfig (line 1) | interface _IAppConfig {
  type PartialOrNull (line 109) | type PartialOrNull<T> = { [P in keyof T]?: T[P] | null };
  type IAppConfig (line 110) | type IAppConfig = PartialOrNull<_IAppConfig>;
  type IAppConfigKey (line 111) | type IAppConfigKey = keyof IAppConfig;

FILE: src/types/assets.d.ts
  type Styles (line 1) | type Styles = Record<string, string>;

FILE: src/types/audio-controller.d.ts
  type IAudioController (line 4) | interface IAudioController {

FILE: src/types/common.d.ts
  type WithMusicList (line 2) | type WithMusicList<T> = T & {
  type PaginationResponse (line 6) | type PaginationResponse<T> = {
  type IUpdateInfo (line 11) | interface IUpdateInfo {
  type IPoint (line 20) | interface IPoint {
  type ISize (line 25) | interface ISize {
  type IThemePack (line 30) | interface IThemePack {
  type IDownloadFileSize (line 54) | interface IDownloadFileSize {
  type ICommonReturnType (line 61) | type ICommonReturnType = [
  type ICommand (line 69) | interface ICommand {
  type ICommandKey (line 77) | type ICommandKey = keyof ICommand;

FILE: src/types/main/window-manager.d.ts
  type IWindowNames (line 3) | type IWindowNames = "main" | "lyric" | "minimode";
  type IWindowEvents (line 5) | interface IWindowEvents {
  type IWindowManager (line 12) | interface IWindowManager {

FILE: src/types/media.d.ts
  type SupportMediaItem (line 2) | type SupportMediaItem = {
  type SupportMediaType (line 10) | type SupportMediaType = keyof SupportMediaItem;
  type IUnique (line 12) | interface IUnique {
  type IMediaBase (line 20) | interface IMediaBase extends IUnique {
  type IMusicSource (line 28) | interface IMusicSource {
  type IMusicItem (line 37) | interface IMusicItem extends IMedia.IMediaBase {
  type IMusicItemInternalData (line 60) | interface IMusicItemInternalData {
  type IMusicSheetItem (line 67) | interface IMusicSheetItem extends IMedia.IMediaBase {
  type IDBMusicSheetItem (line 87) | interface IDBMusicSheetItem extends IMusicSheetItem {
  type ILocalMusicList (line 91) | interface ILocalMusicList {
  type IMusicSheetGroupItem (line 97) | interface IMusicSheetGroupItem {
  type IQualityKey (line 103) | type IQualityKey = "low" | "standard" | "high" | "super";
  type IMusicItemPartial (line 105) | type IMusicItemPartial = Partial<IMusicItem>;
  type IAlbumItem (line 109) | interface IAlbumItem extends IMusic.IMusicSheetItem {
  type IArtistItem (line 122) | interface IArtistItem {
  type ArtistMediaType (line 133) | type ArtistMediaType = "music" | "album";
  type ILyricItem (line 137) | interface ILyricItem extends IMusic.IMusicItem {
  type ILyricSource (line 142) | interface ILyricSource {
  type ICommentItem (line 150) | interface ICommentItem {
  type IComment (line 166) | interface IComment extends ICommentItem {

FILE: src/types/model.d.ts
  type IMusicSheetModel (line 3) | interface IMusicSheetModel {
  type IMusicItemModel (line 27) | interface IMusicItemModel {

FILE: src/types/plugin.d.ts
  type IMediaSourceResult (line 2) | interface IMediaSourceResult {
  type ISearchResult (line 12) | interface ISearchResult<T extends IMedia.SupportMediaType> {
  type ISearchResultType (line 17) | type ISearchResultType = IMedia.SupportMediaType;
  type ISearchFunc (line 19) | type ISearchFunc = <T extends IMedia.SupportMediaType>(
  type IGetArtistWorksFunc (line 25) | type IGetArtistWorksFunc = <T extends IArtist.ArtistMediaType>(
  type IUserVariable (line 31) | interface IUserVariable {
  type IAlbumInfoResult (line 40) | interface IAlbumInfoResult {
  type ISheetInfoResult (line 46) | interface ISheetInfoResult {
  type ITopListInfoResult (line 52) | interface ITopListInfoResult {
  type IGetRecommendSheetTagsResult (line 58) | interface IGetRecommendSheetTagsResult {
  type IGetCommentResult (line 64) | interface IGetCommentResult {
  type IPluginDefine (line 69) | interface IPluginDefine {
  type IPluginInstance (line 142) | interface IPluginInstance extends IPluginDefine {
  type R (line 148) | type R = Required<IPluginInstance>;
  type IPluginInstanceMethods (line 149) | type IPluginInstanceMethods = {
  type IPluginMeta (line 154) | type IPluginMeta = {
  type IPluginDelegate (line 159) | type IPluginDelegate = {

FILE: src/types/preload.d.ts
  type Window (line 1) | interface Window {

FILE: src/types/user-perference.d.ts
  type IType (line 2) | interface IType {
  type IDBType (line 24) | interface IDBType {

FILE: src/types/window.d.ts
  type Window (line 2) | interface Window {
  type FontData (line 8) | interface FontData {

FILE: src/webworkers/db-worker.ts
  function getSheetItem (line 15) | function getSheetItem(sheetId: string): IMusic.IMusicSheetItem | null {

FILE: src/webworkers/db-worker/index.ts
  function setupWorker (line 13) | function setupWorker(dbPath: string) {

FILE: src/webworkers/db-worker/utils.ts
  function checkTableName (line 5) | function checkTableName(tableName: string) {
  function isTableExist (line 17) | function isTableExist(database: Database, tableName: string) {
  function createMusicListTable (line 25) | function createMusicListTable(database: Database, tableName: string) {

FILE: src/webworkers/downloader.ts
  function cleanFile (line 10) | async function cleanFile(filePath: string) {
  type IOnStateChangeFunc (line 52) | type IOnStateChangeFunc = (data: {
  function downloadFile (line 59) | async function downloadFile(
  type IOptions (line 157) | interface IOptions {
  function downloadFileNew (line 162) | async function downloadFileNew(

FILE: src/webworkers/local-file-watcher.ts
  function setupWatcher (line 17) | async function setupWatcher(initPaths?: string[]) {
  function changeWatchPath (line 78) | async function changeWatchPath(addPaths?: string[], rmPaths?: string[]) {
  function onAdd (line 110) | async function onAdd(fn: (musicItems: IMusic.IMusicItem[]) => void) {
  function onRemove (line 114) | async function onRemove(fn: (filePaths: string[]) => void) {
Condensed preview — 410 files, each showing path, character count, and a content snippet. Download the .json file or copy for the full structured content (1,126K chars).
[
  {
    "path": ".github/PULL_REQUEST_TEMPLATE.md",
    "chars": 522,
    "preview": "> [!CAUTION] \n> PR 请提交到 `dev` 分支  (Please submit PR to `dev` branch)\n\n## PR 解决的问题 (PR Summary)\n> 简单描述一下这个 PR 要解决的问题,如果是 "
  },
  {
    "path": ".github/workflows/build.yml",
    "chars": 7341,
    "preview": "name: Build\n\non:\n  workflow_dispatch:\n\njobs:\n  build-meta:\n    runs-on: ubuntu-latest\n    steps:\n      - uses: actions/c"
  },
  {
    "path": ".github/workflows/release.yml",
    "chars": 3984,
    "preview": "name: Release\n\non:\n    workflow_dispatch:\n        inputs:\n            run_id:\n                description: 'Build workfl"
  },
  {
    "path": ".gitignore",
    "chars": 1287,
    "preview": "# Logs\nlogs\n*.log\nnpm-debug.log*\nyarn-debug.log*\nyarn-error.log*\nlerna-debug.log*\n\n# Diagnostic reports (https://nodejs."
  },
  {
    "path": ".husky/pre-commit",
    "chars": 73,
    "preview": "#!/usr/bin/env sh\n. \"$(dirname -- \"$0\")/_/husky.sh\"\n\nnpm run lint-staged\n"
  },
  {
    "path": ".vscode/settings.json",
    "chars": 284,
    "preview": "{\n  \"editor.formatOnSave\": true,\n  \"files.associations\": {\n    \"*.html\": \"html\",\n    \"map\": \"cpp\"\n  },\n  \"editor.default"
  },
  {
    "path": "LICENSE",
    "chars": 34523,
    "preview": "                    GNU AFFERO GENERAL PUBLIC LICENSE\n                       Version 3, 19 November 2007\n\n Copyright (C)"
  },
  {
    "path": "README.md",
    "chars": 4544,
    "preview": "# MusicFree 桌面版\n![GitHub Repo stars](https://img.shields.io/github/stars/maotoumao/MusicFreeDesktop) \n![GitHub forks](ht"
  },
  {
    "path": "changelog.md",
    "chars": 2561,
    "preview": "`2025-10-24 v0.0.8`\n1. 【修复】修复了一些可能导致白屏的问题\n\n`2025-03-30 v0.0.7`\n1. 【功能】开发者模式:狂点托盘图标可打开开发者工具\n2. 【修复】修复退出应用时可能出现的进程残留的问题(感谢"
  },
  {
    "path": "config/webpack.main.config.ts",
    "chars": 807,
    "preview": "import type { Configuration } from \"webpack\";\nimport path from \"path\";\n\nimport { rules } from \"./webpack.rules\";\n\nexport"
  },
  {
    "path": "config/webpack.plugins.ts",
    "chars": 685,
    "preview": "import type IForkTsCheckerWebpackPlugin from \"fork-ts-checker-webpack-plugin\";\n\n// eslint-disable-next-line @typescript-"
  },
  {
    "path": "config/webpack.renderer.config.ts",
    "chars": 1367,
    "preview": "import type { Configuration } from \"webpack\";\nimport path from \"path\";\n\nimport { rules } from \"./webpack.rules\";\nimport "
  },
  {
    "path": "config/webpack.rules.ts",
    "chars": 953,
    "preview": "import type { ModuleOptions } from 'webpack';\n\nexport const rules: Required<ModuleOptions>['rules'] = [\n  // Add support"
  },
  {
    "path": "eslint.config.mjs",
    "chars": 3330,
    "preview": "import globals from \"globals\";\nimport js from \"@eslint/js\";\nimport tseslint from \"typescript-eslint\";\nimport importPlugi"
  },
  {
    "path": "forge.config.ts",
    "chars": 3273,
    "preview": "import type { ForgeConfig } from \"@electron-forge/shared-types\";\nimport { MakerZIP } from \"@electron-forge/maker-zip\";\ni"
  },
  {
    "path": "package.json",
    "chars": 3723,
    "preview": "{\n  \"name\": \"musicfree-desktop\",\n  \"productName\": \"MusicFree\",\n  \"version\": \"0.0.8\",\n  \"description\": \"一个插件化的音乐播放器\",\n  \""
  },
  {
    "path": "release/build-windows.iss",
    "chars": 2081,
    "preview": "; Script generated by the Inno Setup Script Wizard.\n; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FI"
  },
  {
    "path": "release/version.json",
    "chars": 191,
    "preview": "{\n  \"version\": \"0.0.8\",\n  \"changeLog\": [\n    \"1. 【修复】修复了一些可能导致白屏的问题\"\n  ],\n  \"download\": [\n    \"https://r0rvr854dd1.feish"
  },
  {
    "path": "res/.service/request-forwarder.js",
    "chars": 3003,
    "preview": "const http = require(\"http\");\nconst https = require(\"https\");\n\n\nconst defaultPort = 52735;\nconst maxRetries = 20;\n\nlet r"
  },
  {
    "path": "res/lang/en-US.json",
    "chars": 14967,
    "preview": "{\n  \"common\": {\n    \"cancel\": \"Cancel\",\n    \"confirm\": \"Confirm\",\n    \"download\": \"Download\",\n    \"downloading\": \"Downlo"
  },
  {
    "path": "res/lang/zh-CN.json",
    "chars": 11532,
    "preview": "{\n  \"common\": {\n    \"cancel\": \"取消\",\n    \"confirm\": \"确认\",\n    \"download\": \"下载\",\n    \"downloading\": \"下载中\",\n    \"downloaded"
  },
  {
    "path": "res/lang/zh-TW.json",
    "chars": 11560,
    "preview": "{\n  \"common\": {\n    \"cancel\": \"取消\",\n    \"confirm\": \"確認\",\n    \"download\": \"下載\",\n    \"downloading\": \"下載中\",\n    \"downloaded"
  },
  {
    "path": "scripts/feishu-upload.js",
    "chars": 11686,
    "preview": "const fs = require('fs');\nconst path = require('path');\nconst { Readable } = require('stream');\nconst { Client } = requi"
  },
  {
    "path": "src/common/async-memoize.ts",
    "chars": 265,
    "preview": "\nexport default function asyncMemoize<R, T extends (...args: any[]) => Promise<R>>(callback: T): T{\n    let val: R;\n\n   "
  },
  {
    "path": "src/common/camel-to-snake.ts",
    "chars": 152,
    "preview": "export default function camelToSnake(camelCaseStr: string): string {\n    return camelCaseStr.replace(/([A-Z])/g, \"_$1\")."
  },
  {
    "path": "src/common/constant.ts",
    "chars": 4376,
    "preview": "import { IAppConfig } from \"@/types/app-config\";\nimport { ICommand } from \"@shared/message-bus/type\";\n\nexport const inte"
  },
  {
    "path": "src/common/debounce.ts",
    "chars": 333,
    "preview": "import debounce from \"lodash.debounce\";\n\nexport default function (\n    ...args: Parameters<typeof debounce>\n): ReturnTyp"
  },
  {
    "path": "src/common/event-wrapper.ts",
    "chars": 1389,
    "preview": "import EventEmitter from \"eventemitter3\";\nimport { useEffect } from \"react\";\n\nclass EventWrapper<EventTypes> {\n    priva"
  },
  {
    "path": "src/common/file-util.ts",
    "chars": 4373,
    "preview": "import { ICommonTagsResult, IPicture, parseFile } from \"music-metadata\";\nimport path from \"path\";\nimport { localPluginNa"
  },
  {
    "path": "src/common/get-resource-path.ts",
    "chars": 361,
    "preview": "/**\n * 只在主进程中使用 获取资源文件的绝对路径\n * @param resourceName 资源文件名\n * @return 资源文件的绝对路径\n */\n\nimport { app } from \"electron\";\nimpor"
  },
  {
    "path": "src/common/index-map.ts",
    "chars": 1387,
    "preview": "export interface IIndexMap {\n    indexOf: (mediaItem?: IMedia.IMediaBase | null) => number;\n    has: (mediaItem?: IMedia"
  },
  {
    "path": "src/common/is-renderer.ts",
    "chars": 249,
    "preview": "export function isRenderer() {\n    if (typeof process === \"undefined\" || !process) {\n        // renderer process has no "
  },
  {
    "path": "src/common/media-util.ts",
    "chars": 4394,
    "preview": "import { produce, setAutoFreeze } from \"immer\";\nimport {\n    internalDataKey,\n    localPluginName,\n    qualityKeys,\n    "
  },
  {
    "path": "src/common/normalize-util.ts",
    "chars": 2432,
    "preview": "export function normalizeNumberCN(number: number): string {\n    if (number < 10000) {\n        return `${number}`;\n    }\n"
  },
  {
    "path": "src/common/safe-serialization.ts",
    "chars": 265,
    "preview": "export function safeStringify(object: object) {\n    try {\n        return JSON.stringify(object);\n    } catch {\n        r"
  },
  {
    "path": "src/common/store.ts",
    "chars": 1896,
    "preview": "// 数据存储方案\nimport { useEffect, useState } from \"react\";\n\nexport class StateMapper<T> {\n    private getFun: () => T;\n    p"
  },
  {
    "path": "src/common/thumb-bar-util.ts",
    "chars": 3755,
    "preview": "/**\n * Thumb Bar Util\n */\n\nimport { BrowserWindow, nativeImage } from \"electron\";\nimport getResourcePath from \"@/common/"
  },
  {
    "path": "src/common/time-util.ts",
    "chars": 682,
    "preview": "export function secondsToDuration(seconds: number | string) {\n    if (typeof seconds === \"string\") {\n        return seco"
  },
  {
    "path": "src/common/unique-map.ts",
    "chars": 1751,
    "preview": "export interface IUniqueMap {\n    getMap: () => Record<string, Set<string>>;\n    has: (mediaItem?: IMedia.IMediaBase | n"
  },
  {
    "path": "src/common/void-callback.ts",
    "chars": 90,
    "preview": "// eslint-disable-next-line @typescript-eslint/no-empty-function\nexport default () => {};\n"
  },
  {
    "path": "src/hooks/useAppConfig.ts",
    "chars": 704,
    "preview": "import AppConfig from \"@shared/app-config/renderer\";\nimport { IAppConfig } from \"@/types/app-config\";\nimport { useEffect"
  },
  {
    "path": "src/hooks/useLocalFonts.ts",
    "chars": 567,
    "preview": "import Store from \"@/common/store\";\nimport { useEffect } from \"react\";\n\nconst fontsStore = new Store<FontData[] | null>("
  },
  {
    "path": "src/hooks/useMediaDevices.ts",
    "chars": 469,
    "preview": "import { useEffect, useState } from \"react\";\n\nexport function useOutputAudioDevices() {\n    const [devices, setDevices] "
  },
  {
    "path": "src/hooks/useMounted.ts",
    "chars": 286,
    "preview": "import { useEffect, useRef } from \"react\";\n\nexport default function useMounted(){\n    const isMounted = useRef(false);\n\n"
  },
  {
    "path": "src/hooks/useStateRef.ts",
    "chars": 257,
    "preview": "import { useRef, useState } from \"react\";\n\nexport default function useStateRef<T>(initValue: T) {\n    const [state, setS"
  },
  {
    "path": "src/hooks/useVirtualList.ts",
    "chars": 4083,
    "preview": "import {\n    MutableRefObject,\n    useCallback,\n    useEffect,\n    useRef,\n    useState,\n} from \"react\";\nimport throttle"
  },
  {
    "path": "src/main/deep-link/index.ts",
    "chars": 1440,
    "preview": "import { supportLocalMediaType } from \"@/common/constant\";\nimport { parseLocalMusicItem, safeStat } from \"@/common/file-"
  },
  {
    "path": "src/main/index.ts",
    "chars": 8849,
    "preview": "import { app, BrowserWindow, globalShortcut } from \"electron\";\nimport fs from \"fs\";\nimport path from \"path\";\nimport { se"
  },
  {
    "path": "src/main/native_modules/TaskbarThumbnailManager/TaskbarThumbnailManager.node.d.ts",
    "chars": 354,
    "preview": "declare module \"@native/TaskbarThumbnailManager/TaskbarThumbnailManager.node\" {\n    interface ISize {\n        width: num"
  },
  {
    "path": "src/main/tray-manager/index.ts",
    "chars": 10165,
    "preview": "import { app, Menu, MenuItem, MenuItemConstructorOptions, nativeImage, Tray } from \"electron\";\nimport { t } from \"@share"
  },
  {
    "path": "src/main/window-manager/index.ts",
    "chars": 18032,
    "preview": "import { app, BrowserWindow, nativeImage, screen } from \"electron\";\nimport getResourcePath from \"@/common/get-resource-p"
  },
  {
    "path": "src/preload/common-preload.ts",
    "chars": 520,
    "preview": "// See the Electron documentation for details on how to use preload scripts:\nimport { contextBridge } from \"electron\";\ni"
  },
  {
    "path": "src/preload/extension.ts",
    "chars": 77,
    "preview": "import \"./common-preload\";\n\nimport \"@/shared/message-bus/preload/extension\";\n"
  },
  {
    "path": "src/preload/index.ts",
    "chars": 348,
    "preview": "// See the Electron documentation for details on how to use preload scripts:\nimport \"./common-preload\";\n// https://www.e"
  },
  {
    "path": "src/renderer/app.scss",
    "chars": 2335,
    "preview": ".app-container {\n  width: 100vw;\n  height: 100vh;\n  display: flex;\n  flex-direction: column;\n  overflow: hidden;\n  posit"
  },
  {
    "path": "src/renderer/app.tsx",
    "chars": 629,
    "preview": "import AppHeader from \"./components/Header\";\n\nimport \"./app.scss\";\nimport MusicBar from \"./components/MusicBar\";\nimport "
  },
  {
    "path": "src/renderer/components/A/index.tsx",
    "chars": 521,
    "preview": "import { shellUtil } from \"@shared/utils/renderer\";\n\nexport default function A(\n    props: React.DetailedHTMLProps<\n    "
  },
  {
    "path": "src/renderer/components/AnimatedDiv/index.tsx",
    "chars": 1949,
    "preview": "import React, { useMemo, useState, useEffect } from \"react\";\n\n\n\ninterface IProps\n    extends React.DetailedHTMLProps<\n  "
  },
  {
    "path": "src/renderer/components/ArtistItem/index.scss",
    "chars": 1676,
    "preview": ".components--artist-item-container {\n  $width: 140px;\n  $height: 216px;\n  width: $width;\n  height: $height;\n\n  & .artist"
  },
  {
    "path": "src/renderer/components/ArtistItem/index.tsx",
    "chars": 2116,
    "preview": "import { setFallbackAlbum } from \"@/renderer/utils/img-on-error\";\nimport \"./index.scss\";\nimport albumImg from \"@/assets/"
  },
  {
    "path": "src/renderer/components/BottomLoadingState/index.scss",
    "chars": 964,
    "preview": ".bottom-loading-state {\n  width: 100%;\n  height: 4rem;\n  display: flex;\n  align-items: center;\n  justify-content: center"
  },
  {
    "path": "src/renderer/components/BottomLoadingState/index.tsx",
    "chars": 1963,
    "preview": "import { useEffect, useRef } from \"react\";\nimport { RequestStateCode } from \"@/common/constant\";\nimport \"./index.scss\";\n"
  },
  {
    "path": "src/renderer/components/Checkbox/index.scss",
    "chars": 232,
    "preview": ".checkbox-container {\n  width: 1rem;\n  height: 1rem;\n  border-radius: 2px;\n  border: 1px solid currentColor;\n  position:"
  },
  {
    "path": "src/renderer/components/Checkbox/index.tsx",
    "chars": 663,
    "preview": "import { CSSProperties } from \"react\";\nimport SvgAsset from \"../SvgAsset\";\nimport \"./index.scss\";\n\ninterface ICheckboxPr"
  },
  {
    "path": "src/renderer/components/Condition/index.tsx",
    "chars": 1626,
    "preview": "import { ReactNode } from \"react\";\n\ninterface IConditionProps {\n    condition: any;\n    truthy?: ReactNode;\n    falsy?: "
  },
  {
    "path": "src/renderer/components/ContextMenu/index.scss",
    "chars": 914,
    "preview": ".context-menu--single-column-container {\n  position: fixed;\n  overflow-y: auto;\n  z-index: 999999;\n  border-radius: 6px;"
  },
  {
    "path": "src/renderer/components/ContextMenu/index.tsx",
    "chars": 9346,
    "preview": "import Store from \"@/common/store\";\nimport SvgAsset, { SvgAssetIconNames } from \"../SvgAsset\";\nimport \"./index.scss\";\nim"
  },
  {
    "path": "src/renderer/components/DragReceiver/index.scss",
    "chars": 555,
    "preview": "\n.components--drag-receiver {\n    position: absolute;\n    left: 0;\n    height: 12px;\n    width: 100%;\n    display: flex;"
  },
  {
    "path": "src/renderer/components/DragReceiver/index.tsx",
    "chars": 2166,
    "preview": "import { useCallback, useState, DragEvent } from \"react\";\nimport { IfTruthy } from \"../Condition\";\nimport \"./index.scss\""
  },
  {
    "path": "src/renderer/components/Empty/index.scss",
    "chars": 145,
    "preview": ".components--empty-container {\n    width: 100%;\n    display: flex;\n    align-items: center;\n    justify-content: center;"
  },
  {
    "path": "src/renderer/components/Empty/index.tsx",
    "chars": 424,
    "preview": "import { CSSProperties } from \"react\";\nimport \"./index.scss\";\nimport { useTranslation } from \"react-i18next\";\n\ninterface"
  },
  {
    "path": "src/renderer/components/Header/index.scss",
    "chars": 2882,
    "preview": ".header-container {\n  width: 100vw;\n  height: var(--appHeaderHeight, 54px);\n  background-color: var(--primaryColor);\n  d"
  },
  {
    "path": "src/renderer/components/Header/index.tsx",
    "chars": 6981,
    "preview": "import SvgAsset from \"../SvgAsset\";\nimport \"./index.scss\";\nimport { showModal } from \"../Modal\";\nimport { useNavigate } "
  },
  {
    "path": "src/renderer/components/Header/widgets/Navigator/index.scss",
    "chars": 566,
    "preview": ".header-navigator {\n    height: 40px;\n    -webkit-app-region: none;\n    display: flex;\n    align-items: center;\n\n    & ."
  },
  {
    "path": "src/renderer/components/Header/widgets/Navigator/index.tsx",
    "chars": 1587,
    "preview": "import SvgAsset from \"@/renderer/components/SvgAsset\";\nimport \"./index.scss\";\nimport { useNavigate } from \"react-router-"
  },
  {
    "path": "src/renderer/components/Header/widgets/SearchHistory/index.scss",
    "chars": 1030,
    "preview": ".search-history--container {\n  position: absolute;\n  box-sizing: border-box;\n  width: 100%;\n  height: 220px;\n  overflow-"
  },
  {
    "path": "src/renderer/components/Header/widgets/SearchHistory/index.tsx",
    "chars": 3472,
    "preview": "import SvgAsset from \"@/renderer/components/SvgAsset\";\nimport \"./index.scss\";\nimport { useEffect, useState } from \"react"
  },
  {
    "path": "src/renderer/components/Loading/index.scss",
    "chars": 1278,
    "preview": ".loading-container {\n  width: 100%;\n  height: 100%;\n  min-height: 300px;\n  display: flex;\n  flex-direction: column;\n  al"
  },
  {
    "path": "src/renderer/components/Loading/index.tsx",
    "chars": 504,
    "preview": "import { useTranslation } from \"react-i18next\";\nimport \"./index.scss\";\n\ninterface ILoadingProps {\n    text?: string\n}\nex"
  },
  {
    "path": "src/renderer/components/Modal/index.tsx",
    "chars": 997,
    "preview": "import Store from \"@/common/store\";\nimport templates from \"./templates\";\nimport { useMemo } from \"react\";\n\ntype ITemplat"
  },
  {
    "path": "src/renderer/components/Modal/templates/AddMusicToSheet/index.scss",
    "chars": 814,
    "preview": ".modal--add-music-to-sheet-container {\n  width: 400px;\n  max-height: 540px;\n  border-radius: 12px;\n  display: flex;\n  fl"
  },
  {
    "path": "src/renderer/components/Modal/templates/AddMusicToSheet/index.tsx",
    "chars": 3016,
    "preview": "import MusicSheet, { defaultSheet } from \"@/renderer/core/music-sheet\";\nimport Base from \"../Base\";\nimport \"./index.scss"
  },
  {
    "path": "src/renderer/components/Modal/templates/AddNewSheet/index.tsx",
    "chars": 1338,
    "preview": "import { useCallback } from \"react\";\nimport MusicSheet from \"@/renderer/core/music-sheet\";\nimport debounce from \"@/commo"
  },
  {
    "path": "src/renderer/components/Modal/templates/Base/index.scss",
    "chars": 862,
    "preview": ".components--modal-base {\n  position: fixed;\n  z-index: 10010;\n  top: 0;\n  left: 0;\n  right: 0;\n  bottom: 0;\n  display: "
  },
  {
    "path": "src/renderer/components/Modal/templates/Base/index.tsx",
    "chars": 2205,
    "preview": "import { ReactNode, useRef } from \"react\";\nimport { hideModal } from \"../..\";\nimport \"./index.scss\";\nimport SvgAsset fro"
  },
  {
    "path": "src/renderer/components/Modal/templates/ExitConfirm/index.scss",
    "chars": 95,
    "preview": ".modal--exit-confirm-container {\n    width: 440px;\n    height: 240px;\n    border-radius: 8px;\n}"
  },
  {
    "path": "src/renderer/components/Modal/templates/ExitConfirm/index.tsx",
    "chars": 382,
    "preview": "import { useTranslation } from \"react-i18next\";\nimport Base from \"../Base\";\nimport \"./index.scss\";\n\nexport default funct"
  },
  {
    "path": "src/renderer/components/Modal/templates/ImportMusicSheet/index.scss",
    "chars": 365,
    "preview": ".modal--import-music-sheet {\n  width: 360px;\n\n  & .content-container {\n    max-height: 540px;\n    min-height: 100px;\n  }"
  },
  {
    "path": "src/renderer/components/Modal/templates/ImportMusicSheet/index.tsx",
    "chars": 3315,
    "preview": "import { hideModal, showModal } from \"../..\";\nimport Base from \"../Base\";\nimport { toast } from \"react-toastify\";\nimport"
  },
  {
    "path": "src/renderer/components/Modal/templates/PluginSubscription/index.scss",
    "chars": 770,
    "preview": ".modal--plugin-subscription {\n  width: 420px;\n  border-radius: 12px;\n  display: flex;\n  flex-direction: column;\n  min-he"
  },
  {
    "path": "src/renderer/components/Modal/templates/PluginSubscription/index.tsx",
    "chars": 4219,
    "preview": "import {\n    getUserPreference,\n    setUserPreference,\n} from \"@/renderer/utils/user-perference\";\nimport { hideModal } f"
  },
  {
    "path": "src/renderer/components/Modal/templates/Reconfirm/index.scss",
    "chars": 476,
    "preview": ".modal--reconfirm {\n  width: 420px;\n  border-radius: 12px;\n  display: flex;\n  flex-direction: column;\n  min-height: 164p"
  },
  {
    "path": "src/renderer/components/Modal/templates/Reconfirm/index.tsx",
    "chars": 1452,
    "preview": "import { useTranslation } from \"react-i18next\";\nimport { hideModal } from \"../..\";\nimport Base from \"../Base\";\nimport \"."
  },
  {
    "path": "src/renderer/components/Modal/templates/SearchLyric/hooks/searchResultStore.ts",
    "chars": 398,
    "preview": "import { RequestStateCode } from \"@/common/constant\";\nimport Store from \"@/common/store\";\n\nexport interface ISearchLyric"
  },
  {
    "path": "src/renderer/components/Modal/templates/SearchLyric/hooks/useSearchLyric.ts",
    "chars": 5591,
    "preview": "import { RequestStateCode } from \"@/common/constant\";\nimport { useCallback, useRef } from \"react\";\nimport searchResultSt"
  },
  {
    "path": "src/renderer/components/Modal/templates/SearchLyric/index.scss",
    "chars": 766,
    "preview": ".modal--search-lyric-container {\n  width: 600px;\n  max-height: 540px;\n  border-radius: 8px;\n  display: flex;\n  flex-dire"
  },
  {
    "path": "src/renderer/components/Modal/templates/SearchLyric/index.tsx",
    "chars": 3382,
    "preview": "import { useEffect, useState } from \"react\";\nimport Base from \"../Base\";\nimport \"./index.scss\";\nimport SvgAsset from \"@/"
  },
  {
    "path": "src/renderer/components/Modal/templates/SearchLyric/searchResult.scss",
    "chars": 993,
    "preview": ".search-result-container {\n    width: 100%;\n    height: 100%;\n\n    & .search-result-falsy-container {\n        width: 100"
  },
  {
    "path": "src/renderer/components/Modal/templates/SearchLyric/searchResult.tsx",
    "chars": 3989,
    "preview": "import { memo } from \"react\";\nimport { ISearchLyricResult } from \"./hooks/searchResultStore\";\nimport { If } from \"@/rend"
  },
  {
    "path": "src/renderer/components/Modal/templates/SelectOne/index.scss",
    "chars": 1081,
    "preview": ".modal--select-one-container {\n  width: 400px;\n  max-height: 540px;\n  border-radius: 8px;\n  display: flex;\n  flex-direct"
  },
  {
    "path": "src/renderer/components/Modal/templates/SelectOne/index.tsx",
    "chars": 3616,
    "preview": "import { useState } from \"react\";\nimport { hideModal } from \"../..\";\nimport Base from \"../Base\";\nimport \"./index.scss\";\n"
  },
  {
    "path": "src/renderer/components/Modal/templates/SimpleInputWithState/index.scss",
    "chars": 674,
    "preview": ".modal--simple-input-with-state {\n  width: 420px;\n  border-radius: 12px;\n  display: flex;\n  flex-direction: column;\n  mi"
  },
  {
    "path": "src/renderer/components/Modal/templates/SimpleInputWithState/index.tsx",
    "chars": 3870,
    "preview": "import { ReactNode, useState } from \"react\";\nimport \"./index.scss\";\nimport Base from \"../Base\";\nimport useMounted from \""
  },
  {
    "path": "src/renderer/components/Modal/templates/Sparkles/index.scss",
    "chars": 659,
    "preview": ".modal--sparkles-container {\n  width: 600px;\n  height: 400px;\n  border-radius: 8px;\n  display: flex;\n  flex-direction: c"
  },
  {
    "path": "src/renderer/components/Modal/templates/Sparkles/index.tsx",
    "chars": 2092,
    "preview": "import A from \"@/renderer/components/A\";\nimport Base from \"../Base\";\nimport \"./index.scss\";\nimport wcChannelImg from \"@/"
  },
  {
    "path": "src/renderer/components/Modal/templates/Update/index.scss",
    "chars": 573,
    "preview": ".modal--update-container {\n  width: 600px;\n  max-height: 400px;\n  border-radius: 8px;\n  display: flex;\n  flex-direction:"
  },
  {
    "path": "src/renderer/components/Modal/templates/Update/index.tsx",
    "chars": 2258,
    "preview": "import { setUserPreference } from \"@/renderer/utils/user-perference\";\nimport Base from \"../Base\";\nimport \"./index.scss\";"
  },
  {
    "path": "src/renderer/components/Modal/templates/WatchLocalDir/index.scss",
    "chars": 1461,
    "preview": ".modal--watch-local-dir-container {\n  width: 500px;\n  border-radius: 8px;\n  display: flex;\n  flex-direction: column;\n\n  "
  },
  {
    "path": "src/renderer/components/Modal/templates/WatchLocalDir/index.tsx",
    "chars": 8644,
    "preview": "import {\n    getUserPreferenceIDB,\n    setUserPreferenceIDB,\n} from \"@/renderer/utils/user-perference\";\nimport Base from"
  },
  {
    "path": "src/renderer/components/Modal/templates/index.ts",
    "chars": 798,
    "preview": "import AddMusicToSheet from \"./AddMusicToSheet\";\nimport AddNewSheet from \"./AddNewSheet\";\nimport Base from \"./Base\";\nimp"
  },
  {
    "path": "src/renderer/components/MusicBar/index.scss",
    "chars": 246,
    "preview": ".music-bar-container {\n  width: 100vw;\n  height: var(--appMusicBarHeight, 64px);\n  border-top: 1px solid var(--dividerCo"
  },
  {
    "path": "src/renderer/components/MusicBar/index.tsx",
    "chars": 462,
    "preview": "import Slider from \"./widgets/Slider\";\nimport MusicInfo from \"./widgets/MusicInfo\";\nimport Controller from \"./widgets/Co"
  },
  {
    "path": "src/renderer/components/MusicBar/widgets/Controller/index.scss",
    "chars": 648,
    "preview": "// 控制区域\n.music-controller {\n  margin-left: 10px;\n  flex: 1;\n  height: 100%;\n  display: flex;\n  align-items: center;\n  ju"
  },
  {
    "path": "src/renderer/components/MusicBar/widgets/Controller/index.tsx",
    "chars": 1609,
    "preview": "import SvgAsset from \"@/renderer/components/SvgAsset\";\nimport \"./index.scss\";\nimport trackPlayer from \"@renderer/core/tr"
  },
  {
    "path": "src/renderer/components/MusicBar/widgets/Extra/index.scss",
    "chars": 1010,
    "preview": "// 其他区域\n.music-extra {\n  width: 280px;\n  height: 100%;\n  display: flex;\n  align-items: center;\n  justify-content: flex-e"
  },
  {
    "path": "src/renderer/components/MusicBar/widgets/Extra/index.tsx",
    "chars": 11423,
    "preview": "import SvgAsset from \"@/renderer/components/SvgAsset\";\nimport \"./index.scss\";\nimport SwitchCase from \"@/renderer/compone"
  },
  {
    "path": "src/renderer/components/MusicBar/widgets/MusicInfo/index.scss",
    "chars": 2367,
    "preview": "$width: 290px;\n\n.music-info-outer-container {\n  width: $width;\n  height: 100%;\n  position: relative;\n  overflow: hidden;"
  },
  {
    "path": "src/renderer/components/MusicBar/widgets/MusicInfo/index.tsx",
    "chars": 5416,
    "preview": "import SvgAsset from \"@/renderer/components/SvgAsset\";\nimport { setFallbackAlbum } from \"@/renderer/utils/img-on-error\";"
  },
  {
    "path": "src/renderer/components/MusicBar/widgets/Slider/index.scss",
    "chars": 671,
    "preview": "@use \"sass:math\";\n\n.music-bar--slider-container {\n  position: absolute;\n  width: 100%;\n  left: 0;\n  $height: 12px;\n  top"
  },
  {
    "path": "src/renderer/components/MusicBar/widgets/Slider/index.tsx",
    "chars": 2510,
    "preview": "import { useEffect, useRef, useState } from \"react\";\nimport \"./index.scss\";\nimport trackPlayer from \"@renderer/core/trac"
  },
  {
    "path": "src/renderer/components/MusicDetail/index.scss",
    "chars": 2092,
    "preview": ".music-detail--container {\n  position: absolute;\n  top: 0;\n  left: 0;\n  right: 0;\n  bottom: 0;\n  z-index: 3000;\n  box-si"
  },
  {
    "path": "src/renderer/components/MusicDetail/index.tsx",
    "chars": 3426,
    "preview": "import AnimatedDiv from \"../AnimatedDiv\";\nimport \"./index.scss\";\nimport albumImg from \"@/assets/imgs/album-cover.jpg\";\ni"
  },
  {
    "path": "src/renderer/components/MusicDetail/store.ts",
    "chars": 92,
    "preview": "import Store from \"@/common/store\";\n\nexport const musicDetailShownStore = new Store(false);\n"
  },
  {
    "path": "src/renderer/components/MusicDetail/widgets/Header/index.scss",
    "chars": 912,
    "preview": ".music-detail--header-container {\n  width: 100%;\n  height: var(--appHeaderHeight);\n  flex-shrink: 0;\n  -webkit-app-regio"
  },
  {
    "path": "src/renderer/components/MusicDetail/widgets/Header/index.tsx",
    "chars": 1985,
    "preview": "import \"./index.scss\";\nimport { musicDetailShownStore } from \"@renderer/components/MusicDetail/store\";\nimport SvgAsset f"
  },
  {
    "path": "src/renderer/components/MusicDetail/widgets/Lyric/index.scss",
    "chars": 2530,
    "preview": "$width: 40vw;\n$height: 100%;\n.lyric-container-outer {\n  position: relative;\n  width: $width;\n  height: $height;\n\n  & .ly"
  },
  {
    "path": "src/renderer/components/MusicDetail/widgets/Lyric/index.tsx",
    "chars": 14245,
    "preview": "import \"./index.scss\";\nimport Condition, { IfTruthy } from \"@/renderer/components/Condition\";\nimport Loading from \"@/ren"
  },
  {
    "path": "src/renderer/components/MusicDownloaded/index.scss",
    "chars": 244,
    "preview": ".music-download-base {\n  display: flex;\n  align-items: center;\n  justify-content: center;\n}\n\n.music-downloaded {\n  color"
  },
  {
    "path": "src/renderer/components/MusicDownloaded/index.tsx",
    "chars": 1908,
    "preview": "import { isSameMedia } from \"@/common/media-util\";\nimport SvgAsset, { SvgAssetIconNames } from \"@/renderer/components/Sv"
  },
  {
    "path": "src/renderer/components/MusicFavorite/index.tsx",
    "chars": 1120,
    "preview": "import SvgAsset from \"../SvgAsset\";\nimport MusicSheet from \"@/renderer/core/music-sheet\";\n\ninterface IMusicFavoriteProps"
  },
  {
    "path": "src/renderer/components/MusicList/index.scss",
    "chars": 1747,
    "preview": ".music-list-container {\n  width: 100%;\n  min-height: 300px;\n\n  &:focus-visible {\n    outline: none;\n  }\n\n  & th {\n    po"
  },
  {
    "path": "src/renderer/components/MusicList/index.tsx",
    "chars": 25066,
    "preview": "import {\n    ColumnDef,\n    createColumnHelper,\n    flexRender,\n    getCoreRowModel,\n    getSortedRowModel,\n    SortingS"
  },
  {
    "path": "src/renderer/components/MusicSheetlikeItem/index.scss",
    "chars": 1818,
    "preview": ".components--albumlike-item-container {\n  $width: 140px;\n  $height: 216px;\n  width: $width;\n  height: $height;\n\n  & .alb"
  },
  {
    "path": "src/renderer/components/MusicSheetlikeItem/index.tsx",
    "chars": 2548,
    "preview": "import { setFallbackAlbum } from \"@/renderer/utils/img-on-error\";\nimport \"./index.scss\";\nimport albumImg from \"@/assets/"
  },
  {
    "path": "src/renderer/components/MusicSheetlikeList/index.scss",
    "chars": 231,
    "preview": ".music-sheet-like-list--container {\n    width: 100%;\n\n    & .music-sheet-like-list--body {\n        display: grid;\n      "
  },
  {
    "path": "src/renderer/components/MusicSheetlikeList/index.tsx",
    "chars": 1760,
    "preview": "import { RequestStateCode } from \"@/common/constant\";\nimport { memo } from \"react\";\nimport \"./index.scss\";\nimport Bottom"
  },
  {
    "path": "src/renderer/components/MusicSheetlikeView/components/Body/index.scss",
    "chars": 817,
    "preview": ".music-sheetlike-view--body-container {\n  & .operations {\n    margin-top: 1rem;\n    margin-bottom: 1rem;\n    display: fl"
  },
  {
    "path": "src/renderer/components/MusicSheetlikeView/components/Body/index.tsx",
    "chars": 5968,
    "preview": "import MusicList from \"@/renderer/components/MusicList\";\nimport \"./index.scss\";\nimport SvgAsset from \"@/renderer/compone"
  },
  {
    "path": "src/renderer/components/MusicSheetlikeView/components/Header/index.scss",
    "chars": 1257,
    "preview": ".music-sheetlike-view--header-container {\n  margin-top: 24px;\n  display: flex;\n  min-height: 160px;\n\n  & img {\n    width"
  },
  {
    "path": "src/renderer/components/MusicSheetlikeView/components/Header/index.tsx",
    "chars": 3161,
    "preview": "import { setFallbackAlbum } from \"@/renderer/utils/img-on-error\";\nimport albumImg from \"@/assets/imgs/album-cover.jpg\";\n"
  },
  {
    "path": "src/renderer/components/MusicSheetlikeView/index.scss",
    "chars": 53,
    "preview": ".music-sheetlike-view--container {\n    width: 100%;\n}"
  },
  {
    "path": "src/renderer/components/MusicSheetlikeView/index.tsx",
    "chars": 1399,
    "preview": "import { ReactNode, useEffect } from \"react\";\nimport { RequestStateCode } from \"@/common/constant\";\nimport Body from \"./"
  },
  {
    "path": "src/renderer/components/MusicSheetlikeView/store.ts",
    "chars": 172,
    "preview": "import { rem } from \"@/common/constant\";\nimport Store from \"@/common/store\";\n\nexport const initValue = 184 + 4 * rem;\nex"
  },
  {
    "path": "src/renderer/components/NoPlugin/index.scss",
    "chars": 198,
    "preview": ".no-plugin-container {\n    width: 100%;\n    flex: 1;\n    min-height: 300px;\n    display: flex;\n    flex-direction: colum"
  },
  {
    "path": "src/renderer/components/NoPlugin/index.tsx",
    "chars": 1446,
    "preview": "import { Link } from \"react-router-dom\";\nimport \"./index.scss\";\nimport { Trans, useTranslation } from \"react-i18next\";\n\n"
  },
  {
    "path": "src/renderer/components/Panel/index.tsx",
    "chars": 1036,
    "preview": "import Store from \"@/common/store\";\nimport templates from \"./templates\";\nimport { useMemo } from \"react\";\n\ntype ITemplat"
  },
  {
    "path": "src/renderer/components/Panel/templates/Base/index.scss",
    "chars": 1286,
    "preview": ".components--panel-base {\n  position: absolute;\n  z-index: 10000;\n  top: 0;\n  left: 0;\n  right: 0;\n  bottom: 0;\n  displa"
  },
  {
    "path": "src/renderer/components/Panel/templates/Base/index.tsx",
    "chars": 3017,
    "preview": "import { ReactNode, useEffect, useRef } from \"react\";\nimport \"./index.scss\";\nimport SvgAsset from \"@/renderer/components"
  },
  {
    "path": "src/renderer/components/Panel/templates/MusicComment/index.scss",
    "chars": 999,
    "preview": ".music-comment-panel--title-container {\n  margin: 24px 16px 8px;\n  font-size: 1.2rem;\n  font-weight: 600;\n}\n\n.music-comm"
  },
  {
    "path": "src/renderer/components/Panel/templates/MusicComment/index.tsx",
    "chars": 2268,
    "preview": "import Base from \"@renderer/components/Panel/templates/Base\";\nimport \"./index.scss\";\nimport { useTranslation } from \"rea"
  },
  {
    "path": "src/renderer/components/Panel/templates/MusicComment/useComment.ts",
    "chars": 1382,
    "preview": "import { useEffect, useRef, useState } from \"react\";\nimport { RequestStateCode } from \"@/common/constant\";\nimport Plugin"
  },
  {
    "path": "src/renderer/components/Panel/templates/PlayList/index.scss",
    "chars": 1570,
    "preview": ".playlist--header {\n  box-sizing: border-box;\n  display: flex;\n  justify-content: space-between;\n  align-items: center;\n"
  },
  {
    "path": "src/renderer/components/Panel/templates/PlayList/index.tsx",
    "chars": 12502,
    "preview": "import \"./index.scss\";\nimport { memo, useEffect, useRef, useState } from \"react\";\nimport trackPlayer from \"@renderer/cor"
  },
  {
    "path": "src/renderer/components/Panel/templates/UserVariables/index.scss",
    "chars": 760,
    "preview": ".panel--user-variables-submit {\n    font-weight: 400;\n    padding: 0.4rem 0.6rem;\n    font-size: 1rem;\n    border-radius"
  },
  {
    "path": "src/renderer/components/Panel/templates/UserVariables/index.tsx",
    "chars": 2710,
    "preview": "import { useRef } from \"react\";\nimport Base from \"../Base\";\nimport \"./index.scss\";\nimport { hidePanel } from \"../..\";\nim"
  },
  {
    "path": "src/renderer/components/Panel/templates/index.ts",
    "chars": 232,
    "preview": "import Base from \"./Base\";\nimport PlayList from \"./PlayList\";\nimport UserVariables from \"./UserVariables\";\nimport MusicC"
  },
  {
    "path": "src/renderer/components/SvgAsset/index.tsx",
    "chars": 2033,
    "preview": "import { memo } from \"react\";\n\nexport type SvgAssetIconNames =\n    | \"album\"\n    | \"array-download-tray\"\n    | \"arrow-le"
  },
  {
    "path": "src/renderer/components/SwitchCase/index.tsx",
    "chars": 682,
    "preview": "import { ReactElement } from \"react\";\n\ninterface ISwitchProps {\n    switch: any;\n    children: any;\n}\n\nfunction Switch(p"
  },
  {
    "path": "src/renderer/components/Tag/index.scss",
    "chars": 405,
    "preview": ".components--tag-container {\n  font-size: 0.9rem;\n  color: var(--primaryColor);\n  border: 1px solid var(--primaryColor);"
  },
  {
    "path": "src/renderer/components/Tag/index.tsx",
    "chars": 508,
    "preview": "import { CSSProperties, ReactNode } from \"react\";\nimport \"./index.scss\";\n\ninterface ITagProps {\n    fill?: boolean;\n    "
  },
  {
    "path": "src/renderer/core/backup-resume/index.ts",
    "chars": 1336,
    "preview": "import MusicSheet from \"../music-sheet\";\n\n/**\n * 恢复\n * @param data 数据\n * @param overwrite 是否覆写歌单\n */\nasync function resu"
  },
  {
    "path": "src/renderer/core/db/music-sheet-db.ts",
    "chars": 863,
    "preview": "import { musicRefSymbol } from \"@/common/constant\";\nimport Dexie, { Table } from \"dexie\";\n\nclass MusicSheetDB extends De"
  },
  {
    "path": "src/renderer/core/downloader/downloaded-sheet.ts",
    "chars": 8429,
    "preview": "import {\n    getInternalData,\n    getMediaPrimaryKey,\n    isSameMedia,\n    setInternalData,\n} from \"@/common/media-util\""
  },
  {
    "path": "src/renderer/core/downloader/ee.ts",
    "chars": 234,
    "preview": "import EventEmitter from \"eventemitter3\";\n\nexport const ee = new EventEmitter();\n\nexport enum DownloadEvts {\n    Downloa"
  },
  {
    "path": "src/renderer/core/downloader/index.new.ts",
    "chars": 9199,
    "preview": "import * as Comlink from \"comlink\";\nimport { getGlobalContext } from \"@shared/global-context/renderer\";\nimport AppConfig"
  },
  {
    "path": "src/renderer/core/downloader/index.ts",
    "chars": 7698,
    "preview": "import {\n    getMediaPrimaryKey,\n    getQualityOrder,\n    isSameMedia,\n    setInternalData,\n} from \"@/common/media-util\""
  },
  {
    "path": "src/renderer/core/downloader/store.ts",
    "chars": 142,
    "preview": "import Store from \"@/common/store\";\n\nconst downloadingMusicStore = new Store<Array<IMusic.IMusicItem>>([]);\nexport { dow"
  },
  {
    "path": "src/renderer/core/link-lyric/index.ts",
    "chars": 2924,
    "preview": "import {\n    getInternalData,\n    getMediaPrimaryKey,\n    setInternalData,\n} from \"@/common/media-util\";\nimport { LRUCac"
  },
  {
    "path": "src/renderer/core/local-music/index.ts",
    "chars": 4980,
    "preview": "import localMusicListStore from \"./store\";\nimport { getUserPreferenceIDB } from \"@/renderer/utils/user-perference\";\nimpo"
  },
  {
    "path": "src/renderer/core/local-music/store.ts",
    "chars": 171,
    "preview": "import Store from \"@/common/store\";\n\nconst localMusicListStore = new Store<Array<IMusic.IMusicItem & {\n    $$localPath: "
  },
  {
    "path": "src/renderer/core/music-sheet/backend/index.ts",
    "chars": 14675,
    "preview": "/**\n * 这里不应该写任何和UI有关的逻辑,只是简单的数据库操作\n *\n * 除了frontend文件夹外,其他任何地方不应该直接调用此处定义的函数\n */\n\nimport { localPluginName, musicRefSymb"
  },
  {
    "path": "src/renderer/core/music-sheet/common/default-sheet.ts",
    "chars": 288,
    "preview": "import { localPluginName } from \"@/common/constant\";\nimport { i18n } from \"@/shared/i18n/renderer\";\n\nexport default {\n  "
  },
  {
    "path": "src/renderer/core/music-sheet/frontend/index.old.ts",
    "chars": 9549,
    "preview": "import Store from \"@/common/store\";\nimport * as backend from \"../backend\";\nimport defaultSheet from \"../common/default-s"
  },
  {
    "path": "src/renderer/core/music-sheet/frontend/index.ts",
    "chars": 29,
    "preview": "export * from \"./index.old\";\n"
  },
  {
    "path": "src/renderer/core/music-sheet/index.ts",
    "chars": 225,
    "preview": "import * as frontend from \"./frontend\";\nimport defaultSheet from \"./common/default-sheet\";\n\nconst MusicSheet = {\n    // "
  },
  {
    "path": "src/renderer/core/recently-playlist/index.ts",
    "chars": 2577,
    "preview": "import { isSameMedia } from \"@/common/media-util\";\nimport Store from \"@/common/store\";\nimport {\n    getUserPreferenceIDB"
  },
  {
    "path": "src/renderer/core/track-player/controller/audio-controller.ts",
    "chars": 8209,
    "preview": "/**\n * 播放音乐\n */\nimport { encodeUrlHeaders } from \"@/common/normalize-util\";\nimport albumImg from \"@/assets/imgs/album-co"
  },
  {
    "path": "src/renderer/core/track-player/controller/controller-base.ts",
    "chars": 555,
    "preview": "import { CurrentTime, ErrorReason } from \"@renderer/core/track-player/enum\";\nimport { PlayerState } from \"@/common/const"
  },
  {
    "path": "src/renderer/core/track-player/enum.ts",
    "chars": 983,
    "preview": "import LyricParser, { IParsedLrcItem } from \"@/renderer/utils/lyric-parser\";\n\n/** 错误信息 */\nexport enum ErrorReason {\n    "
  },
  {
    "path": "src/renderer/core/track-player/hooks.ts",
    "chars": 800,
    "preview": "import _trackPlayerStore from \"@renderer/core/track-player/store\";\n\nconst {\n    musicQueueStore,\n    currentMusicStore,\n"
  },
  {
    "path": "src/renderer/core/track-player/index.ts",
    "chars": 24663,
    "preview": "import { CurrentTime, ICurrentLyric, PlayerEvents } from \"./enum\";\nimport shuffle from \"lodash.shuffle\";\nimport {\n    ad"
  },
  {
    "path": "src/renderer/core/track-player/store.ts",
    "chars": 1207,
    "preview": "import Store from \"@/common/store\";\nimport { ICurrentLyric } from \"@renderer/core/track-player/enum\";\nimport { PlayerSta"
  },
  {
    "path": "src/renderer/document/bootstrap.ts",
    "chars": 8946,
    "preview": "import { localPluginHash, PlayerState, RepeatMode, supportLocalMediaType } from \"@/common/constant\";\nimport MusicSheet f"
  },
  {
    "path": "src/renderer/document/fallback.tsx",
    "chars": 1951,
    "preview": "import trackPlayer from \"../core/track-player\";\nimport \"./styles/fallback.scss\";\n\ninterface IProps {\n    error: Error,\n "
  },
  {
    "path": "src/renderer/document/index.html",
    "chars": 319,
    "preview": "<!DOCTYPE html>\n<html>\n  <head>\n    <meta charset=\"UTF-8\" />\n    <title>Music Free</title>\n    <meta name=\"referrer\" con"
  },
  {
    "path": "src/renderer/document/index.tsx",
    "chars": 2209,
    "preview": "import ReactDOM from \"react-dom/client\";\nimport App from \"../app\";\nimport \"animate.css\";\nimport ModalComponent from \"../"
  },
  {
    "path": "src/renderer/document/styles/base.scss",
    "chars": 1794,
    "preview": "// 基础样式重置和全局样式\nhtml,\nbody {\n    margin: 0;\n    width: 100vw;\n    height: 100vh;\n    overflow: hidden;\n    background-col"
  },
  {
    "path": "src/renderer/document/styles/components.scss",
    "chars": 3382,
    "preview": "// 表单组件样式\ninput {\n    outline: none;\n    font-size: 1rem;\n    padding: 0.4rem 0.6rem;\n    border-radius: 6px;\n    border"
  },
  {
    "path": "src/renderer/document/styles/fallback.scss",
    "chars": 5633,
    "preview": "// 错误边界页面样式\n\n.fallback-container {\n    display: flex;\n    flex-direction: column;\n    align-items: center;\n    justify-c"
  },
  {
    "path": "src/renderer/document/styles/index.scss",
    "chars": 185,
    "preview": "// 主样式文件 - 导入所有样式模块\n@forward './variables.scss';\n@forward './base.scss';\n@forward './utilities.scss';\n@forward './compon"
  },
  {
    "path": "src/renderer/document/styles/tables.scss",
    "chars": 1499,
    "preview": "// 表格组件样式\ntable {\n    width: 100%;\n    table-layout: fixed;\n    user-select: none;\n    border-collapse: collapse;\n    $r"
  },
  {
    "path": "src/renderer/document/styles/utilities.scss",
    "chars": 912,
    "preview": "// 工具类样式\n.blur10 {\n    backdrop-filter: blur(10px);\n}\n\n.divider {\n    width: 100%;\n    height: 1px;\n    background-color"
  },
  {
    "path": "src/renderer/document/styles/variables.scss",
    "chars": 2752,
    "preview": "// 全局变量定义模块\n\n// ===========================\n// 1. 主题色彩变量 (Theme Colors)\n// ===========================\n$primary-color: #"
  },
  {
    "path": "src/renderer/document/useBootstrap.ts",
    "chars": 791,
    "preview": "import { useEffect, useLayoutEffect } from \"react\";\nimport { useNavigate } from \"react-router-dom\";\nimport checkUpdate f"
  },
  {
    "path": "src/renderer/pages/main-page/components/SideBar/index.scss",
    "chars": 240,
    "preview": ".side-bar-container {\n    width: 220px;\n    height: 100%;\n    flex-shrink: 0;\n    flex-grow: 0;\n    overflow-y: auto;\n  "
  },
  {
    "path": "src/renderer/pages/main-page/components/SideBar/index.tsx",
    "chars": 1900,
    "preview": "import ListItem from \"./widgets/ListItem\";\nimport \"./index.scss\";\nimport MySheets from \"./widgets/MySheets\";\nimport { us"
  },
  {
    "path": "src/renderer/pages/main-page/components/SideBar/widgets/ListItem/index.scss",
    "chars": 877,
    "preview": ".side-bar--list-item-container {\n  $height: 3rem;\n  height: $height;\n  font-size: 1rem;\n  width: 100%;\n  position: relat"
  },
  {
    "path": "src/renderer/pages/main-page/components/SideBar/widgets/ListItem/index.tsx",
    "chars": 789,
    "preview": "import SvgAsset, { SvgAssetIconNames } from \"@/renderer/components/SvgAsset\";\nimport \"./index.scss\";\n\ninterface IProps {"
  },
  {
    "path": "src/renderer/pages/main-page/components/SideBar/widgets/MySheets/index.scss",
    "chars": 1035,
    "preview": ".side-bar-container--my-sheets {\n  & .divider {\n    margin-top: 0.5rem;\n    width: 100%;\n    height: 1px;\n    background"
  },
  {
    "path": "src/renderer/pages/main-page/components/SideBar/widgets/MySheets/index.tsx",
    "chars": 6606,
    "preview": "import \"./index.scss\";\nimport ListItem from \"../ListItem\";\nimport { useMatch, useNavigate } from \"react-router-dom\";\nimp"
  }
]

// ... and 210 more files (download for full content)

About this extraction

This page contains the full source code of the maotoumao/MusicFreeDesktop GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 410 files (1020.1 KB), approximately 244.8k tokens, and a symbol index with 941 extracted functions, classes, methods, constants, and types. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.

Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.

Copied to clipboard!