From e40803540c091b09c15b6fe76946704acea07104 Mon Sep 17 00:00:00 2001 From: Khalid Ali Date: Sat, 6 Feb 2021 03:19:53 +0200 Subject: [PATCH 1/2] SamsungTV not showing last PW folder - fixes #15 --- upnpsoap.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/upnpsoap.c b/upnpsoap.c index 3c2ecc2..a9f7310 100644 --- a/upnpsoap.c +++ b/upnpsoap.c @@ -1349,7 +1349,10 @@ static void createPasswordContainer(struct Response *passed_args, const char *id } } - if (depth == runtime_vars.password_length-1) cnt = 0; + if (depth == runtime_vars.password_length-1) { + cnt = 0; + if (passed_args->client == ESamsungSeriesCDE) cnt = 1; + } /* DPRINTF(E_DEBUG, L_HTTP, "Generating Password Set:\n" " * ObjectID: %s\n" From f6e43a4cbf6e91081bc5bb595b544e17e1f9c41c Mon Sep 17 00:00:00 2001 From: Khalid Ali Date: Sat, 6 Feb 2021 03:25:28 +0200 Subject: [PATCH 2/2] Bug fix - SamsungTV PW doesn't get stored. --- upnpsoap.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/upnpsoap.c b/upnpsoap.c index a9f7310..8550a03 100644 --- a/upnpsoap.c +++ b/upnpsoap.c @@ -1364,7 +1364,7 @@ static void createPasswordContainer(struct Response *passed_args, const char *id if (depth == runtime_vars.password_length) { - if (!isMeta) { + if (!isMeta || passed_args->client == ESamsungSeriesCDE) { // Find the First Parent after the Primary Parent for (i=0; id[i] != '$' && i < strlen(id);i++); @@ -1535,6 +1535,10 @@ BrowseContentDirectory(struct upnphttp * h, const char * action) DPRINTF(E_INFO, L_PASSWORD, "Is Password MetaData %s", ObjectID); totalMatches = 1; createPasswordContainer(&args, ObjectID, 1); + if ( h->req_client && args.client == ESamsungSeriesCDE ) { + DPRINTF(E_INFO, L_HTTP, "Passwords %s\n", args.password); + h->req_client->password = args.password; + } } else { magic = in_magic_container(ObjectID, args.flags, &id); if (magic)