4.0.2 jukebox updates
This commit is contained in:
parent
d90c367a5c
commit
daae8cad59
6 changed files with 33 additions and 4 deletions
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
images/Thumbs.db
|
|
@ -80,6 +80,7 @@
|
|||
<ul class="simplelist songlist noselect" ng-if="queue.length > 0">
|
||||
<div ng-repeat="song in [queue] track by $index" class="songs" ng-include src="'js/partials/songs_lite.html'" sortable></div>
|
||||
</ul>
|
||||
<div class="colspacer"></div>
|
||||
</div>
|
||||
<!--
|
||||
<div id="NowPlaying">
|
||||
|
@ -100,7 +101,7 @@
|
|||
<div class="playeractions floatleft">
|
||||
<a class="hover" id="PreviousTrack" title="Previous Track" ng-click="previousTrack()"><img src="images/first_alt_24x24.png" /></a>
|
||||
<a class="hover PlayTrack" title="Play/Pause" ng-click="defaultPlay()"><img src="images/play_alt_24x32.png" /></a>
|
||||
<a class="hover PauseTrack" title="Play/Pause" style="display: none;"><img src="images/pause_alt_24x32.png" /></a>
|
||||
<a class="hover PauseTrack" title="Play/Pause" ng-click="defaultPlay()" style="display: none;"><img src="images/pause_alt_24x32.png" /></a>
|
||||
<a class="hover" id="NextTrack" title="Next Track" ng-click="nextTrack()"><img src="images/last_alt_24x24.png" /></a>
|
||||
</div>
|
||||
<div id="songdetails">
|
||||
|
|
|
@ -533,6 +533,17 @@ function AppCtrl($scope, $rootScope, $document, $window, $location, $cookieStore
|
|||
}
|
||||
});
|
||||
};
|
||||
$rootScope.sendToJukebox = function (action) {
|
||||
if (globals.settings.Debug) { console.log("SEND JUKEBOX " + action); }
|
||||
$.ajax({
|
||||
url: globals.BaseURL() + '/jukeboxControl.view?' + globals.BaseParams() + '&action=' + action,
|
||||
method: 'GET',
|
||||
dataType: globals.settings.Protocol,
|
||||
timeout: globals.settings.Timeout,
|
||||
success: function (data) {
|
||||
}
|
||||
});
|
||||
};
|
||||
$scope.updateFavorite = function (item) {
|
||||
var id = item.id;
|
||||
var starred = item.starred;
|
||||
|
|
|
@ -30,7 +30,7 @@
|
|||
</div>
|
||||
<div id="SubsonicAlbums" class="section lgsection split-pane fixed-left" split>
|
||||
<!-- Album -->
|
||||
<div id="right-component" class="split-pane-component lgcolumn">
|
||||
<div id="right-component" class="lgcolumn">
|
||||
<ul class="actionlist">
|
||||
<li>
|
||||
<form class="form">
|
||||
|
@ -73,6 +73,7 @@
|
|||
</div>
|
||||
<div ng-if="song.length > 0" ng-include src="'js/partials/songs.html'"></div>
|
||||
</ul>
|
||||
<div class="colspacer"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="left-component" class="split-pane-component smcolumn noselect" tabindex="0">
|
||||
|
@ -179,6 +180,7 @@
|
|||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="colspacer"></div>
|
||||
</div>
|
||||
<div id="submenu_AZIndex" class="submenu shadow" style="display: none;">
|
||||
<ul>
|
||||
|
|
12
js/player.js
12
js/player.js
|
@ -6,6 +6,13 @@
|
|||
$rootScope.defaultPlay = function (data, event) {
|
||||
if (typeof $(player1).data("jPlayer") == 'undefined') {
|
||||
$rootScope.nextTrack();
|
||||
}
|
||||
if (typeof $(player1).data("jPlayer") != 'undefined' && globals.settings.Jukebox) {
|
||||
if ($(player1).data("jPlayer").status.paused) {
|
||||
$rootScope.sendToJukebox('start');
|
||||
} else {
|
||||
$rootScope.sendToJukebox('stop');
|
||||
}
|
||||
}
|
||||
};
|
||||
$rootScope.nextTrack = function () {
|
||||
|
@ -173,10 +180,11 @@
|
|||
$('#playermiddle').css('visibility', 'visible');
|
||||
$('#songdetails').css('visibility', 'visible');
|
||||
|
||||
$rootScope.loadjPlayer(player1, url, suffix, loadonly, position);
|
||||
if (globals.settings.Jukebox) {
|
||||
$rootScope.addToJukebox(id);
|
||||
|
||||
$rootScope.loadjPlayer(player1, url, suffix, true, position);
|
||||
} else {
|
||||
$rootScope.loadjPlayer(player1, url, suffix, loadonly, position);
|
||||
}
|
||||
|
||||
if (!loadonly) {
|
||||
|
|
|
@ -244,6 +244,12 @@ span.apiversion
|
|||
margin-left: 312px;
|
||||
margin-right: 350px;
|
||||
}
|
||||
.colspacer {
|
||||
height: 100px;
|
||||
width: 100%;
|
||||
display: block;
|
||||
float: left;
|
||||
}
|
||||
.lgsection
|
||||
{
|
||||
height: 100%;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue