Don't allow browsing tracks by album if album URI is not available.

Fixes #250.
This commit is contained in:
John Cass 2018-05-06 09:09:44 +02:00
parent 688c994de5
commit 85f71639b0
2 changed files with 9 additions and 3 deletions

View File

@ -108,11 +108,13 @@ Changelog
(UNRELEASED)
------------
- 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**
- Detect additional stream formats (rtmp, rtmps, rtsp).
- Prevent excessive calls to the Mopidy server while buffering. (Fixes: `#237 <https://github.com/pimusicbox/mopidy-musicbox-webclient/issues/237>`_).
- Include details of currently selected page in HTML title tag. (Addresses: `#243 <https://github.com/pimusicbox/mopidy-musicbox-webclient/issues/243>`_).
- 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

@ -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>'