Index: NowPlayingApplet.lua =================================================================== --- NowPlayingApplet.lua (revision 24) +++ NowPlayingApplet.lua (revision 1) @@ -101,29 +101,12 @@ local server = self.player:getSlimServer() local ARTWORK_SIZE = self:getSelectedStyleParam('artworkSize') - local LINE_SPACE = self:getSelectedStyleParam('itemheight') local iconId - local extraSpace = 0 - if LINE_SPACE then extraSpace = 4*LINE_SPACE end if item then iconId = item["icon-id"] or item["icon"] - if LINE_SPACE then - if item["band"]=="" then extraSpace = extraSpace - LINE_SPACE end - if (item["artist"]=="" or item["artist"]=="No Artist") then extraSpace = extraSpace - LINE_SPACE end - if item["conductor"]=="" then extraSpace = extraSpace - LINE_SPACE end - else - extraSpace = 0 - end end - if LINE_SPACE then - local Iconsize = string.split("x",ARTWORK_SIZE) - Iconsize[1] = Iconsize[1] - extraSpace - Iconsize[2] = Iconsize[2] - extraSpace - ARTWORK_SIZE=Iconsize[1]..'x'..Iconsize[2] - end - if iconId then -- Fetch an image from SlimServer server:fetchArtwork(iconId, icon, ARTWORK_SIZE) @@ -893,15 +876,6 @@ local track = trackTable[1] local artist = trackTable[2] local album = trackTable[3] - local composer = trackTable[4] - local conductor = trackTable[5] - local band = trackTable[6] - if artist == "No Artist" then artist = '' end - log:debug('track = ',track) - log:debug('artist= ',artist) - log:debug('album = ',album) - log:debug('composer=',composer) - log:debug('band = ',band) local artistalbum = '' if artist ~= '' and album ~= '' then @@ -911,27 +885,6 @@ elseif album ~= '' then artistalbum = album end - local info0 = '' - local info2 = '' - local info3 = '' - local info4 = '' - info0 = album - if artist ~= '' then - info2 = artist - if band ~= '' then - info3 = band - if conductor ~= '' then - info4 = conductor - end - end - else - if band ~= '' then - info2 = band - if conductor ~= '' then - info3 = conductor - end - end - end if self.scrollSwitchTimer and self.scrollSwitchTimer:isRunning() then self.scrollSwitchTimer:stop() @@ -940,24 +893,11 @@ self.trackTitle:setValue(track) self.albumTitle:setValue(album) self.artistTitle:setValue(artist) - self.composerTitle:setValue(composer) - self.info0Title:setValue(info0) - self.info2Title:setValue(info2) - self.info3Title:setValue(info3) - self.info4Title:setValue(info4) self.artistalbumTitle:setValue(artistalbum) if self.scrollText then - self.trackTitle:animate(false) - self.info0Title:animate(true) - self.info2Title:animate(false) - self.info3Title:animate(false) - log:debug("animation set for info0Title") + self.trackTitle:animate(true) else self.trackTitle:animate(false) - self.info0Title:animate(false) - self.info2Title:animate(false) - self.info3Title:animate(false) - log:debug("animation off") end self.artistTitle:animate(false) self.albumTitle:animate(false) @@ -1383,7 +1323,7 @@ --local window = Window("text_list") self.windowStyle = self.selectedStyle if not self.windowStyle then - self.windowStyle = 'nowplaying_classical' + self.windowStyle = 'nowplaying' end local window = Window(self.windowStyle) @@ -1408,11 +1348,6 @@ self.albumTitle = Label('npalbum', "") self.artistTitle = Label('npartist', "") self.artistalbumTitle = Label('npartistalbum', "") - self.composerTitle = Label('npcomposer',"") - self.info0Title = Label('npinfo0',"") - self.info2Title = Label('npinfo2',"") - self.info3Title = Label('npinfo3',"") - self.info4Title = Label('npinfo4',"") local launchContextMenu = function() @@ -1437,94 +1372,36 @@ if not self.scrollSwitchTimer and self.scrollText then self:_addScrollSwitchTimer() - self.scrollSwitchTimer = Timer(1000, + self.scrollSwitchTimer = Timer(3000, function() - log:debug("setting scrollswitchtimer; start animation info0Title") - self.info0Title:animate(true) - self.albumTitle:animate(false) + self.trackTitle:animate(true) self.artistalbumTitle:animate(false) self.artistTitle:animate(false) - self.trackTitle:animate(false) - self.info2Title:animate(false) - self.info3Title:animate(false) + self.albumTitle:animate(false) end, true) end - self.info0Title.textStopCallback = + self.trackTitle.textStopCallback = function(label) if self.scrollSwitchTimer and not self.scrollSwitchTimer:isRunning() then - log:debug('info0Title animation done, animate trackTitle') - self.info0Title:animate(false) - self.albumTitle:animate(false) - self.artistalbumTitle:animate(false) - self.artistTitle:animate(false) - self.trackTitle:animate(true) - self.info2Title:animate(false) - self.info3Title:animate(false) + log:debug('trackTitle animation done, animate artistalbum/artistTitle') + self.artistalbumTitle:animate(true) + self.artistTitle:animate(true) + self.trackTitle:animate(false) end end - local hasArtistAlbum = jiveMain:getSkinParam("NOWPLAYING_TRACKINFO_LINES") == 2 if hasArtistAlbum then - - self.trackTitle.textStopCallback = + self.artistalbumTitle.textStopCallback = function(label) - if self.scrollSwitchTimer and not self.scrollSwitchTimer:isRunning() then - log:debug('trackTitle animation done, animate artistalbum') - self.info0Title:animate(false) - self.albumTitle:animate(false) - self.artistalbumTitle:animate(true) - self.artistTitle:animate(false) - self.trackTitle:animate(false) - self.info2Title:animate(false) - self.info3Title:animate(false) - end - end - - self.artistalbumTitle.textStopCallback = - function(label) - if self.scrollSwitchTimer and not self.scrollSwitchTimer:isRunning() then - log:debug('artistalbumTitle animation done, animate info2') - self.info0Title:animate(false) - self.albumTitle:animate(false) - self.artistalbumTitle:animate(false) - self.artistTitle:animate(false) - self.trackTitle:animate(false) - self.info2Title:animate(true) - self.info3Title:animate(false) - end - end - - self.info2Title.textStopCallback = - function(label) - if self.scrollSwitchTimer and not self.scrollSwitchTimer:isRunning() then - log:debug('info2Title animation done, animate info3') - self.info0Title:animate(false) - self.albumTitle:animate(false) - self.artistalbumTitle:animate(false) - self.artistTitle:animate(false) - self.trackTitle:animate(false) - self.info2Title:animate(false) - self.info3Title:animate(true) - end - end - - self.info3Title.textStopCallback = - function(label) - log:debug('info3Title animation done') - self.info0Title:animate(false) - self.albumTitle:animate(false) - self.artistalbumTitle:animate(false) - self.artistTitle:animate(false) - self.trackTitle:animate(false) - self.info2Title:animate(false) - self.info3Title:animate(false) - if self.scrollSwitchTimer and not self.scrollSwitchTimer:isRunning() and + self.artistalbumTitle:animate(false) + self.trackTitle:animate(false) + if self.scrollSwitchTimer and not self.scrollSwitchTimer:isRunning() and not self.scrollTextOnce then - log:debug('info3 animation done, restarting timer') + log:debug('artistAlbum animation done, restarting timer') self.scrollSwitchTimer:restart() end end @@ -1771,12 +1648,6 @@ window:addWidget(self.npartistGroup) window:addWidget(self.artistalbumTitle) window:addWidget(self.artworkGroup) - window:addWidget(self.composerTitle) - window:addWidget(self.info0Title) - window:addWidget(self.info2Title) - window:addWidget(self.info3Title) - window:addWidget(self.info4Title) - -- Visualizer: Only load if needed if (self.windowStyle == "nowplaying_spectrum_text") or (self.windowStyle == "nowplaying_vuanalog_text") then window:addWidget(self.visuGroup) @@ -1885,9 +1756,8 @@ self.nowPlayingScreenStyles = self:getNPStyles() if not self.selectedStyle then - self.selectedStyle = 'nowplaying_classical' + self.selectedStyle = 'nowplaying' end - local npWindow = self.window local lineInActive = appletManager:callService("isLineInActive") @@ -2002,13 +1872,10 @@ log:debug('Adding scrollSwitchTimer for scrolling text, self.scrollText: ', self.scrollText, ' self.scrollTextOnce: ', self.scrollTextOnce) self.scrollSwitchTimer = Timer(3000, function() - self.trackTitle:animate(false) - self.info0Title:animate(false) + self.trackTitle:animate(true) self.artistalbumTitle:animate(false) self.artistTitle:animate(false) self.albumTitle:animate(false) - self.info2Title:animate(false) - self.info3Title:animate(false) end, true ) @@ -2027,9 +1894,6 @@ table.insert(returnTable, _track.track) table.insert(returnTable, _track.artist) table.insert(returnTable, _track.album) - table.insert(returnTable, _track.composer) - table.insert(returnTable, _track.conductor) - table.insert(returnTable, _track.band) return returnTable else return _track.text or "\n\n\n"