Skip to content

Feature/existing data validation #51

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

Open
wants to merge 8 commits into
base: master
Choose a base branch
from

Conversation

djon2003
Copy link

Add possiblity to validate existing files contained in the torrent file

@djon2003
Copy link
Author

djon2003 commented Dec 15, 2020

I will publish a new version this week. There was a little bug and I add support for partial validation.

@Krusen
Copy link
Owner

Krusen commented Jan 23, 2021

Sorry for taking so long to get back to you. I've been looking a bit deeper into this and I don't feel it's a right fit for this library at this point, but I'll leave it open for now if anyone else should show their support for something like this.

For now one could just use the code you created and add an extension method to use it, like this:

public static async virtual Task<bool> ValidateExistingDataAsync(this Torrent torrent, string path, 
	ValidationOptions options = null)
{
    var validator = new Validator(torrent, options);
    return await validator.ValidateExistingDataAsync(path);
}

@djon2003
Copy link
Author

djon2003 commented Jan 24, 2021 via email

@Krusen Krusen force-pushed the master branch 4 times, most recently from cfe29e1 to 33a31cb Compare January 25, 2021 20:05
@Krusen
Copy link
Owner

Krusen commented Jan 30, 2021

I'm a bit nitpicky regarding my library and code in general. The focus of this library was always meant to be encoding/decoding bencode. Torrent-handling was added on later as a quick convenience, but never meant to be the main focus.

As I said it's still possible to simply use your code as an extension method or similar. Also feel free to fork this repo and use the code directly in your project.

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

Successfully merging this pull request may close these issues.

2 participants