Home of the Squeezebox™ & Transporter® network music players.
Results 1 to 5 of 5
  1. #1
    Senior Member
    Join Date
    Apr 2005
    Location
    UK/London
    Posts
    3,027

    Handling not found Cover Art from radio station

    I have noticed that sometimes the cover art that a radio station says is applicable turns out to be not found (HTTP 404).
    I do not test that the art exists because of the extra complication of doing it using async http request.

    The effect on Jive players is not too bad - in that they just leave a blank area but in LMS web UI it results in an ugly square and a broken image.

    So - I could put in the extra code to try to handle it - but I think a better solution would be for LMS (if it knows) to fallback to the "icon" image if the "cover" one fails.
    This way all plugins could benefit from the behaviour (provided they provide both icon and cover).


    Any quick hints about where in LMS it might be? (lots of references to icon or cover in the code)
    Paul Webster
    http://dabdig.blogspot.com
    Author of "Now Playing" plugins covering Radio France (FIP etc), KCRW, Supla Finland, ABC Australia, CBC/Radio-Canada and RTE Ireland

  2. #2
    Babelfish's Best Boy mherger's Avatar
    Join Date
    Apr 2005
    Location
    Switzerland
    Posts
    20,460

    Handling not found Cover Art from radio station

    > So - I could put in the extra code to try to handle it - but I think a
    > better solution would be for LMS (if it knows) to fallback to the "icon"
    > image if the "cover" one fails.


    LMS usually isn't involved in this process: it receives a URL from the
    radio station or whatever, and it tells the client to use it. The client
    (Radio, web UI, mobile app) then tries to display that image. It's then
    up to the client to handle the 404. A browser obviously would display
    the broken image.

    Now there's always an exception to a rule:

    > Any quick hints about where in LMS it might be? (lots of references to
    > icon or cover in the code)


    If you used LMS' image proxy it would/should return the default icon in
    such a case. But you'd either have to switch to using that image proxy
    instead of mysb's (and this you can't do easily), or you'd have to
    implement this in your plugin. See the Slim::Web::ImageProxy's header.
    There's some information about how to register your custom image handler.

    I must say that I've rarely seen this issue. If this is from a specific
    station, then it might be worth just asking them to fix their artwork.

    --

    Michael

  3. #3
    Senior Member
    Join Date
    Apr 2005
    Location
    UK/London
    Posts
    3,027
    Thanks.

    I'm seeing it right now with CBC Canada.
    Their data includes information about the currently playing programme including the image - but the image for the programme does not exist.
    On their own web site they show a generic image when this happens
    e.g.
    https://www.cbc.ca/listen/live-radio...music=edmonton
    The programme playing right now in Toronto is "RTE Documentary Hour"
    They point to
    https://images.radio-canada.ca/c_scale,w_${width},q_auto/v1/cbc-music/programs/${ratio}/rte_documentary_hour.png
    which I convert to
    https://images.radio-canada.ca/c_sca...ntary_hour.png
    which does not exist

    While it is possible that my generation of the replacement parameters is incorrect ... it does work for other shows.
    Their own schedule page shows the same issue
    https://www.cbc.ca/listen/live-radio...music=edmonton


    I will ask the broadcaster to resolve it ... but I do not hold out much hope.
    Paul Webster
    http://dabdig.blogspot.com
    Author of "Now Playing" plugins covering Radio France (FIP etc), KCRW, Supla Finland, ABC Australia, CBC/Radio-Canada and RTE Ireland

  4. #4
    Babelfish's Best Boy mherger's Avatar
    Join Date
    Apr 2005
    Location
    Switzerland
    Posts
    20,460

    Handling not found Cover Art from radio station

    > I'm seeing it right now with CBC Canada.
    > Their data includes information about the currently playing programme
    > including the image - but the image for the programme does not exist.


    Well, this sucks. Unless you want to implement the imageproxy, you could
    still download the images in the background to keep a list of failing
    entries... Or manually maintain this. Which sucks, too :-)

    --

    Michael

  5. #5
    Senior Member
    Join Date
    Apr 2005
    Location
    UK/London
    Posts
    3,027
    I'm going to see if I can use ImageProxy and failing that I'll see if I can do an async HEAD and then mess around with my data if the response is not a 200 or is a 404 (not sure yet).
    Paul Webster
    http://dabdig.blogspot.com
    Author of "Now Playing" plugins covering Radio France (FIP etc), KCRW, Supla Finland, ABC Australia, CBC/Radio-Canada and RTE Ireland

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •