Merge pull request #117 from DavisNT/feature/RefreshPlaylists

Feature refresh playlists
This commit is contained in:
Nick Steel 2015-10-11 23:07:00 +01:00
commit 4e8856f4f3
5 changed files with 19 additions and 10 deletions

View File

@ -59,6 +59,7 @@ v2.0.1 (UNRELEASED)
- Fixed slow to start playing from a large tracklist of browsed tracks. - Fixed slow to start playing from a large tracklist of browsed tracks.
- Added link to `Alarm Clock <https://pypi.python.org/pypi/Mopidy-AlarmClock/>`_ (if present). - Added link to `Alarm Clock <https://pypi.python.org/pypi/Mopidy-AlarmClock/>`_ (if present).
- Added ability to save Queue as local Playlist. - Added ability to save Queue as local Playlist.
- Added ability to manually initiate refresh of Playlists.
v2.0.0 (26-3-2015) v2.0.0 (26-3-2015)
------------------ ------------------

View File

@ -417,7 +417,6 @@
#playlistspane { #playlistspane {
/* height: 90% !important;*/ /* height: 90% !important;*/
margin: 0px !important; margin: 0px !important;
padding: 2px !important;
} }
a { a {

View File

@ -314,7 +314,10 @@
</div> </div>
<!-- /nowplaying --> <!-- /nowplaying -->
<div data-role="content" id="playlistspane" class="pane ui-grid-a pl-breakpoint"> <div data-role="content" id="playlistspane" class="pane">
<a style="float:right; padding: 1.2em 10px" onclick="return refreshPlaylists();"><i class="fa fa-refresh"></i></a>
<h4>Playlists</h4>
<div class="ui-grid-a pl-breakpoint">
<div class="ui-block-a scroll" id="playlistslistdiv"> <div class="ui-block-a scroll" id="playlistslistdiv">
<ul id="playlistslist" class="table"></ul> <ul id="playlistslist" class="table"></ul>
</div> </div>
@ -322,13 +325,13 @@
<div id="playlisttracksback" style="height: 30px; margin: 2px; padding-top: 2px; background-color: #aaa;"><a style="display:block; padding: 5px;" href="#" onclick="return togglePlaylists();"><i class="fa fa-arrow-circle-left"></i> Back</a></div> <div id="playlisttracksback" style="height: 30px; margin: 2px; padding-top: 2px; background-color: #aaa;"><a style="display:block; padding: 5px;" href="#" onclick="return togglePlaylists();"><i class="fa fa-arrow-circle-left"></i> Back</a></div>
<ul class="table" id="playlisttracks"></ul> <ul class="table" id="playlisttracks"></ul>
</div> </div>
</div>
</div> </div>
<!--/playlistspane--> <!--/playlistspane-->
<div data-role="content" id="browsepane" class="pane"> <div data-role="content" id="browsepane" class="pane">
<h3>Browse</h3> <h4>Browse</h4>
<h4 id="browsepath"></h4> <h5 id="browsepath"></h5>
<ul id="browselist" class="table"></ul> <ul id="browselist" class="table"></ul>
</div> </div>
<!--/browsepane--> <!--/browsepane-->

View File

@ -251,6 +251,12 @@ function saveQueue() {
return false; return false;
} }
function refreshPlaylists() {
mopidy.playlists.refresh();
return false;
}
/********************** /**********************
* Buttons * Buttons
*/ */

View File

@ -126,7 +126,7 @@ function scrollToTracklist() {
playlistslistScroll.refresh(); playlistslistScroll.refresh();
} }
*/ */
var divtop = $("#playlisttracksdiv").offset().top - 50; var divtop = $("#playlisttracksdiv").offset().top - 120;
$('body,html').animate({ $('body,html').animate({
scrollTop: divtop scrollTop: divtop
}, 250); }, 250);