From 6c6ab814602ca1572abc4c355866e6648acf8a0a Mon Sep 17 00:00:00 2001 From: gnehs Date: Fri, 10 Aug 2018 23:49:54 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E4=BF=AE=E6=AD=A3=E9=A6=96=E9=A0=81?= =?UTF-8?q?=E5=9C=A8=E9=9D=9E=E9=A1=9E=E5=9E=8B=E7=9A=84=E5=9C=B0=E6=96=B9?= =?UTF-8?q?=E5=87=BA=E7=8F=BE=E3=80=8C=E6=B2=92=E6=89=93=E7=AE=97=E5=81=9A?= =?UTF-8?q?=E5=96=94=E3=80=8D=E6=8F=90=E7=A4=BA=E3=80=81=E4=BF=AE=E6=AD=A3?= =?UTF-8?q?=E9=A6=96=E9=A0=81=E6=92=AD=E6=94=BE=E6=B8=85=E5=96=AE=E7=84=A1?= =?UTF-8?q?=E6=B3=95=E9=BB=9E=E6=93=8A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- index.js | 1 - js/template.js | 56 +++++++++++++++++++++++++------------------------- 2 files changed, 28 insertions(+), 29 deletions(-) diff --git a/index.js b/index.js index 959a3694..cabeaecb 100644 --- a/index.js +++ b/index.js @@ -114,7 +114,6 @@ io.on('connection', socket => { }); // 更新 - app.get('/upgrade', (req, res) => { if (req.session.pass != config.PokaPlayer.password && config.PokaPlayer.passwordSwitch) res.status(403).send('Permission Denied Desu') diff --git a/js/template.js b/js/template.js index 0feaff34..f94d26a7 100644 --- a/js/template.js +++ b/js/template.js @@ -18,42 +18,43 @@ function HTML_showPins(items) { let pin = items[i] var title = pin.name var type = pin.type + var img, title, subtitle, link, onclickActions = '' switch (type) { case "artist": //演出者 - var img = getCover(type, pin.criteria.artist) - var title = pin.name - var subtitle = '演出者' - var link = `artist/${encodeURIComponent(pin.criteria.artist)}` + img = getCover(type, pin.criteria.artist) + title = pin.name + subtitle = '演出者' + link = `artist/${encodeURIComponent(pin.criteria.artist)}` break; case "composer": //作曲者 - var img = getCover(type, pin.criteria.composer) - var title = pin.name - var subtitle = '作曲者' - var link = `composer/${encodeURIComponent(pin.criteria.composer)}` + img = getCover(type, pin.criteria.composer) + title = pin.name + subtitle = '作曲者' + link = `composer/${encodeURIComponent(pin.criteria.composer)}` break; case "genre": - //作曲者 - var img = getCover(type, pin.criteria.genre) - var title = pin.name - var subtitle = '類型' - var link = '' - var onclickActions = `mdui.snackbar({message: '沒打算做喔,不過資料都給了就給你看一下啦',timeout:500,position:'${getSnackbarPosition()}'});` + //類型 + img = getCover(type, pin.criteria.genre) + title = pin.name + subtitle = '類型' + link = 'home' + onclickActions = `mdui.snackbar({message: '沒打算做喔,不過資料都給了就給你看一下啦',timeout:500,position:'${getSnackbarPosition()}'});` break; case "folder": //資料夾 - var img = getCover(type, pin.criteria.folder) - var title = pin.name - var subtitle = '資料夾' - var link = `folder/${encodeURIComponent(pin.criteria.folder)}` + img = getCover(type, pin.criteria.folder) + title = pin.name + subtitle = '資料夾' + link = `folder/${encodeURIComponent(pin.criteria.folder)}` break; case "playlist": - //資料夾 - var img = getBackground() - var title = pin.name - var subtitle = '播放清單' - var link = `playlist/${encodeURIComponent(pin.criteria.playlist)} ` + //播放清單 + img = getBackground() + title = pin.name + subtitle = '播放清單' + link = `playlist/${pin.criteria.playlist} ` break; case "album": //專輯 @@ -61,13 +62,12 @@ function HTML_showPins(items) { var album_artist = pin.criteria.album_artist || '' var name = pin.criteria.album || ''; // 輸出資料 - var img = getCover("album", name, artist, album_artist) - var title = name - var subtitle = artist - var link = `album/${artist?encodeURIComponent(artist):'#'}/${name?encodeURIComponent(name):'#'}/${album_artist?encodeURIComponent(album_artist):'#'}` + img = getCover("album", name, artist, album_artist) + title = name + subtitle = artist + link = `album/${artist?encodeURIComponent(artist):'#'}/${name?encodeURIComponent(name):'#'}/${album_artist?encodeURIComponent(album_artist):'#'}` break; } - //await getAlbumSong(albumData.criteria.album, albumData.criteria.album_artist, albumData.criteria.artist) html += `
Date: Fri, 10 Aug 2018 23:50:54 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E6=BA=96=E5=82=99=E7=99=BC=E5=B8=83=200.6.?= =?UTF-8?q?1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 0bd76346..791cbf9a 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "pokaplayer", - "version": "0.6.0", + "version": "0.6.1", "description": "", "main": "index.js", "scripts": {