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