Skip to content

Commit

Permalink
Merge pull request #16 from gnehs/dev
Browse files Browse the repository at this point in the history
準備發佈 0.6.1
  • Loading branch information
gnehs authored Aug 10, 2018
2 parents 9ab95d1 + 58bef39 commit f796449
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 30 deletions.
1 change: 0 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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')
Expand Down
56 changes: 28 additions & 28 deletions js/template.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,56 +18,56 @@ 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":
//專輯
var artist = pin.criteria.artist || pin.criteria.album_artist || ''
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 += `<div class="mdui-card mdui-ripple mdui-hoverable album"
href="${link}"
style="background-image:url(${img});"
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "pokaplayer",
"version": "0.6.0",
"version": "0.6.1",
"description": "",
"main": "index.js",
"scripts": {
Expand Down

0 comments on commit f796449

Please sign in to comment.