clients: Re-enable Samsung DCM10 flag.

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.
This commit is contained in:
Justin Maggard 2015-04-10 15:33:09 -07:00
parent 6630671af0
commit c1bb37a387
2 changed files with 26 additions and 7 deletions

View File

@ -66,7 +66,7 @@ struct client_type_s client_types[] =
/* User-Agent: DLNADOC/1.50 SEC_HHP_[TV]UE40D7000/1.0 */
/* User-Agent: DLNADOC/1.50 SEC_HHP_ Family TV/1.0 */
{ ESamsungSeriesCDE,
FLAG_SAMSUNG | FLAG_DLNA | FLAG_NO_RESIZE,
FLAG_SAMSUNG | FLAG_DLNA | FLAG_NO_RESIZE | FLAG_SAMSUNG_DCM10,
"Samsung Series [CDEF]",
"SEC_HHP_",
EUserAgent

View File

@ -1818,22 +1818,41 @@ SamsungGetFeatureList(struct upnphttp * h, const char * action)
static const char resp[] =
"<u:X_GetFeatureListResponse xmlns:u=\"urn:schemas-upnp-org:service:ContentDirectory:1\">"
"<FeatureList>"
"<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\n"
"&lt;Features xmlns=\"urn:schemas-upnp-org:av:avs\""
" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\""
" xsi:schemaLocation=\"urn:schemas-upnp-org:av:avs http://www.upnp.org/schemas/av/avs.xsd\"&gt;"
"&lt;Feature name=\"samsung.com_BASICVIEW\" version=\"1\"&gt;"
"&lt;container id=\"" MUSIC_ID "\" type=\"object.item.audioItem\"/&gt;"
"&lt;container id=\"" VIDEO_ID "\" type=\"object.item.videoItem\"/&gt;"
"&lt;container id=\"" IMAGE_ID "\" type=\"object.item.imageItem\"/&gt;"
"&lt;container id=\"%s\" type=\"object.item.audioItem\"/&gt;"
"&lt;container id=\"%s\" type=\"object.item.videoItem\"/&gt;"
"&lt;container id=\"%s\" type=\"object.item.imageItem\"/&gt;"
"&lt;/Feature&gt;"
"&lt;/Features&gt;"
"</FeatureList></u:X_GetFeatureListResponse>";
const char *audio = MUSIC_ID;
const char *video = VIDEO_ID;
const char *image = IMAGE_ID;
char body[1024];
int len;
if (runtime_vars.root_container)
return SoapError(h, 401, "Invalid Action");
{
if (strcmp(runtime_vars.root_container, BROWSEDIR_ID) == 0)
{
audio = MUSIC_DIR_ID;
video = VIDEO_DIR_ID;
image = IMAGE_DIR_ID;
}
else
{
audio = runtime_vars.root_container;
video = runtime_vars.root_container;
image = runtime_vars.root_container;
}
}
BuildSendAndCloseSoapResp(h, resp, sizeof(resp)-1);
len = snprintf(body, sizeof(body), resp, audio, video, image);
BuildSendAndCloseSoapResp(h, body, len);
}
static void