small updates
This commit is contained in:
parent
0a0b2ef81a
commit
0469c3de11
@ -59,6 +59,9 @@ a.name, a.album, a.artist {
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
body {
|
||||
padding-top: 80px;
|
||||
}
|
||||
@ -138,8 +141,7 @@ div {
|
||||
}
|
||||
|
||||
.content {
|
||||
/*visibility:hidden;
|
||||
/*display:none;*/
|
||||
display:none;
|
||||
}
|
||||
|
||||
.currenttrack {
|
||||
|
||||
56
index.html
56
index.html
@ -34,33 +34,7 @@
|
||||
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div id="offlinemodal" class="modal hide fade">
|
||||
<div class="modal-header">
|
||||
<h3>Offline</h3>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<p>
|
||||
<img src="img/loader.gif" id="offlinemodalloader" class="loader" />
|
||||
Cannot connect to the server... <br/>Please wait.
|
||||
<br/><br/>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="loadingmodal" class="modal hide fade">
|
||||
<div class="modal-header">
|
||||
<h3>Loading data...</h3>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<p>
|
||||
<img src="img/loader.gif" id="loadingmodalloader" class="loader" />
|
||||
Getting data from the server... <br/>Please wait.
|
||||
<br/><br/>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<body>
|
||||
<div class="navbar navbar-inverse navbar-fixed-top">
|
||||
<div class="navbar-inner">
|
||||
<div class="container-fluid">
|
||||
@ -256,6 +230,34 @@
|
||||
</div><!--/row fluid-->
|
||||
</div><!--/.fluid-container-->
|
||||
|
||||
<div id="offlinemodal" class="modal hide fade">
|
||||
<div class="modal-header">
|
||||
<h3>Offline</h3>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<p>
|
||||
<img src="img/loader.gif" id="offlinemodalloader" class="loader" />
|
||||
Cannot connect to the server... <br/>Please wait.
|
||||
<br/><br/>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="loadingmodal" class="modal hide fade">
|
||||
<div class="modal-header">
|
||||
<h3>Loading data...</h3>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<p>
|
||||
<img src="img/loader.gif" id="loadingmodalloader" class="loader" />
|
||||
Getting data from the server... <br/><br/>
|
||||
Please wait.<br/><br/>
|
||||
This could take a while (Too much of a while actually. Will be fixed...)
|
||||
<br/><br/>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Le javascript
|
||||
================================================== -->
|
||||
<!-- Placed at the end of the document so the pages load faster -->
|
||||
|
||||
@ -76,7 +76,7 @@ function resizeSonginfo () {
|
||||
}
|
||||
|
||||
function setSongInfo(data) {
|
||||
console.log(data);
|
||||
//console.log(data);
|
||||
|
||||
artistshtml = '';
|
||||
artiststext = '';
|
||||
@ -286,6 +286,8 @@ function triggerPos() {
|
||||
}
|
||||
|
||||
function getPlaylists() {
|
||||
// d = new Date();
|
||||
// console.log('Getplaylists: ' + d.getMilliseconds() );
|
||||
mopidy.playlists.getPlaylists().then(handleGetplaylists, console.error);
|
||||
}
|
||||
|
||||
@ -329,8 +331,8 @@ function initSocketevents() {
|
||||
});
|
||||
|
||||
mopidy.on("event:trackPlaybackStarted", function (data) {
|
||||
setSongInfo(data.tl_track.track);
|
||||
mopidy.playback.getTimePosition().then(currentPositionResults, console.error);
|
||||
setSongInfo(data.tl_track.track);
|
||||
setPlayState(true);
|
||||
initTimer();
|
||||
});
|
||||
|
||||
10
js/ws.js
10
js/ws.js
@ -8,8 +8,8 @@
|
||||
//play uri, update playlist to player if needed
|
||||
function playtrack(uri, playlisturi) {
|
||||
trackslist = new Array();
|
||||
console.log('play uri:' + uri);
|
||||
console.log('playlist uri:' + playlisturi);
|
||||
// console.log('play uri:' + uri);
|
||||
// console.log('playlist uri:' + playlisturi);
|
||||
var track;
|
||||
switchContent('current', uri);
|
||||
tracks = getTracksFromUri(playlisturi);
|
||||
@ -27,7 +27,7 @@ function playtrack(uri, playlisturi) {
|
||||
}
|
||||
}
|
||||
// console.log(pl.tracks);
|
||||
console.log(track);
|
||||
console.log(track);
|
||||
|
||||
mopidy.playback.stop(true);
|
||||
for (var i = 0; i < track; i++) {
|
||||
@ -74,7 +74,7 @@ function handleGetplaylists(resultArr) {
|
||||
/*<p><ul><li>Donec id elit non mi porta</li><li>Gravida at eget metus. Fusce dapibus.</li><li>Tellus ac cursus commodo</li></p>
|
||||
<p><a class="btn" href="#">More »</a></p>
|
||||
*/
|
||||
if (resultArr == '') { return; }
|
||||
if ((!resultArr) || (resultArr == '') ) { return; }
|
||||
playlists = resultArr;
|
||||
tmp = '';
|
||||
for (var i = 0; i < playlists.length; i++) {
|
||||
@ -100,7 +100,7 @@ function handlePlaylist(resultArr) {
|
||||
function handleCurrentPlaylist(resultArr) {
|
||||
currentplaylist = resultArr;
|
||||
playlisttotable(resultArr, CURRENT_PLAYLIST_TABLE);
|
||||
//$("#result").html(resultArr);
|
||||
mopidy.playback.getCurrentTrack().then(currentTrackResults, console.error);
|
||||
}
|
||||
|
||||
function handleSearchResults(resultArr) {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user