Author: bklaas
Date: Sun Jun 1 23:57:41 2008
New Revision: 2538
URL: http://svn.slimdevices.com?rev=2538&root=Jive&view=rev
Log:
Bugs: 6941, 8085, 6951, 6955
Description:
Airpline ride fixes :)
- fix typo in playerNeedsUpgrade notification that was causing notficiations to
be sent out at every playerstatus update
- don't show music sources that can't be connected to
- remove many unneeded log:warn() messages
- change title bar on current playlist window from "Now Playing" to "Playlist"
- remove playlistSize notification code and merge with playlistChange
notification
Modified:
7.1/trunk/squeezeplay/src/squeezeplay/share/applets/ChooseMusicSource/ChooseMusicSourceApplet.lua
7.1/trunk/squeezeplay/src/squeezeplay/share/applets/NowPlaying/NowPlayingApplet.lua
7.1/trunk/squeezeplay/src/squeezeplay/share/applets/SlimBrowser/SlimBrowserApplet.lua
7.1/trunk/squeezeplay/src/squeezeplay/share/applets/SlimBrowser/strings.txt
7.1/trunk/squeezeplay/src/squeezeplay/share/jive/slim/Player.lua
Modified:
7.1/trunk/squeezeplay/src/squeezeplay/share/applets/ChooseMusicSource/ChooseMusicSourceApplet.lua
URL:
http://svn.slimdevices.com/7.1/trunk/squeezeplay/src/squeezeplay/share/applets/ChooseMusicSource/ChooseMusicSourceApplet.lua?rev=2538&root=Jive&r1=2537&r2=2538&view=diff
==============================================================================
---
7.1/trunk/squeezeplay/src/squeezeplay/share/applets/ChooseMusicSource/ChooseMusicSourceApplet.lua
(original)
+++
7.1/trunk/squeezeplay/src/squeezeplay/share/applets/ChooseMusicSource/ChooseMusicSourceApplet.lua
Sun Jun 1 23:57:41 2008
@@ -137,6 +137,7 @@
log:debug("_addServerItem ", server, " " , port)
local id = server or address
+
-- remove existing entry
if self.serverList[id] then
@@ -174,6 +175,8 @@
if currentPlayer and server == currentPlayer:getSlimServer() then
item.style = 'checkedNoAction'
item.callback = nil
+ elseif not currentPlayer or not currentPlayer:canConnectToServer() then
+ return
end
self.serverMenu:addItem(item)
Modified:
7.1/trunk/squeezeplay/src/squeezeplay/share/applets/NowPlaying/NowPlayingApplet.lua
URL:
http://svn.slimdevices.com/7.1/trunk/squeezeplay/src/squeezeplay/share/applets/NowPlaying/NowPlayingApplet.lua?rev=2538&root=Jive&r1=2537&r2=2538&view=diff
==============================================================================
---
7.1/trunk/squeezeplay/src/squeezeplay/share/applets/NowPlaying/NowPlayingApplet.lua
(original)
+++
7.1/trunk/squeezeplay/src/squeezeplay/share/applets/NowPlaying/NowPlayingApplet.lua
Sun Jun 1 23:57:41 2008
@@ -180,7 +180,7 @@
function notify_playerTrackChange(self, player, nowPlaying)
- log:warn("PLAYER TRACK NOTIFICATION RECEIVED")
+ log:info("Notification received that track has changed")
local thisPlayer = _isThisPlayer(self, player)
if not thisPlayer then return end
@@ -237,7 +237,6 @@
windowStyle = 'ss'
-log:warn('ACK!')
jiveMain:addItem(
{
id = 'appletNowPlaying',
@@ -537,7 +536,7 @@
local playerStatus = self.player and self.player:getPlayerStatus()
- log:warn("player=", self.player, " status=", playerStatus)
+ log:info("player=", self.player, " status=", playerStatus)
-- playlist_tracks needs to be > 0 or else defer back to SlimBrowser
if not self.player or not playerStatus
@@ -620,7 +619,7 @@
-- when we leave NowPlaying, ditch the window
-- the screen can get loaded with two layouts, and by doing this
-- we force the recreation of the UI when re-entering the screen,
possibly in a different mode
- log:warn("NowPlaying.free()")
+ log:info("NowPlaying.free()")
self.player = false
self['ss'] = nil
self['browse'] = nil
Modified:
7.1/trunk/squeezeplay/src/squeezeplay/share/applets/SlimBrowser/SlimBrowserApplet.lua
URL:
http://svn.slimdevices.com/7.1/trunk/squeezeplay/src/squeezeplay/share/applets/SlimBrowser/SlimBrowserApplet.lua?rev=2538&root=Jive&r1=2537&r2=2538&view=diff
==============================================================================
---
7.1/trunk/squeezeplay/src/squeezeplay/share/applets/SlimBrowser/SlimBrowserApplet.lua
(original)
+++
7.1/trunk/squeezeplay/src/squeezeplay/share/applets/SlimBrowser/SlimBrowserApplet.lua
Sun Jun 1 23:57:41 2008
@@ -107,7 +107,7 @@
local _menuReceived = false
local modeTokens = {
- play = "SLIMBROWSER_NOW_PLAYING",
+ play = "SLIMBROWSER_PLAYLIST",
pause = "SLIMBROWSER_PAUSED",
stop = "SLIMBROWSER_STOPPED",
off = "SLIMBROWSER_OFF"
@@ -1925,7 +1925,7 @@
-- current playlist should select currently playing item
-- if there is only one item in the playlist, bring the
selected item to top
local playerStatus = _player:getPlayerStatus()
- local playlistSize = playerStatus and
playerStatus.playlist_tracks
+ local playlistSize = _player:getPlaylistSize()
local playerPower = _player:getPlayerPower()
if playerPower == 0 then
@@ -1973,35 +1973,6 @@
end
-function notify_playerPlaylistSize(self, player, playlistSize)
- log:info('SlimBrowser.notify_playerPlaylistSize')
- if _player ~= player then
- return
- end
-
- local power = _player:getPlayerPower()
- local step = _statusStep
- local emptyStep = _emptyStep
-
- -- display 'NOTHING' if the player is on and there aren't any tracks in
the playlist
- if power and playlistSize == 0 then
- local customWindow = showEmptyPlaylist('SLIMBROWSER_NOTHING')
- if emptyStep then
- customWindow:replace(emptyStep.window,
Window.transitionFadeIn)
- end
- if step.window then
- customWindow:replace(step.window,
Window.transitionFadeIn)
- end
- -- make sure we have step.window replace emptyStep.window when there
are tracks
- elseif playlistSize and emptyStep then
- if step.window then
- step.window:replace(emptyStep.window,
Window.transitionFadeIn)
- end
-
- end
-
-end
-
function notify_playerPower(self, player, power)
log:debug('SlimBrowser.notify_playerPower')
if _player ~= player then
@@ -2063,9 +2034,32 @@
return
end
+ local power = _player:getPlayerPower()
local playerStatus = player:getPlayerStatus()
- local step = _statusStep
-
+ local playlistSize = _player:getPlaylistSize()
+ local step = _statusStep
+ local emptyStep = _emptyStep
+
+ -- display 'NOTHING' if the player is on and there aren't any tracks in
the playlist
+ if power and playlistSize == 0 then
+ local customWindow = showEmptyPlaylist('SLIMBROWSER_NOTHING')
+ if emptyStep then
+ customWindow:replace(emptyStep.window,
Window.transitionFadeIn)
+ end
+ if step.window then
+ customWindow:replace(step.window,
Window.transitionFadeIn)
+ end
+ -- we've done all we need to when the playlist is 0, so let's
get outta here
+ return
+ -- make sure we have step.window replace emptyStep.window when there
are tracks and emptyStep exists
+ elseif playlistSize and emptyStep then
+ if step.window then
+ step.window:replace(emptyStep.window,
Window.transitionFadeIn)
+ end
+
+ end
+
+ -- update the window
step.db:updateStatus(playerStatus)
step.menu:reLayout()
@@ -2183,7 +2177,7 @@
_newWindowSpec(
nil,
{
- text = _string("SLIMBROWSER_NOW_PLAYING"),
+ text = _string("SLIMBROWSER_PLAYLIST"),
window = {
["menuStyle"] = "album",
}
Modified:
7.1/trunk/squeezeplay/src/squeezeplay/share/applets/SlimBrowser/strings.txt
URL:
http://svn.slimdevices.com/7.1/trunk/squeezeplay/src/squeezeplay/share/applets/SlimBrowser/strings.txt?rev=2538&root=Jive&r1=2537&r2=2538&view=diff
==============================================================================
--- 7.1/trunk/squeezeplay/src/squeezeplay/share/applets/SlimBrowser/strings.txt
(original)
+++ 7.1/trunk/squeezeplay/src/squeezeplay/share/applets/SlimBrowser/strings.txt
Sun Jun 1 23:57:41 2008
@@ -1,6 +1,15 @@
#
# The two letter codes are defined by ISO 639-1
# http://en.wikipedia.org/wiki/List_of_ISO_639_codes
+
+SLIMBROWSER_PLAYLIST
+ DA Spilleliste
+ DE Wiedergabeliste
+ EN Playlist
+ ES Lista de reproducción
+ FR Liste de lecture
+ IT Elenco di riproduzione
+ NL Playlist
SLIMBROWSER_NOW_PLAYING
DA Afspiller nu
Modified: 7.1/trunk/squeezeplay/src/squeezeplay/share/jive/slim/Player.lua
URL:
http://svn.slimdevices.com/7.1/trunk/squeezeplay/src/squeezeplay/share/jive/slim/Player.lua?rev=2538&root=Jive&r1=2537&r2=2538&view=diff
==============================================================================
--- 7.1/trunk/squeezeplay/src/squeezeplay/share/jive/slim/Player.lua (original)
+++ 7.1/trunk/squeezeplay/src/squeezeplay/share/jive/slim/Player.lua Sun Jun 1
23:57:41 2008
@@ -131,16 +131,6 @@
self.jnt:notify('playerNewName', self, playerName)
end
end
-
-local function _setPlayerPlaylistSize(self, playlistSize)
- log:debug("_setPlayerPlaylistSize")
-
- if playlistSize != self.playlistSize then
- self.playlistSize = tonumber(playlistSize)
- self.jnt:notify('playerPlaylistSize', self,
tonumber(playlistSize))
- end
-end
-
local function _setPlayerPower(self, power)
log:debug("_setPlayerPower")
@@ -778,14 +768,14 @@
self.trackCorrection = 0
self.trackTime = event.data.time
self.trackDuration = event.data.duration
+ self.playlistSize = tonumber(event.data.playlist_tracks)
_setConnected(self, self.state["player_connected"])
- _setPlayerPlaylistSize(self, tonumber(event.data.playlist_tracks))
_setPlayerPower(self, tonumber(event.data.power))
_setPlayerModeChange(self, event.data.mode)
- if self.needsUpgrade ~= lastNeedsUpgrading or self.playerIsUpgrading ~=
lastIsUpgrading then
+ if self.needsUpgrade ~= lastNeedsUpgrade or self.playerIsUpgrading ~=
lastIsUpgrading then
self.jnt:notify('playerNeedsUpgrade', self,
self:isNeedsUpgrade(), self:isUpgrading())
end
@@ -814,7 +804,6 @@
local textValue = _formatShowBrieflyText(display['text'])
if type == 'song' then
s.textarea:setValue("")
- log:warn(display['text'])
s.text:setValue(textValue)
s.artIcon:setStyle("icon")
if display['icon'] then
_______________________________________________
Jive-checkins mailing list
[email protected]
http://lists.slimdevices.com/cgi-bin/mailman/listinfo/jive-checkins