diff --git a/css/player.css b/css/player.css index c097bc7..503a110 100644 --- a/css/player.css +++ b/css/player.css @@ -37,7 +37,7 @@ a { text-align: left; border-bottom: 1px solid; margin-bottom: 20px; -} +} .dialog-header .dialog-close { float: right; @@ -53,7 +53,7 @@ a { background-color: #333; } -/*.masthead { +/*.masthead { z-index: 999; }*/ @@ -91,7 +91,7 @@ a { margin-top: 90px; } -.site-wrapper { +.site-wrapper { width:100%; overflow:hidden; position: absolute; @@ -271,11 +271,11 @@ a { .m-playbar .btns .play{ width: 36px; height: 36px; - margin-top:0; + margin-top:0; background-position: 0px 0px; } -.m-playbar .btns .play:hover{ +.m-playbar .btns .play:hover{ background-position: 0px -36px; } @@ -283,7 +283,7 @@ a { background-position: -108px 0px; } -.m-playbar .btns .pas:hover{ +.m-playbar .btns .pas:hover{ background-position: -108px -36px; } @@ -379,7 +379,7 @@ a { .m-pbar { position: relative; - + } .m-pbar.play { @@ -628,6 +628,13 @@ li { top: 9px; } +.menu .add-all { + display: inline-block; + position: absolute; + left: 175px; + top: 9px; +} + .menu .close-popup { float:right; margin-right: 14px; @@ -880,7 +887,7 @@ li { } .detail-songlist .detail-artist a{ - color: #777777; + color: #777777; } .detail-songlist .odd { diff --git a/js/myplaylist.js b/js/myplaylist.js index 35b459f..ea2b160 100644 --- a/js/myplaylist.js +++ b/js/myplaylist.js @@ -76,7 +76,22 @@ var add_myplaylist = function(playlist_id, track) { if (playlist == null) { return; } - playlist.tracks.push(track); + if (Array.isArray(track)) { + playlist.tracks = playlist.tracks.concat(track); + } else { + playlist.tracks.push(track); + } + + // dedupe + var newTracks = [], trackIds = []; + playlist.tracks.forEach(function (track) { + if (trackIds.indexOf(track.id) === -1) { + newTracks.push(track); + trackIds.push(track.id); + } + }); + playlist.tracks = newTracks; + localStorage.setObject(playlist_id, playlist); } diff --git a/js/vendor/angular-soundmanager2.js b/js/vendor/angular-soundmanager2.js index 9820aee..c8640c4 100644 --- a/js/vendor/angular-soundmanager2.js +++ b/js/vendor/angular-soundmanager2.js @@ -4786,8 +4786,8 @@ ngSoundManager.factory('angularPlayer', ['$rootScope', '$log', // choose one song from [shuffleCount, shufflelist.length-1] if (shuffleCount == shufflelist.length) { - $log.debug("Shuffle list played finish, no next"); - return; + shuffleCount = 0; + shuffleIndex = -1; } var index = shuffleCount + Math.floor(Math.random() * (shufflelist.length-shuffleCount)); diff --git a/listen1.html b/listen1.html index 1688b26..9011534 100644 --- a/listen1.html +++ b/listen1.html @@ -97,10 +97,10 @@ - + -
@@ -124,7 +124,7 @@ - +