Bug 10066 - Error handling in Extension Downloader
: Error handling in Extension Downloader
Status: RESOLVED FIXED
Product: Logitech Media Server
Classification: Unclassified
Component: Plugin
: 7.3.0
: PC Other
: -- normal (vote)
: ---
Assigned To: Unassigned bug - please assign me!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2008-11-18 22:15 UTC by Erland Isaksson
Modified: 2008-11-19 14:47 UTC (History)
1 user (show)

See Also:
Category: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Erland Isaksson 2008-11-18 22:15:42 UTC
The error handling in the Extension Downloader needs to be improved a bit, if a single repository url has missed to add the "lang" attribute in the "desc" element it's not possible to access the Extension Downloader page at all.

You will just get a blank page in this case and the following error is shown in the SqueezeCenter log:

Slim::Networking::IO::Select::select (271) Error: Select task failed: Can't coerce array into hash at /usr/src/squeezecenter/7.3/server/Slim/Plugin/Extensions/Plugin.pm line 308.

The "desc" element part of the XML could look like this to cause this problem:
<desc>Some nice description</desc>

While it works if you correctly has entered the description as:
<desc lang="EN">Some nice description</desc>

The expected behavior would be that Extension Downloader just ignore either the whole repository that contains the error or alternatively just ignore the specific plugin in that repository that contains the problem. 

Today it makes it impossible to use the Extension Downloader at all and the only workaround if you get into this situation is to manually find and delete the Extension Downloader prefs file and start over again.
Comment 1 James Richardson 2008-11-19 09:07:59 UTC
Michael: would this be yours to address?
Comment 2 Adrian Smith 2008-11-19 12:32:59 UTC
Its mine.
Comment 3 Adrian Smith 2008-11-19 14:47:59 UTC
Simple fix in change 23972

This won't display titles or descriptions if you miss the lang="X", but it should still process the repo and build the web page.

[XML::Simple seems to be incapable of returning a hash if there is no attribute there so it makes it harder support both the localised case and the case when it lang="X" is ommitted]