Author: bklaas
Date: Sat Jan 19 15:10:54 2008
New Revision: 1517

URL: http://svn.slimdevices.com?rev=1517&root=Jive&view=rev
Log:
Bug: 5759
Description: access number of playlist_tracks directly from _player object

Modified:
    trunk/jive/src/pkg/jive/share/applets/SlimBrowser/SlimBrowserApplet.lua

Modified: 
trunk/jive/src/pkg/jive/share/applets/SlimBrowser/SlimBrowserApplet.lua
URL: 
http://svn.slimdevices.com/trunk/jive/src/pkg/jive/share/applets/SlimBrowser/SlimBrowserApplet.lua?rev=1517&root=Jive&r1=1516&r2=1517&view=diff
==============================================================================
--- trunk/jive/src/pkg/jive/share/applets/SlimBrowser/SlimBrowserApplet.lua 
(original)
+++ trunk/jive/src/pkg/jive/share/applets/SlimBrowser/SlimBrowserApplet.lua Sat 
Jan 19 15:10:54 2008
@@ -1694,9 +1694,8 @@
 
                -- current playlist should select currently playing item 
                -- if there is only one item in the playlist, bring the 
selected item to top
-               -- FIXME, having the list size of 3 be the indicator of a 
single-item playlist is a hack
-               -- track count should be sent by playerstatus in addition to 
item_loop count
-               if _statusStep.menu.listSize == 3 then
+               local playlistSize = _safeDeref(_player, 'playerStatus', 
'playlist_tracks')
+               if playlistSize == 1 then
                        _statusStep.menu["_lastSelectedIndex"] = 1
                        _statusStep.menu["_lastSelectedOffset"] = 1 
                        _statusStep.menu.selected = 1
@@ -1735,9 +1734,8 @@
                                _statusStep.window:checkLayout()
                                -- a menu size of 3 means a single item 
playlist (1 track plus clear/save playlist items)
                                -- single item playlists are skipped into the 
songinfo window
-                               -- FIXME, having the list size of 3 be the 
indicator of a single-item playlist is a hack
-                               -- track count should be sent by playerstatus 
in addition to item_loop count
-                               if _statusStep.menu.listSize == 3 then
+                               local playlistSize = _safeDeref(_player, 
'playerStatus', 'playlist_tracks')
+                               if playlistSize == 1 then
                                        -- need to spoof a key press here to 
descend one window further
                                        
_statusStep.menu:dispatchNewEvent(EVENT_ACTION)
                                        -- we only do this once, so remove the 
listener now

_______________________________________________
Jive-checkins mailing list
[email protected]
http://lists.slimdevices.com/cgi-bin/mailman/listinfo/jive-checkins

Reply via email to