[mythtv-commits] Ticket #12767: Issues with DLNA clients
MythTV
noreply at mythtv.org
Mon Nov 20 16:42:49 UTC 2017
#12767: Issues with DLNA clients
-------------------------------------+------------------------
Reporter: Dylan Walkden <dylan@…> | Owner: dblain
Type: Bug Report - General | Status: new
Priority: minor | Milestone: 0.28.2
Component: MythTV - UPnP | Version: 0.28.0
Severity: medium | Resolution:
Keywords: dnla upnp | Ticket locked: 0
-------------------------------------+------------------------
Comment (by Steve LeBlanc <sj.leblanc@…>):
I have been a MythTV user for many years. A recent upgrade to Ubuntu
16.04.3 upgraded mythtv to version 29. Like above - both my LG LE5400 TV
and LG BD390 blue ray player could not see the upnp server (very
frustrating).
After downloading the code branch, and a lot of viewing with
tcpdump/wireshark, and a bunch of trial and error - I now have a working
system again. I suspect most of these changes should also be applied to
the .28 and master branches as well. I've included a patch file (for v 29)
with the changes.
Change to libs/libmythupnp/upnpdevice.cpp - this is the change that
allowed both device to 'see' the myth server again. The code that re-
writes/enhances devicemaster.xml was delimiting XML attribute values with
a colon instead of double quotes. Although this is 'valid' according to
XML - it seems old parsers (like those in my devices) have a problem with
this - and ignore the response. This is the only place in any response the
colons were used as the delimiter. Now I could see my myth server and
browse titles/dates - but every folder was empty.
Change to libs/libmythupnp/upnphelpers.cpp - For my device - I found that
if the DLNA Profile name was included - my devices ignored the contents of
the folder. I commented out the inclusion of the DLNA profile - and now I
could see folder content. Maybe it makes sense to make inclusion of DLNA
Profile in the ProfileInfo attribute an option via a UPNP property? I
didn't see anything in the upnp spec requiring it.
After this - when browsing by date - dates were messed up. Some titles
were missing. Items in folders had only the series title - no episode info
(as before).
Changes to programs/mythbackend/upnpcdstv.cpp - Dates were messed up
because the SQL query as returning the UTC datetime instead of the
localtime datetime. The Where clauses were based on locattime. a minor
update to this query fixed all the date issues.
When requesting titles - titles with a single recording were missing. This
is what the code was supposed to do - but this seems not 100% correct. I
didn't see anything in the upnp spec that says you should output ONLY the
item instead of the container if there is only one item. At a minimum -
I'd expect, if there were one item, output the container - then the sinle
item in the container. I changed the logic to only output containers
(which makes more sense to me - since we're asking to TITLE containers.
Finally - I wanted to see series episode subtitles (like in 0.27) - so I
implemented it in libmythupnp/upnpcdsobjects.cpp. I added logic that says
- if we are processing a videoItem - and filters have been included - but
'Subtitle' is not included - then add the subtitle to the title returned.
This could be done different ways. Maybe it makes sense to do this in
programs/mythbackend/upnpcdstv.cpp - when querying for video items - just
include it?
Good news is - not I have a working system again!
--
Ticket URL: <https://code.mythtv.org/trac/ticket/12767#comment:38>
MythTV <http://www.mythtv.org>
MythTV Media Center
More information about the mythtv-commits
mailing list