Author: bklaas
Date: Fri Mar 14 13:37:49 2008
New Revision: 2124

URL: http://svn.slimdevices.com?rev=2124&root=Jive&view=rev
Log:
Bug: n/a
Description: assert size rather than default to 56 pixel

Modified:
    trunk/squeezeplay/src/squeezeplay/share/jive/slim/Player.lua
    trunk/squeezeplay/src/squeezeplay/share/jive/slim/SlimServer.lua

Modified: trunk/squeezeplay/src/squeezeplay/share/jive/slim/Player.lua
URL: 
http://svn.slimdevices.com/trunk/squeezeplay/src/squeezeplay/share/jive/slim/Player.lua?rev=2124&root=Jive&r1=2123&r2=2124&view=diff
==============================================================================
--- trunk/squeezeplay/src/squeezeplay/share/jive/slim/Player.lua (original)
+++ trunk/squeezeplay/src/squeezeplay/share/jive/slim/Player.lua Fri Mar 14 
13:37:49 2008
@@ -32,7 +32,7 @@
 local debug = require("jive.utils.debug")
 
 -- stuff we need
-local _assert, setmetatable, tonumber, tostring, pairs, type = _assert, 
setmetatable, tonumber, tostring, pairs, type
+local _assert, assert, setmetatable, tonumber, tostring, pairs, type = 
_assert, assert, setmetatable, tonumber, tostring, pairs, type
 
 local os             = require("os")
 local math           = require("math")
@@ -763,8 +763,8 @@
 function artworkThumbUri (iconId, size)
 
 
-       -- we want a 56 pixel thumbnail if it wasn't specified
-       if not size then size = 56 end
+       assert(iconId)
+       assert(size)
 
        -- sometimes we get a path to a static image rather than an iconId
        -- if the iconId is a number, this is cover art, otherwise it's static 
content
@@ -782,7 +782,6 @@
         local artworkUri
         local resizeFrag = '_' .. size .. 'x' .. size .. '_p' -- 'p' is for 
padded
         if thisIsAnId then
-                -- we want a 56 pixel thumbnail if it wasn't specified
                 artworkUri = '/music/' .. iconId .. '/cover' .. resizeFrag .. 
'.gd'
        elseif string.match(iconId, '.png') then
                -- if this isn't a number, then we just want the path

Modified: trunk/squeezeplay/src/squeezeplay/share/jive/slim/SlimServer.lua
URL: 
http://svn.slimdevices.com/trunk/squeezeplay/src/squeezeplay/share/jive/slim/SlimServer.lua?rev=2124&root=Jive&r1=2123&r2=2124&view=diff
==============================================================================
--- trunk/squeezeplay/src/squeezeplay/share/jive/slim/SlimServer.lua (original)
+++ trunk/squeezeplay/src/squeezeplay/share/jive/slim/SlimServer.lua Fri Mar 14 
13:37:49 2008
@@ -31,7 +31,7 @@
 --]]
 
 -- our stuff
-local _assert, tostring, type, tonumber = _assert, tostring, type, tonumber
+local _assert, assert, tostring, type, tonumber = _assert, assert, tostring, 
type, tonumber
 local pairs, ipairs, setmetatable = pairs, ipairs, setmetatable
 
 local os          = require("os")
@@ -462,9 +462,7 @@
 -- returns a sink for artwork so we can cache it as Surface before sending it 
forward
 local function _getArtworkThumbSink(self, iconId, size)
 
-       if not size then
-               size = 56
-       end
+       assert(size)
        
        local cacheKey = iconId .. "@" .. size
 
@@ -572,7 +570,7 @@
 --]]
 
 function artworkThumbCached(self, iconId, size)
-       local cacheKey = iconId .. "@" .. (size or 56)
+       local cacheKey = iconId .. "@" .. (size)
        if self.artworkCache:get(cacheKey) then
                return true
        else
@@ -645,9 +643,7 @@
 function fetchArtworkThumb(self, iconId, icon, uriGenerator, size, imgFormat)
        logcache:debug(self, ":fetchArtworkThumb(", iconId, ")")
 
-       if not size then
-               size = 56
-       end
+       assert(size)
        
        local cacheKey = iconId .. "@" .. size
 
@@ -702,9 +698,7 @@
 function fetchArtworkURL(self, url, icon, size)
        logcache:debug(self, ":fetchArtworkURL(", url, ")")
 
-       if not size then
-               size = 56
-       end
+       assert(size)
        
        local cacheKey = url .. "@" .. size
 

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

Reply via email to