Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Password fixes for SamsungTV - fixes #15 #19

Merged
merged 2 commits into from
Feb 6, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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