From 9f2ac783ecce638241fa4af4d5f81a3fc9ae6d6e Mon Sep 17 00:00:00 2001 From: Leko Date: Mon, 19 Dec 2022 12:49:19 +0800 Subject: [PATCH] 3.8.1 --- README.md | 6 +++--- README_zh.md | 4 ++-- dataModule/netease2.js | 6 +++--- install/index.html | 4 ++-- package-lock.json | 4 ++-- package.json | 2 +- 6 files changed, 13 insertions(+), 13 deletions(-) diff --git a/README.md b/README.md index a37930c1..8907f874 100644 --- a/README.md +++ b/README.md @@ -2,11 +2,11 @@ [![GitHub issues](https://img.shields.io/github/issues/gnehs/PokaPlayer.svg?style=flat-square)](https://github.com/gnehs/PokaPlayer/issues) [![GitHub forks](https://img.shields.io/github/forks/gnehs/PokaPlayer.svg?style=flat-square)](https://github.com/gnehs/PokaPlayer/network) [![GitHub stars](https://img.shields.io/github/stars/gnehs/PokaPlayer.svg?style=flat-square)](https://github.com/gnehs/PokaPlayer/stargazers) -[![GitHub license](https://img.shields.io/github/license/gnehs/PokaPlayer.svg?style=flat-square)](https://github.com/gnehs/PokaPlayer/blob/master/LICENSE) +[![GitHub license](https://img.shields.io/github/license/gnehs/PokaPlayer.svg?style=flat-square)](https://github.com/gnehs/PokaPlayer/blob/master-3/LICENSE) [![GitHub tag (latest Ver)](https://img.shields.io/github/package-json/v/gnehs/PokaPlayer.svg?style=flat-square)](https://github.com/gnehs/PokaPlayer/releases/latest) -[![GitHub repo size in bytes](https://img.shields.io/github/repo-size/gnehs/PokaPlayer.svg?style=flat-square)](https://github.com/gnehs/PokaPlayer/archive/master.zip) +[![GitHub repo size in bytes](https://img.shields.io/github/repo-size/gnehs/PokaPlayer.svg?style=flat-square)](https://github.com/gnehs/PokaPlayer/archive/master-3.zip) -[繁體中文](https://github.com/gnehs/PokaPlayer/blob/master/README_zh.md) +[繁體中文](https://github.com/gnehs/PokaPlayer/blob/master-3/README_zh.md) # PokaPlayer PokaPlayer is a player that can unify and play from multiple sources like DSM and Netease. diff --git a/README_zh.md b/README_zh.md index aea5f808..6ea725b8 100644 --- a/README_zh.md +++ b/README_zh.md @@ -2,9 +2,9 @@ [![GitHub issues](https://img.shields.io/github/issues/gnehs/PokaPlayer.svg?style=flat-square)](https://github.com/gnehs/PokaPlayer/issues) [![GitHub forks](https://img.shields.io/github/forks/gnehs/PokaPlayer.svg?style=flat-square)](https://github.com/gnehs/PokaPlayer/network) [![GitHub stars](https://img.shields.io/github/stars/gnehs/PokaPlayer.svg?style=flat-square)](https://github.com/gnehs/PokaPlayer/stargazers) -[![GitHub license](https://img.shields.io/github/license/gnehs/PokaPlayer.svg?style=flat-square)](https://github.com/gnehs/PokaPlayer/blob/master/LICENSE) +[![GitHub license](https://img.shields.io/github/license/gnehs/PokaPlayer.svg?style=flat-square)](https://github.com/gnehs/PokaPlayer/blob/master-3/LICENSE) [![GitHub tag (latest Ver)](https://img.shields.io/github/package-json/v/gnehs/PokaPlayer.svg?style=flat-square)](https://github.com/gnehs/PokaPlayer/releases/latest) -[![GitHub repo size in bytes](https://img.shields.io/github/repo-size/gnehs/PokaPlayer.svg?style=flat-square)](https://github.com/gnehs/PokaPlayer/archive/master.zip) +[![GitHub repo size in bytes](https://img.shields.io/github/repo-size/gnehs/PokaPlayer.svg?style=flat-square)](https://github.com/gnehs/PokaPlayer/archive/master-3.zip) [![Docker Build Status](https://img.shields.io/docker/build/gnehs/pokaplayer.svg?style=flat-square)](https://hub.docker.com/r/gnehs/pokaplayer/) # PokaPlayer diff --git a/dataModule/netease2.js b/dataModule/netease2.js index a7318f6d..7d7e124e 100644 --- a/dataModule/netease2.js +++ b/dataModule/netease2.js @@ -22,7 +22,7 @@ const qrcode = require('qrcode-terminal'); try { fs.readJsonSync(PIN_FILE_PATH, "utf8"); } catch (e) { - fs.writeFileSync(PIN_FILE_PATH, "[]"); + fs.writeJsonSync(PIN_FILE_PATH, []); } const defaultImage = config.isPremium ? "https://i.imgur.com/ZFaycMw.gif" : "/img/icons/apple-touch-icon.png"; @@ -730,13 +730,13 @@ async function getPlaylists(uid) { }; } -async function getPlaylistSongs(id, br = 999000) { +async function getPlaylistSongs(id, userId) { let name; if (isIdName(id)) [id, name] = decomposeIdName(id); if (id == "dailyRecommendSongs") { let result = await client(options(`/recommend/songs`)); if (result.code == 200) { - let r = result.data.dailySongs.map((x, index) => ({ + let r = result.data.dailySongs.map(x => ({ name: x.name, artist: x.ar.map(x => x.name).join(", "), artistId: x.ar[0].id, diff --git a/install/index.html b/install/index.html index ce6e2923..f120b92b 100644 --- a/install/index.html +++ b/install/index.html @@ -19,7 +19,7 @@

Please refer to the config-simple.json to create the config.json file

config-simple.json + href="https://github.com/gnehs/PokaPlayer/blob/master-3/config-simple.json">config-simple.json
@@ -32,7 +32,7 @@

請參考 config-simple.json 來建立設定檔

config-simple.json + href="https://github.com/gnehs/PokaPlayer/blob/master-3/config-simple.json">config-simple.json 設定教學
diff --git a/package-lock.json b/package-lock.json index 63f28eb5..30b9c3e6 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "pokaplayer", - "version": "3.7.6", + "version": "3.8.1", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "pokaplayer", - "version": "3.7.6", + "version": "3.8.1", "license": "MIT", "dependencies": { "axios": "^0.24.0", diff --git a/package.json b/package.json index e552d286..c0ef4cf6 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "pokaplayer", - "version": "3.7.6", + "version": "3.8.1", "description": "", "main": "index.js", "scripts": {