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

FIleWanted / Unwanted needs to be object[] type, not string[] #23

Open
jokke009 opened this issue Aug 20, 2023 · 1 comment
Open

FIleWanted / Unwanted needs to be object[] type, not string[] #23

jokke009 opened this issue Aug 20, 2023 · 1 comment

Comments

@jokke009
Copy link

TorrentSettings.cs : public string[] Files(Un)Wanted should be object[] as per specification. It is expecting and index (file index as an object). In he beginning I thought a filename was needed.

Did a local test myself and I can confirm this is working. Rest is fine. Thanks for the great C# llbrary.

Regards.

@Arakys7
Copy link

Arakys7 commented Mar 10, 2024

Thanks for this tip. I wasn't able to set the wanted state until I used an object[] instead of a string[].
And the object[] contains the list of file indices, not filenames.

I replaced
public string[] FilesWanted { get { return GetValue<string[]>("files-wanted"); } set { this["files-wanted"] = value; } }
public string[] FilesUnwanted { get { return GetValue<string[]>("files-unwanted"); } set { this["files-unwanted"] = value; } }

with
public object[] FilesWanted { get { return GetValue<object[]>("files-wanted"); } set { this["files-wanted"] = value; } }
public object[] FilesUnwanted { get { return GetValue<object[]>("files-unwanted"); } set { this["files-unwanted"] = value; } }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants