byroot/ruby-osdb

Option to only try to find by hash

muitocomplicado opened this issue · 4 comments

Since the hash is the most trustworthy option as no two files can be the same, an option to only download if there's a match for the hash would be nice. This way you can use it on automated scripts that don't get user input to select from a list of possible matches.

You're right. Anyway getsub started as a simple demo script and now become too bloated.

I have to refactor it in an OO way and split the application logic and CLI.

runa commented

I'm +1 for this. Are you working on it or should I try to do it?
I need a non-interactive version of getsub (to find subs as soon as rtorrent finish the download).

Yeah sorry with Christmas etc I didn't had the time nor the motivation to do it.

But I'll do it tomorrow.

Le 2013-01-05 à 14:49, martin sarsale notifications@github.com a écrit :

I'm +1 for this. Are you working on it or should I try to do it?
I need a non-interactive version of getsub (to find subs as soon as rtorrent finish the download).


Reply to this email directly or view it on GitHub.

Here we are: https://github.com/byroot/ruby-osdb/tree/refactor-getsub

Getsub is now modular, so you can chose which search strategies you want to enable/disable, and you can also disable the interactive prompt with the -a flag.

Note that for now this flag will simply resolve hash conflicts by picking the first result.
But the interface can totally support a string comparaison, like a levenstein distance for instance.

It would be great if you could test it before I'll release it as 0.1.0 in the next few days.