Opened 5 years ago

Closed 5 years ago

Last modified 5 years ago

#12202 closed Patch - Bug Fix (fixed)

UPnP : Fix recordings thumbnail images broken in some clients

Reported by: ludvik.tesar@… Owned by: stuartm
Priority: minor Milestone: 0.28
Component: MythTV - UPnP Version: Unspecified
Severity: medium Keywords:
Cc: Ticket locked: no


Thumbnails functionality in UPnP in Recordings section was recently added (or fixed) in master branch by commit

Unfortunately, this solution does not work with all clients, for example with my LG SmartTV client.

The first problem is that my client accepts only JPG thumbnails. Fortunately, another recent commit :

added support to JPG into services API, so it is easy to fix the <res/> tag so that it would produce JPG thumbnail. (this is marked with TODO in original code, so it is right time to implements this)

The second problem is, that the original commit have also re-worked the <albumArtURI/> so that it produces output based on API


This intends to take the artwork downloaded from Internet and use it as thumbnail. In my case, unfortunately, Inetref is empty for most recordings, and even if Inetref is non-empty, no artwork image is present, so it never works. To make this worse, presence of this tag beats any thumbnails based on <res/> tag for my UPnP client, so <res/> tag, which is fixed above, is ignored in all cases. This means, that I never see any thumbnail for any recording at all, even if res tag is fixed. So, I propose to place test of emptiness of sInetRef variable into the code. If it is empty, no <albumArtURI/> tag would be produced (in patch). Ideally another test should be added whether the image file for album art exists and whether is jpeg type (not in patch).

This is the pull request with the proposed patch:

Change History (5)

comment:1 Changed 5 years ago by stuartm

Owner: changed from dblain to stuartm
Status: newaccepted

comment:2 Changed 5 years ago by Stuart Morgan <smorgan@…>

Resolution: fixed
Status: acceptedclosed

In 84705913ebfe904d6cb85a3b192b6eacfe6537e3/mythtv:

UPnP: Ensure resource URIs are properly encoded and formatted.

Also fixed a couple of bugs.

  1. The 'medium' size artwork was being defined

twice for video and recordings.

  1. The thumbnail for recordings was using PNG which is within the

spec, but DLNA requires JPG be offered at a minimum. Since no client
will support PNG but not JPG, we may as well only offer JPG for now.

Refs #9632
Fixes #12202

comment:3 in reply to:  2 Changed 5 years ago by ludvik.tesar@…

Hi Stuart,

I am sorry, I have overlooked one error which you have unfortunately copied into the changeset 84705913ebfe904d6cb85a3b192b6eacfe6537e3/mythtv

In line 456 in upnpcdstv.cpp there is :

sProtocol = QString( "http-get:*:image/png:DLNA.ORG_PN=JPG_TN");

which should obviously be :

sProtocol = QString( "http-get:*:image/jpeg:DLNA.ORG_PN=JPG_TN");

I am not sure how JPG_TN,image/jpg is interchangeable with JPEG_TN,image/jpeg. At the moment, in my live system, I am using the version with both "e"'s "http-get:*:image/jpeg:DLNA.ORG_PN=JPEG_TN" and it works, but I will change it to whatever you decide to use, just to test it.

Sorry again for the confusion, I hope it is easy to fix in existing changeset.

I am not sure whether you get this comment, could you just drop the e-mail to me?

Thanks, Ludvik

comment:4 Changed 5 years ago by Stuart Morgan <smorgan@…>

In 4f19c08e97250a07f5c2e7cc2c7b4b572f8e8ffc/mythtv:

UPnP: Fix repeated error in mime/dlna profile strings, JPG should be JPEG. Refs #12202

comment:5 Changed 5 years ago by paulh

Milestone: unknown0.28
Note: See TracTickets for help on using tickets.