mirror of
https://github.com/imsyy/SPlayer.git
synced 2025-11-25 03:14:57 +08:00
🔧 build: 更新依赖
This commit is contained in:
@@ -29,6 +29,7 @@ export default {
|
||||
"createGlobalState": true,
|
||||
"createInjectionState": true,
|
||||
"createReactiveFn": true,
|
||||
"createRef": true,
|
||||
"createReusableTemplate": true,
|
||||
"createSharedComposable": true,
|
||||
"createTemplatePromise": true,
|
||||
@@ -146,6 +147,7 @@ export default {
|
||||
"useCloned": true,
|
||||
"useColorMode": true,
|
||||
"useConfirmDialog": true,
|
||||
"useCountdown": true,
|
||||
"useCounter": true,
|
||||
"useCssModule": true,
|
||||
"useCssVar": true,
|
||||
|
||||
2
auto-imports.d.ts
vendored
2
auto-imports.d.ts
vendored
@@ -21,6 +21,7 @@ declare global {
|
||||
const createGlobalState: typeof import('@vueuse/core')['createGlobalState']
|
||||
const createInjectionState: typeof import('@vueuse/core')['createInjectionState']
|
||||
const createReactiveFn: typeof import('@vueuse/core')['createReactiveFn']
|
||||
const createRef: typeof import('@vueuse/core')['createRef']
|
||||
const createReusableTemplate: typeof import('@vueuse/core')['createReusableTemplate']
|
||||
const createSharedComposable: typeof import('@vueuse/core')['createSharedComposable']
|
||||
const createTemplatePromise: typeof import('@vueuse/core')['createTemplatePromise']
|
||||
@@ -138,6 +139,7 @@ declare global {
|
||||
const useCloned: typeof import('@vueuse/core')['useCloned']
|
||||
const useColorMode: typeof import('@vueuse/core')['useColorMode']
|
||||
const useConfirmDialog: typeof import('@vueuse/core')['useConfirmDialog']
|
||||
const useCountdown: typeof import('@vueuse/core')['useCountdown']
|
||||
const useCounter: typeof import('@vueuse/core')['useCounter']
|
||||
const useCssModule: typeof import('vue')['useCssModule']
|
||||
const useCssVar: typeof import('@vueuse/core')['useCssVar']
|
||||
|
||||
1
components.d.ts
vendored
1
components.d.ts
vendored
@@ -2,6 +2,7 @@
|
||||
// @ts-nocheck
|
||||
// Generated by unplugin-vue-components
|
||||
// Read more: https://github.com/vuejs/core/pull/3399
|
||||
// biome-ignore lint: disable
|
||||
export {}
|
||||
|
||||
/* prettier-ignore */
|
||||
|
||||
@@ -7,7 +7,7 @@ import {
|
||||
nativeImage,
|
||||
nativeTheme,
|
||||
} from "electron";
|
||||
import { isWin, isLinux, isDev, appName } from "./utils";
|
||||
import { isWin, appName } from "./utils";
|
||||
import { join } from "path";
|
||||
import log from "./logger";
|
||||
|
||||
@@ -269,12 +269,8 @@ class CreateTray implements MainTray {
|
||||
|
||||
export const initTray = (win: BrowserWindow, lyricWin: BrowserWindow) => {
|
||||
try {
|
||||
// 若为 MacOS
|
||||
if (isWin || isLinux || isDev) {
|
||||
log.info("🚀 Tray Process Startup");
|
||||
return new CreateTray(win, lyricWin);
|
||||
}
|
||||
return null;
|
||||
log.info("🚀 Tray Process Startup");
|
||||
return new CreateTray(win, lyricWin);
|
||||
} catch (error) {
|
||||
log.error("❌ Tray Process Error", error);
|
||||
return null;
|
||||
|
||||
79
package.json
79
package.json
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "splayer",
|
||||
"productName": "SPlayer",
|
||||
"version": "3.0.0-beta.1",
|
||||
"version": "3.0.0-beta.2",
|
||||
"description": "A minimalist music player",
|
||||
"main": "./out/main/index.js",
|
||||
"author": "imsyy",
|
||||
@@ -40,21 +40,21 @@
|
||||
"@electron-toolkit/utils": "^3.0.0",
|
||||
"@imsyy/color-utils": "^1.0.2",
|
||||
"@material/material-color-utilities": "^0.3.0",
|
||||
"@pixi/app": "^7.4.2",
|
||||
"@pixi/core": "^7.4.2",
|
||||
"@pixi/display": "^7.4.2",
|
||||
"@pixi/filter-blur": "^7.4.2",
|
||||
"@pixi/app": "^7.4.3",
|
||||
"@pixi/core": "^7.4.3",
|
||||
"@pixi/display": "^7.4.3",
|
||||
"@pixi/filter-blur": "^7.4.3",
|
||||
"@pixi/filter-bulge-pinch": "^5.1.1",
|
||||
"@pixi/filter-color-matrix": "^7.4.2",
|
||||
"@pixi/sprite": "^7.4.2",
|
||||
"@vueuse/core": "^12.4.0",
|
||||
"NeteaseCloudMusicApi": "^4.25.0",
|
||||
"axios": "^1.7.9",
|
||||
"@pixi/filter-color-matrix": "^7.4.3",
|
||||
"@pixi/sprite": "^7.4.3",
|
||||
"@vueuse/core": "^12.8.2",
|
||||
"NeteaseCloudMusicApi": "^4.27.0",
|
||||
"axios": "^1.8.4",
|
||||
"change-case": "^5.4.4",
|
||||
"dayjs": "^1.11.13",
|
||||
"electron-dl": "^4.0.0",
|
||||
"electron-store": "^8.2.0",
|
||||
"electron-updater": "^6.3.9",
|
||||
"electron-updater": "^6.6.2",
|
||||
"file-saver": "^2.0.5",
|
||||
"font-list": "^1.5.1",
|
||||
"get-port": "^7.1.0",
|
||||
@@ -65,59 +65,66 @@
|
||||
"jss-preset-default": "^10.10.0",
|
||||
"localforage": "^1.10.0",
|
||||
"lodash-es": "^4.17.21",
|
||||
"marked": "^15.0.6",
|
||||
"marked": "^15.0.8",
|
||||
"md5": "^2.3.0",
|
||||
"music-metadata": "10.5.1",
|
||||
"pinia": "^2.3.0",
|
||||
"pinia": "^2.3.1",
|
||||
"pinia-plugin-persistedstate": "^4.2.0",
|
||||
"plyr": "^3.7.8",
|
||||
"vue-virt-list": "^1.5.9"
|
||||
"vue-virt-list": "^1.5.10"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@electron-toolkit/preload": "^3.0.1",
|
||||
"@electron-toolkit/tsconfig": "^1.0.1",
|
||||
"@electron-toolkit/utils": "^3.0.0",
|
||||
"@fastify/cookie": "^11.0.2",
|
||||
"@fastify/http-proxy": "^11.0.1",
|
||||
"@fastify/multipart": "^9.0.2",
|
||||
"@fastify/static": "^8.0.4",
|
||||
"@fastify/http-proxy": "^11.1.2",
|
||||
"@fastify/multipart": "^9.0.3",
|
||||
"@fastify/static": "^8.1.1",
|
||||
"@types/file-saver": "^2.0.7",
|
||||
"@types/howler": "^2.2.12",
|
||||
"@types/js-cookie": "^3.0.6",
|
||||
"@types/md5": "^2.3.5",
|
||||
"@types/node": "^22.10.7",
|
||||
"@typescript-eslint/eslint-plugin": "^8.20.0",
|
||||
"@typescript-eslint/parser": "^8.20.0",
|
||||
"@vitejs/plugin-vue": "^5.2.1",
|
||||
"@types/node": "^22.14.1",
|
||||
"@typescript-eslint/eslint-plugin": "^8.30.1",
|
||||
"@typescript-eslint/parser": "^8.30.1",
|
||||
"@vitejs/plugin-vue": "^5.2.3",
|
||||
"ajv": "^8.17.1",
|
||||
"crypto-js": "^4.2.0",
|
||||
"electron": "^30.5.1",
|
||||
"electron-builder": "^25.1.8",
|
||||
"electron-log": "^5.2.4",
|
||||
"electron-vite": "^2.3.0",
|
||||
"eslint": "^9.18.0",
|
||||
"eslint-plugin-vue": "^9.32.0",
|
||||
"electron": "^35.1.5",
|
||||
"electron-builder": "^26.0.12",
|
||||
"electron-log": "^5.3.4",
|
||||
"electron-vite": "^3.1.0",
|
||||
"eslint": "^9.24.0",
|
||||
"eslint-plugin-vue": "^9.33.0",
|
||||
"fast-glob": "^3.3.3",
|
||||
"fastify": "^5.2.1",
|
||||
"fastify": "^5.3.1",
|
||||
"naive-ui": "^2.41.0",
|
||||
"node-taglib-sharp": "^6.0.1",
|
||||
"prettier": "^3.4.2",
|
||||
"sass": "^1.83.4",
|
||||
"terser": "^5.37.0",
|
||||
"typescript": "5.6.2",
|
||||
"prettier": "^3.5.3",
|
||||
"sass": "^1.86.3",
|
||||
"terser": "^5.39.0",
|
||||
"typescript": "^5.8.3",
|
||||
"unplugin-auto-import": "^0.19.0",
|
||||
"unplugin-vue-components": "^28.0.0",
|
||||
"vite": "^5.4.11",
|
||||
"unplugin-vue-components": "^28.5.0",
|
||||
"vite": "^5.4.18",
|
||||
"vite-plugin-compression": "^0.5.1",
|
||||
"vite-plugin-wasm": "^3.4.1",
|
||||
"vue": "^3.5.13",
|
||||
"vue-router": "^4.5.0",
|
||||
"vue-tsc": "2.0.29"
|
||||
"vue-tsc": "^2.2.8"
|
||||
},
|
||||
"pnpm": {
|
||||
"overrides": {
|
||||
"dmg-builder": "25.1.8",
|
||||
"electron-builder-squirrel-windows": "25.1.8"
|
||||
}
|
||||
},
|
||||
"onlyBuiltDependencies": [
|
||||
"@parcel/watcher",
|
||||
"core-js",
|
||||
"electron",
|
||||
"esbuild",
|
||||
"vue-demi"
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
2815
pnpm-lock.yaml
generated
2815
pnpm-lock.yaml
generated
File diff suppressed because it is too large
Load Diff
@@ -73,13 +73,6 @@
|
||||
</div>
|
||||
<n-switch v-model:value="settingStore.useSongUnlock" class="set" :round="false" />
|
||||
</n-card>
|
||||
<n-card class="set-item">
|
||||
<div class="label">
|
||||
<n-text class="name">听歌打卡</n-text>
|
||||
<n-text class="tip" :depth="3">是否将播放歌曲同步至网易云音乐</n-text>
|
||||
</div>
|
||||
<n-switch v-model:value="settingStore.scrobbleSong" class="set" :round="false" />
|
||||
</n-card>
|
||||
<n-card v-if="isElectron" class="set-item">
|
||||
<div class="label">
|
||||
<n-text class="name">音频输出设备</n-text>
|
||||
|
||||
@@ -12,7 +12,6 @@ import { heartRateList } from "@/api/playlist";
|
||||
import { formatSongsList } from "./format";
|
||||
import { isLogin } from "./auth";
|
||||
import { openUserLogin } from "./modal";
|
||||
import { scrobble } from "@/api/user";
|
||||
import { personalFm, personalFmToTrash } from "@/api/rec";
|
||||
import blob from "./blob";
|
||||
|
||||
@@ -647,8 +646,6 @@ class Player {
|
||||
const playListLength = playList.length;
|
||||
// 播放列表是否为空
|
||||
if (playListLength === 0) throw new Error("Play list is empty");
|
||||
// 打卡
|
||||
this.scrobbleSong();
|
||||
// 若为私人FM
|
||||
if (statusStore.personalFmMode) {
|
||||
await this.initPersonalFM(true);
|
||||
@@ -853,9 +850,7 @@ class Player {
|
||||
const musicStore = useMusicStore();
|
||||
const statusStore = useStatusStore();
|
||||
// 获取配置
|
||||
const { showTip, scrobble, play } = options;
|
||||
// 打卡
|
||||
if (scrobble) this.scrobbleSong();
|
||||
const { showTip, play } = options;
|
||||
// 更新列表
|
||||
await dataStore.setPlayList(cloneDeep(data));
|
||||
// 关闭特殊模式
|
||||
@@ -1109,29 +1104,6 @@ class Player {
|
||||
this.message?.destroy();
|
||||
}
|
||||
}
|
||||
/**
|
||||
* 听歌打卡
|
||||
*/
|
||||
async scrobbleSong() {
|
||||
const musicStore = useMusicStore();
|
||||
const statusStore = useStatusStore();
|
||||
const settingStore = useSettingStore();
|
||||
try {
|
||||
if (!isLogin()) return;
|
||||
if (!settingStore.scrobbleSong) return;
|
||||
// 获取所需数据
|
||||
const playSongData = this.getPlaySongData();
|
||||
if (!playSongData) return;
|
||||
const { id, name } = playSongData;
|
||||
const sourceid = musicStore.playPlaylistId;
|
||||
const time = statusStore.duration;
|
||||
// 网易云打卡
|
||||
console.log("打卡:", id, name, sourceid, time);
|
||||
await scrobble(id, sourceid, time);
|
||||
} catch (error) {
|
||||
console.error("Failed to scrobble song:", error);
|
||||
}
|
||||
}
|
||||
/**
|
||||
* 初始化私人FM
|
||||
* @param playNext 是否播放下一首
|
||||
|
||||
Reference in New Issue
Block a user