Skip to content

Commit

Permalink
Merge pull request #64 from gnehs/dev
Browse files Browse the repository at this point in the history
Dev
  • Loading branch information
gnehs authored Sep 24, 2018
2 parents 1edd7ec + 7e7df00 commit 471fa69
Show file tree
Hide file tree
Showing 13 changed files with 1,720 additions and 1,296 deletions.
4 changes: 0 additions & 4 deletions config-simple.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,6 @@
"account": "YOUR_ACCOUNT",
"password": "YOUR_PASSWORD"
},
"Meting": {
"enabled": false,
"url": "METING_URL"
},
"auth": {
"jwtPassword": "test",
"jwtIss": "PokaPlayer",
Expand Down
542 changes: 339 additions & 203 deletions dataModule.js

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions dataModule/dsm.js
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ function parseArtists(artists) {
r.push({
name: artists[i].name,
source: 'DSM',
cover: `/pokaapi/cover/?moduleName=DSM&data=${encodeURIComponent(JSON.stringify({"type":"artist","info":artists[i].name||'未知'}))}`,
cover: `/pokaapi/cover/?moduleName=DSM&data=${encodeURIComponent(JSON.stringify({"type":"artist","info":artists[i].name||''}))}`,
id: artists[i].name
})
}
Expand All @@ -88,7 +88,7 @@ function parseComposers(composers) {
r.push({
name: composers[i].name,
source: 'DSM',
cover: `/pokaapi/cover/?moduleName=DSM&data=${encodeURIComponent(JSON.stringify({"type":"composer","info":composers[i].name||'未知'}))}`,
cover: `/pokaapi/cover/?moduleName=DSM&data=${encodeURIComponent(JSON.stringify({"type":"composer","info":composers[i].name||''}))}`,
id: composers[i].name
})
}
Expand Down Expand Up @@ -305,10 +305,10 @@ async function getCover(data) {
let url = `${dsmURL}/webapi/AudioStation/cover.cgi?api=SYNO.AudioStation.Cover&output_default=true&is_hr=false&version=3&library=shared&method=getcover&view=default`
switch (coverData.type) {
case 'artist': //演出者
url += coverData.info ? `&artist_name=${encodeURIComponent(coverData.info)}` : ``
url += coverData.info ? `&artist_name=${encodeURIComponent(coverData.info)}` : `&artist_name=`
break;
case 'composer': //作曲者
url += coverData.info ? `&composer_name=${encodeURIComponent(coverData.info)}` : ``
url += coverData.info ? `&composer_name=${encodeURIComponent(coverData.info)}` : `&composer_name=`
break;
case 'genre': //類型
url += coverData.info ? `&genre_name=${encodeURIComponent(coverData.info)}` : ``
Expand Down
Loading

0 comments on commit 471fa69

Please sign in to comment.