Skip to content

Commit

Permalink
Show song info in title #393
Browse files Browse the repository at this point in the history
  • Loading branch information
Rello committed Jun 10, 2019
1 parent 08f6a6d commit b8a88c9
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
10 changes: 5 additions & 5 deletions js/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -592,8 +592,8 @@ Audios.prototype.loadIndividualCategory = function (evt, callback) {
'data-mimetype': el.mim,
'mimetype': el.mim,
'data-title': el.cl1,
'data-album': el.cl2,
'data-year': el.cl3,
'data-artist': el.cl2,
'data-album': el.cl3,
'data-cover': el.cid,
'data-path': el.lin,
'class': 'dragable'
Expand Down Expand Up @@ -1041,16 +1041,16 @@ Audios.prototype.sort_playlist = function (evt) {
Audios.prototype.current_song_ui_change = function (coverUrl, activeLi) {
var addCss;
var addDescr;
const coverID = activeLi.data('cover');
var coverID = activeLi.data('cover');
if (coverID === '') {
addCss = 'background-color: #D3D3D3;color: #333333;';
addDescr = activeLi.data('title').substring(0, 1);
} else {
addCss = `background-image:url(${coverUrl}${coverID});-webkit-background-size:cover;-moz-background-size:cover;background-size:cover;`;
addCss = 'background-image:url(' + coverUrl + coverID + ');-webkit-background-size:cover;-moz-background-size:cover;background-size:cover;';
addDescr = '';
}
$('.sm2-playlist-cover').attr({'style': addCss}).text(addDescr);
document.title = `${activeLi.data('title')}${activeLi.data('album')}`;
document.title = activeLi.data('title') + ' — ' + activeLi.data('album');
};

Audios.prototype.soundmanager_callback = function (SMaction) {
Expand Down
2 changes: 1 addition & 1 deletion js/bar-ui.js
Original file line number Diff line number Diff line change
Expand Up @@ -794,7 +794,7 @@
}

// remove any failed character sequence, also
dom.playlistTarget.innerHTML = '<ul class="sm2-playlist-bd"><li><b>' + $(item).parent().attr('data-title').replace(extras.loadFailedCharacter, '') +'</b> ('+ $(item).parent().attr('data-album').replace(extras.loadFailedCharacter, '') + ')</li></ul>';
dom.playlistTarget.innerHTML = '<ul class="sm2-playlist-bd"><li><b>' + $(item).parent().attr('data-title').replace(extras.loadFailedCharacter, '') + '</b> (' + $(item).parent().attr('data-artist').replace(extras.loadFailedCharacter, '') + ')</li></ul>';



Expand Down
4 changes: 2 additions & 2 deletions js/widgets/audioplayer.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,8 @@
'data-mimetype': el.mim,
'mimetype': el.mim,
'data-title': el.cl1,
'data-album': el.cl2,
'data-year': el.cl3,
'data-artist': el.cl2,
'data-album': el.cl3,
'data-cover': el.cid,
'data-path': el.lin,
'class': 'dragable'
Expand Down
2 changes: 1 addition & 1 deletion templates/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
Util::addStyle('audioplayer_editor', 'style');
}
if ($_['audioplayer_sonos'] !== 'checked') {
Util::addScript('audioplayer', 'bar-ui-min');
Util::addScript('audioplayer', 'bar-ui');
Util::addStyle('audioplayer', '3rdparty/fontello/css/animation');
} else {
Util::addScript('audioplayer', 'sonos');
Expand Down

0 comments on commit b8a88c9

Please sign in to comment.