Skip to content

Commit

Permalink
Merge pull request #19 from reboost/master
Browse files Browse the repository at this point in the history
Password fixes for SamsungTV - fixes #15
  • Loading branch information
NathanaelA authored Feb 6, 2021
2 parents 006d4e6 + f6e43a4 commit edeff0a
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions upnpsoap.c
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -1361,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++);

Expand Down Expand Up @@ -1532,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)
Expand Down

0 comments on commit edeff0a

Please sign in to comment.