Bug 5766 - Slim::Web::HTTP::fixHttpPath doesn't look for content in the right order
: Slim::Web::HTTP::fixHttpPath doesn't look for content in the right order
Status: CLOSED FIXED
Product: Logitech Media Server
Classification: Unclassified
Component: Skins
: 7.0
: Macintosh Other
: P2 normal (vote)
: ---
Assigned To: Michael Herger
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2007-10-12 08:18 UTC by Ben Klaas
Modified: 2009-09-08 09:19 UTC (History)
1 user (show)

See Also:
Category: ---


Attachments
pass along those params (1.98 KB, patch)
2007-11-16 07:14 UTC, Michael Herger
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Ben Klaas 2007-10-12 08:18:01 UTC
assigning to Michael for comment. I can try tackling the fix, but not today.

There is a white-on-transparent html/images/cover.png in Default/ now, and a gray-on-transparent html/images/cover.png in EN/

The EN image is necessary for any skin that employs a white background (Handheld, Classic, Touch, Nokia770), because the white-on-transparent appears blank in these skins.

If a resized request is sent for cover.png, for example

http://localhost:9000/Classic/html/images/cover_50x50.png

I would expect it to look in Classic/html/images followed by EN/html/images, but that's not how it works. Instead it looks through all skin folders until it finds a match, and uses the first match it finds. It's finding Default first, and we're getting the "blank" image in the skin.

The data for cover.png is grabbed by Slim::Web::HTTP::getStaticContent('html/images/cover.png');, which in turn calls Slim::Web::HTTP::fixHtttpPath.

fixHttpPath grabs all of the skindirs with 

my $skindirs = $template->context()->{'CONFIG'}->{'INCLUDE_PATH'};
       
what isn't clear to me here is how to sort $skindirs appropriately. Throw in the added complexity that some skins (e.g., Touch) are supposed to have an inheritance from other skins first. So, in the case of Touch, getStaticContent should try to find Touch/html/images/cover.png first, then Nokia770/html/images/cover.png, then EN/html/images/cover.png (and then, IMHO, give up and maybe return some kind of uber-default 1x1 image).
Comment 1 Ben Klaas 2007-10-12 08:22:04 UTC
I should also note that if I copy EN's cover.png to the current skin's directory, fixHttpPath still hits on Default's cover.png first and not the current skin's.
Comment 2 Blackketter Dean 2007-10-26 09:16:32 UTC
Ben/Michael: how important is this for 7.0?  Please target.
Comment 3 Ben Klaas 2007-10-26 09:28:08 UTC
IMHO, this seems like a bug worth fixing for 7.0. Setting target as such, but I'm open-minded to targeting it for later.
Comment 4 Michael Herger 2007-11-16 07:14:29 UTC
Created attachment 2414 [details]
pass along those params

After a lot of backtracing I've come up with this rather simple patch: keep track of our params, or the skinOverride is lost. Please give it a try.
Comment 5 Michael Herger 2007-11-16 09:35:02 UTC
submitted in change 14778
Comment 6 Chris Owens 2008-03-07 09:04:21 UTC
This bug is being closed since it was resolved for a version which is now released!  Please download the new version of SqueezeCenter (formerly SlimServer) at http://www.slimdevices.com/su_downloads.html

If you are still seeing this bug, please re-open it and we will consider it for a future release.