Bug 15944 - Cover Art Request fails on embedded if requested size = original size
: Cover Art Request fails on embedded if requested size = original size
Status: CLOSED FIXED
Product: Logitech Media Server
Classification: Unclassified
Component: Artwork
: 7.5.0
: PC Debian Linux
: P1 normal (vote)
: 7.5.0
Assigned To: Andy Grundman
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2010-03-24 05:00 UTC by Christian Erpelding
Modified: 2010-04-08 17:24 UTC (History)
1 user (show)

See Also:
Category: Bug


Attachments
cover.jpg that fails (12.94 KB, image/jpeg)
2010-03-24 05:22 UTC, Christian Erpelding
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Christian Erpelding 2010-03-24 05:00:35 UTC
I'm using SBS-embedded r30403 on Linux PPC.

Let's say I have a 300x300 cover art for cover art id 38ad3c29.

I get this 300x300 cover art without problems using:
[url]http://192.168.178.11:9000/music/38ad3c29/cover.png[/url] (get 300x300)

I can also get resized thumbnails (50x50):
[url]http://192.168.178.11:9000/music/38ad3c29/cover_50x50_F.png[/url] (get 50x50)

Infact, resize works as long as the returned size differs from the original size:

Working:
.../cover_299x299_F.png (get 299x299)
.../cover_400x400.png (get 400x400)
.../cover_400x400_f.png (get 400x400)
.../cover_400x400_s.png (get 400x400)

Not working:
.../cover_300x300.png (expected 300x300)
.../cover_400x400_F.png (expected 300x300)
.../cover_400x400_S.png (expected 300x300)

The problem seems to only exist if the returned artwork size would be [b]the same[/b] as the original size:

[10-03-24 12:14:15.0192] Slim::Web::Graphics::artworkRequest (77) Artwork request: music/38ad3c29/cover_300x300.png
[10-03-24 12:14:15.0208] Slim::Web::Graphics::artworkRequest (116)   Resize specification: 300x300
[10-03-24 12:14:15.0224] Slim::Web::Graphics::artworkRequest (266)   Resizing: /crypto/mp3/Artists A-G/Acoustic Alchemy/The Very Best Of Acoustic Alchemy/cover.jpg using spec 300x300
[10-03-24 12:14:15.0244] Slim::Utils::Misc::msg (1164) Warning: [12:14:15.0235] Loading image from /crypto/mp3/Artists A-G/Acoustic Alchemy/The Very Best Of Acoustic Alchemy/cover.jpg
[10-03-24 12:14:15.0256] Slim::Utils::Misc::msg (1164) Warning: [12:14:15.0249]   Using JPEG scaling (target 300x300)
[10-03-24 12:14:15.0497] Slim::Utils::Misc::msg (1164) Warning: [12:14:15.0486]   Got pre-scaled image of size 300x300
[10-03-24 12:14:15.0512] Slim::Utils::ImageResizer::sync_resize (137) Error resizing /crypto/mp3/Artists A-G/Acoustic Alchemy/The Very Best Of Acoustic Alchemy/cover.jpg: Can't use an undefined value as a SCALAR reference at /usr/share/perl5/Slim/Utils/ArtworkCache.pm line 98.
[10-03-24 12:14:15.0524] Slim::Web::Graphics::__ANON__ (293)   Resize failed, returning 500
[10-03-24 12:14:15.0532] Slim::Web::Graphics::__ANON__ (295) Artwork resize for music/38ad3c29/cover_300x300.png failed
Comment 1 Andy Grundman 2010-03-24 05:15:24 UTC
Can you attach this cover.jpg file, just in case?
Comment 2 Christian Erpelding 2010-03-24 05:21:09 UTC
Sure, but it happens with EVERY cover.jpg that I've tested. :-)
Comment 3 Christian Erpelding 2010-03-24 05:22:52 UTC
Created attachment 6692 [details]
cover.jpg that fails
Comment 4 SVN Bot 2010-03-24 07:17:06 UTC
 == Auto-comment from SVN commit #30407 to the slim repo by agrundman ==
 == https://svn.slimdevices.com/slim?view=revision&revision=30407 ==

Bug 15944, failing test
Comment 5 SVN Bot 2010-03-24 07:17:40 UTC
 == Auto-comment from SVN commit #30408 to the slim repo by agrundman ==
 == https://svn.slimdevices.com/slim?view=revision&revision=30408 ==

Bug 15944, fixed resizing a file to same size
Comment 6 Andy Grundman 2010-03-24 07:40:54 UTC
There's another bug here too, a request for cover_300x300.png does not return png, but jpg, due to a failing regex.
Comment 7 SVN Bot 2010-03-24 08:43:04 UTC
 == Auto-comment from SVN commit #30411 to the slim repo by agrundman ==
 == https://svn.slimdevices.com/slim?view=revision&revision=30411 ==

Fixed bug 15944, fix regex to allow capturing extension correctly
Comment 8 Chris Owens 2010-04-08 17:24:33 UTC
This bug has been marked fixed in a released version of Squeezebox Server or the accompanying firmware or mysqueezebox.com release.

If you are still seeing this issue, please let us know!