Some Samsung clients (at least UE40ES8000) apparently cannot handle our
standard container IDs when we turn on the DCM10 feature. So they end up
requesting an empty ObjectID, which is invalid. If we blindly return our
root container, they still have problems browsing because they only use
one object from our returned results, so they don't get a full list of
browseable categories.
It has been confirmed that we can work around this by using the same
ObjectIDs that Samsung uses for our root containers in our
X_GetFeatureList response (A, V, and I). And fortunately it's trivial to
handle these renamed ObjectIDs using our magic container system.
Fixes: SF Bug #311 (Samsung TV built-in DLNA client broken since v1.1.5)
Add support for upnp:playbackCount and upnp:lastPlaybackPosition tags.
These are used by Kodi to keep track of bookmark information as well as
determining whether to show the checkmark to indicate that the video
has been played.
Also add support for the UpdateObject command, which Kodi uses to
update the playbackCount and lastPlaybackPosition information.
This change requires a DB schema update, which should be done
automatically on the first run.
Inspired by SF user Karsten's patch #167.
On Hyundai HLN 24TS382 Smart TV, the DLNA client refuses to display
media files whose title does not end with a media file extension.
Because minidlna strips the extensions, all folders thus appear empty.
This patch adds a quirk for Hyundai TVs that appends the original file
extension to the titles, which fixes the issue.
From SF user Andrea Odetti:
The Samsung BD J5500 player does not accept some of the DLNA_PN values
used by minidlna for *.mp4 files.
For instance AVC_MP4_MP_HD_720p_AAC and AVC_MP4_BL_L31_HD_AAC are
problematic as the player would simply ignore the files and not show
them.
AVC_MP4_HP_HD_AAC works.
All the files play normally from a USB key.
I've noticed as well that NULL works always, and this is the approach I
have followed.
So I changed minidlna and added a flag to disable DLNA_PN, and this
flag is only used for a Samsung BD J5500 in order not to break other
players, which can handle DLNA_PN properly.
So when a J5500 is connected we simply set DLNA_PN to NULL and
everything works well.
Add FLAG_CAPTION_RES to the modern Samsung profile. Older Samsung
devices used a custom method for describing subtitles, but apparently
Series J no longer supports it. The good thing is, they now support
the more standard method (and probably have been for a while, since it
works on my old Series D BDP).
So let's just expose both methods to the client, since everything should
be able to handle it.
Fixes: SF bug #113 (Subtitles support for new 2015 Samsung J series TV)
When a browse command is issued multiple files are returned. As soon as one had a caption, all files were marked as having captions because the flag wasn't cleared.
Signed-off-by: Justin Maggard <jmaggard@netgear.com>
From SF Patch #90:
My LG TV (42LE5500) retrieves items from BrowseDirectChildren in a weird way.
The TV can only display up to 20 items per page, but it sets RequestedCount to
54. StartingIndex is correctly set to 0, 20, 40, ... etc. When minidlna responds
with the 54 entries, the TV sorts folders (containers) first, before items, then
displays the entries, limited to 20 per page.
In my setup, I have ~23 folders whose names are similar to the files, so that
when sorting by name, the folders are mixed with the files, thereby resulting in
duplicate folders appearing on all 3 pages and many missing files. The solution
is to make sure minidlna orders items the same way that the TV expects them, so
that when the StartingIndex is 20 or more, we return the "correct" subset of
items.
Thanks SF user Darell Tan for the fix.
The browsing issue that was reported on Samsung Series F was
actually only present when a custom root container was being
specified (http://sourceforge.net/p/minidlna/patches/121/).
So instead of disabling DCM10, fix our X_GetFeatureList
response when a custom root container is set. If the custom
root is Browse Folders, then drop the user straight to
folder browsing for that media type. If it's something
other than folder browsing, just set all media type roots to
the custom root container.
For future reference, the DCM10 flag enables (at least)
video bookmark support and Samsung "BasicView" support; so
selecting, for example, Videos from the Samsung UI can send
you straight to the Videos section of the media library.
Some images don't include an embedded thumbnail, and others
have the thumbnail in the wrong aspect ratio. In these
cases we resize ourselves, which we should allow to occur
regardless of the NO_RESIZE flag.
Embedded thumbnails may have an undesirable orientation, so
we should do our own scaling with inline rotation if the
thumbnail image needs to be rotated.
Asus O!Play reboots with titles longer than 23 characters with some
file types when there are subtitles present. So we truncate video
file titles with external subtitles.
It also supports subtitles in LG fashion, so add that too.
Pretend that we don't support SamsungGetFeatureList if we have a
custom root container specified, or else the Samsung client will
jump straight to our normal A/V/P sections.
A Samsung TV cannot be reliably detected by checking for "SEC_HHP_TV"
User Agent. Only the first part can be guaranteed, eg. "SEC_HHP_" as the rest
can be changed by the end user.
Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk>
While playback on an Samsung E Series TV is ok, other clients such as VLC
and vplayer (android) attempt to play the artwork rather than the movie.
The issue was traced to minidlna serving the artwork res before the movie res.
Other dlna server's were observed and found to the send the movie first then
the artwork.
Swapping the order seems to keep all tested clients happy.
Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk>