Home of the Squeezebox™ & Transporter® network music players.
Results 1 to 3 of 3
  1. #1
    Senior Member
    Join Date
    Oct 2005
    Location
    Ireland
    Posts
    17,821

    iHeart metadata images not displayed as mime is "text/plain"

    While testing iHeart HLS stream - I noticed some metadata images are not displayed. Some images are tagged with "text/plain"

    The LMS code in Slim::Web::ImageProxy::_gotArtwork - makes a check that is data is successfully returned but is mime is "text" then it is to be considered an error. The images seems to be JFIF (example http://assets.iheart.com/images/1080/MI0003754714 )

    Would it be better to log error if mime is "text " AND first 3 bytes of returned data are not the image tag "0xFF 0xD8 0xFF" (i.e. SOI + 1 byte) ?
    Currently if I bypass the mime "text" checking code - LMS displays the image correctly.

    At present if artwork.imageproxy is enabled to DEBUG - there is a binary image string logged.

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

    iHeart metadata images not displayed as mime is"text/plain"

    > Would it be better to log error if mime is "text " AND first 3 bytes of
    > returned data are not the image tag "0xFF 0xD8 0xFF" (i.e. SOI + 1
    > byte) ?


    While this is a mis-configured web server, we certainly can try to be
    nice. There actually already is a function to guess the file type from
    the magic bytes. I'll re-use that.

    --

    Michael

  3. #3
    Senior Member
    Join Date
    Oct 2005
    Location
    Ireland
    Posts
    17,821
    Quote Originally Posted by mherger View Post
    > Would it be better to log error if mime is "text " AND first 3 bytes of
    > returned data are not the image tag "0xFF 0xD8 0xFF" (i.e. SOI + 1
    > byte) ?


    While this is a mis-configured web server, we certainly can try to be
    nice. There actually already is a function to guess the file type from
    the magic bytes. I'll re-use that.
    Sounds like a good approach. I'd usually live with the issue but iHeart is a major operator. When playing iHeart streams using HLS - track covers and title metadata are provided in stream.

Posting Permissions

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