Bug 10753 - SB2+: $client->model() should return value received from player firmware
: SB2+: $client->model() should return value received from player firmware
Status: RESOLVED FIXED
Product: Logitech Media Server
Classification: Unclassified
Component: Misc
: 7.4.0
: PC Other
: -- normal (vote)
: ---
Assigned To: Unassigned bug - please assign me!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2009-01-19 08:42 UTC by Michael Herger
Modified: 2009-01-19 13:13 UTC (History)
2 users (show)

See Also:
Category: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Herger 2009-01-19 08:42:36 UTC
Slim::Player::SqueezePlay relies on the player type being defined in the HELO packet. $client->model() is an accessor to this value.

The other player classes have a sub model() which returns a hard coded value. In the case of the SB2 this sub accepts a parameter to tell whether we want to know whether this is a squeezebox2 type player, or whether it's actually a SB3. In some places we therefore call $client->model(1) (1 = "give me the real player"). This parameter fails with Squeezeplay, as it sets the player model to this value.

Triode "fixed" one such call for SP in change 24706 by removing the parameter. But this change breaks the query for SB3.
Comment 1 Adrian Smith 2009-01-19 11:05:48 UTC
Oops - I didn't see that - in which case it needs changing so Squeezeplay wraps a method round a different accessors - let me fix another way.
Comment 2 Adrian Smith 2009-01-19 12:02:48 UTC
alternative fix in 24710 - I think this does what you wall Alan?
Comment 3 Alan Young 2009-01-19 12:07:20 UTC
I guess that will do. Thanks. I need to investigate why we need a parametrized accessor for model in the first place, but that can wait ...
Comment 4 Michael Herger 2009-01-19 12:36:37 UTC
Alan - I introduced the parameter for SB2/3: in many places we rely on SB2==SB3, in some we want them separated. I therefore added that parameter to tell S::P::Squeezbox2::model that I want the real model. It's afaik the only reason for it.
Comment 5 Adrian Smith 2009-01-19 13:11:49 UTC
Actually quite pleased that we've found a use for the extra complexity I put into S:U:Accessor - Class::Accessor::Faster which is it based on would not allow you to define accessors at multiple levels of the class hierachy but our version does..
Comment 6 Adrian Smith 2009-01-19 13:13:00 UTC
I think this is fixed...