diff options
author | malard <malard@svn> | 2010-09-13 22:31:27 +0000 |
---|---|---|
committer | malard <malard@svn> | 2010-09-13 22:31:27 +0000 |
commit | 1aefec1c4a9cf9d41ad61f28d3e6578e38673b49 (patch) | |
tree | f8fdaf7fecefbc991b286eb2cc2805551c82518b /addons | |
parent | 68dd7eb78bb60cf1d5eae120803c1727bb6c2365 (diff) |
fixed: only re-render now playing areas when needed.
git-svn-id: https://xbmc.svn.sourceforge.net/svnroot/xbmc/trunk@33749 568bbfeb-2a22-0410-94d2-cc84cf5bfa90
Diffstat (limited to 'addons')
-rw-r--r-- | addons/webinterface.default/js/NowPlayingManager.js | 27 |
1 files changed, 15 insertions, 12 deletions
diff --git a/addons/webinterface.default/js/NowPlayingManager.js b/addons/webinterface.default/js/NowPlayingManager.js index f059945d2f..dd03c6099f 100644 --- a/addons/webinterface.default/js/NowPlayingManager.js +++ b/addons/webinterface.default/js/NowPlayingManager.js @@ -281,19 +281,22 @@ NowPlayingManager.prototype = { this.showPauseButton();
}
if (this.activePlaylistItem) {
- var imgPath = DEFAULT_ALBUM_COVER;
- if (this.activePlaylistItem.thumbnail) {
- imgPath = (this.activePlaylistItem.thumbnail.startsWith('special://') ? '/vfs/' : 'images/') + this.activePlaylistItem.thumbnail;
- }
- $('#audioCoverArt').html('<img src="' + imgPath + '" alt="' + this.activePlaylistItem.album + ' cover art">');
- $('#audioTrackTitle').html('<span title="' + this.activePlaylistItem.title + '">' + this.activePlaylistItem.title + '</span>');
- if (this.activePlaylistItem.album) {
- $('#audioAlbumTitle').html('<span title="' + this.activePlaylistItem.album + '">' + this.activePlaylistItem.album + '</span>')
- .show();
- } else {
- $('#audioAlbumTitle').hide();
+ if (this.activePlaylistItem != this.lastPlaylistItem) {
+ this.lastPlaylistItem = this.activePlaylistItem;
+ var imgPath = DEFAULT_ALBUM_COVER;
+ if (this.activePlaylistItem.thumbnail) {
+ imgPath = (this.activePlaylistItem.thumbnail.startsWith('special://') ? '/vfs/' : 'images/') + this.activePlaylistItem.thumbnail;
+ }
+ $('#audioCoverArt').html('<img src="' + imgPath + '" alt="' + this.activePlaylistItem.album + ' cover art">');
+ $('#audioTrackTitle').html('<span title="' + this.activePlaylistItem.title + '">' + this.activePlaylistItem.title + '</span>');
+ if (this.activePlaylistItem.album) {
+ $('#audioAlbumTitle').html('<span title="' + this.activePlaylistItem.album + '">' + this.activePlaylistItem.album + '</span>')
+ .show();
+ } else {
+ $('#audioAlbumTitle').hide();
+ }
+ $('#audioArtistTitle').html(this.activePlaylistItem.artist);
}
- $('#audioArtistTitle').html(this.activePlaylistItem.artist);
$('#audioDuration').html(durationToString(this.trackBaseTime) + ' / ' + durationToString(this.activePlaylistItem.duration));
var buttonWidth = $('#progressBar .progressIndicator').width();
var progressBarWidth = (this.trackBaseTime / this.activePlaylistItem.duration) * 100;
|