Release v2.5.0.

This commit is contained in:
Nick Steel 2018-05-22 00:05:26 +01:00
commit 25e29b4ed1
10 changed files with 40 additions and 17 deletions

View File

@ -22,7 +22,6 @@ env:
- TOX_ENV=tidy
before_install:
- "sudo sed -i '/127.0.1.1/d' /etc/hosts" # Workaround https://github.com/tornadoweb/tornado/issues/1573
- "sudo apt-get update -qq"
install:

View File

@ -52,7 +52,7 @@ Installation
Install by running::
pip install mopidy-musicbox-webclient
sudo pip install mopidy-musicbox-webclient
Alternatively, clone the repository and run ``sudo python setup.py install`` from within the project directory. e.g. ::
@ -105,6 +105,17 @@ Project resources
Changelog
=========
v2.5.0 (2017-05-22)
------------
- Detect additional stream formats (rtmp, rtmps, rtsp).
- Include details of currently selected page in HTML title tag. (Addresses: `#243 <https://github.com/pimusicbox/mopidy-musicbox-webclient/issues/243>`_).
**Fixes**
- Prevent excessive calls to the Mopidy server while buffering. (Fixes: `#237 <https://github.com/pimusicbox/mopidy-musicbox-webclient/issues/237>`_).
- Only allow browsing tracks by album if a URI is available for that album. (Fixes: `#250 <https://github.com/pimusicbox/mopidy-musicbox-webclient/issues/250>`_).
v2.4.0 (2017-03-15)
-------------------

View File

@ -4,7 +4,7 @@ import os
from mopidy import config, ext
__version__ = '2.4.0'
__version__ = '2.5.0'
class Extension(ext.Extension):

View File

@ -36,7 +36,7 @@
</head>
<body data-websocket-url="{{ websocketUrl }}" data-is-musicbox="{{ isMusicBox }}" data-has-alarmclock="{{ hasAlarmClock }}" data-on-track-click="{{ onTrackClick }}" data-program-name="{{ programName }}" data-hostname="{{ hostname }}">
<body data-websocket-url="{{ websocketUrl }}" data-is-musicbox="{{ isMusicBox }}" data-has-alarmclock="{{ hasAlarmClock }}" data-on-track-click="{{ onTrackClick }}" data-program-name="{{ programName }}" data-hostname="{{ hostname }}" data-title="{{ title }}">
<div data-role="page" id="page" class="ui-responsive-panel" data-theme="c" data-title="{{ title }}">
<div data-role="panel" id="panel" data-position="left" data-theme="a" data-display="reveal" data-position-fixed="true">

View File

@ -306,8 +306,12 @@ function renderSongLiDivider (previousTrack, track, nextTrack, target) {
// Render differently if part of an album.
if (!hasSameAlbum(previousTrack, track) && hasSameAlbum(track, nextTrack)) {
// Large divider with album cover.
showAlbum = ''
if (typeof track.album.uri !== 'undefined') {
showAlbum = 'onclick="return library.showAlbum(\'' + track.album.uri + '\', mopidy);"'
}
html +=
'<li class="albumdivider"><a href="#" onclick="return library.showAlbum(\'' + track.album.uri + '\', mopidy);">' +
'<li class="albumdivider"><a href="#" ' + showAlbum + '>' +
'<img id="' + getjQueryID(target + '-cover', track.uri) + '" class="artistcover" width="30" height="30"/>' +
'<h1>' + track.album.name + '</h1><p>' +
renderSongLiTrackArtists(track) + '</p></a></li>'
@ -482,7 +486,7 @@ function showOffline (on) {
// from http://dzone.com/snippets/validate-url-regexp
function validUri (uri) {
var regexp = /^(mms|http|https):\/\/(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?/
var regexp = /^(http|https|mms|rtmp|rtmps|rtsp):\/\/(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?/
return regexp.test(uri)
}

View File

@ -338,11 +338,12 @@ function switchContent (divid, uri) {
function setHeadline (site) {
site = site.trim()
str = $('.mainNav').find('a[href$=' + site + ']').text()
if (str === '') {
str = site.charAt(0).toUpperCase() + site.slice(1)
headline = $('.mainNav').find('a[href$=' + site + ']').text()
if (headline === '') {
headline = site.charAt(0).toUpperCase() + site.slice(1)
}
$('#contentHeadline').html('<a href="#home" onclick="switchContent(\'home\'); return false;">' + str + '</a>')
$('#contentHeadline').html('<a href="#home" onclick="switchContent(\'home\'); return false;">' + headline + '</a>')
return headline
}
// update tracklist options.
@ -371,7 +372,8 @@ function locationHashChanged () {
var divid = hash[0].substr(1)
var uri = hash[1]
setHeadline(divid)
headline = setHeadline(divid)
updateDocumentTitle(headline)
if ($(window).width() < 880) {
$('#panel').panel('close')
@ -621,3 +623,8 @@ function updatePlayIcons (uri, tlid, popupMenuIcon) {
})
}
}
function updateDocumentTitle (headline) {
headline = headline || $('#contentHeadline').text()
document.title = headline + ' | ' + $(document.body).data('title')
}

View File

@ -106,7 +106,9 @@
// check in the timeout callback than doing another function call.
clearTimeout(this._scheduleID)
this._isSyncScheduled = false
this._scheduleID = setTimeout($.proxy(function () { this._isSyncScheduled = true }, this), milliseconds)
if (milliseconds >= 0) {
this._scheduleID = setTimeout($.proxy(function () { this._isSyncScheduled = true }, this), milliseconds)
}
}
SyncedProgressTimer.prototype._doSync = function (position, duration) {
@ -116,6 +118,8 @@
return
}
this._scheduleSync(-1) // Ensure that only one sync process is active at a time.
var _this = this
_this._mopidy.playback.getTimePosition().then(function (targetPosition) {
if (_this.syncState === SyncedProgressTimer.SYNC_STATE.NOT_SYNCED) {
@ -179,8 +183,7 @@
SyncedProgressTimer.prototype.stop = function () {
this._progressTimer.stop()
clearTimeout(this._scheduleID)
this._isSyncScheduled = false
this._scheduleSync(-1)
if (this.syncState !== SyncedProgressTimer.SYNC_STATE.SYNCED && this._previousSyncPosition) {
// Timer was busy trying to sync when it was stopped, fallback to displaying the last synced position on screen.
this.positionNode.nodeValue = SyncedProgressTimer.format(this._previousSyncPosition)

View File

@ -1,6 +1,6 @@
CACHE MANIFEST
# 2017-02-26:v1
# 2017-10-07:v1
NETWORK:
*

View File

@ -1,7 +1,6 @@
from __future__ import absolute_import, division, print_function, unicode_literals
import json
import logging
import socket
import string

View File

@ -14,7 +14,7 @@ deps =
pytest-cov
pytest-xdist
responses
install_command = pip install --allow-unverified=mopidy --pre {opts} {packages}
install_command = pip install --pre {opts} {packages}
commands =
py.test \
--basetemp={envtmpdir} \