Closed wolfgangkarall closed 9 years ago
That happens because --type
match types starting with the given string. Changing that behavior to an exact match would fix it, but I'm not sure if it's the best approach. Perhaps adding an --exact
or --type-exact
option? Any ideas?
Yeah, doesn't have to be exact matching all the time. A --type-exact flag switch would be better I guess.
Yeah, looking at the source and at gamedata.json
I realized it's a bit more tricky than I imagined. Current matching is not starting with but containing, which is far less strict. And the game data expect that in its download
fields. Otherwise, a small change in how Humble Bundle labels their download buttons (say, from Download .deb
to DEB version
would break things.
Oh the other hand, an extra argument (say --type-exact
) would make an already quite complex algorithm even move messy, not to mention it seems (well, it is) a lazy UI.
A 3rd option would be to successively try more restrictive rules (containing, starting with, is) if (and only if) the user specified a --type
and there are too many candidates after exhausting all other rules.
While this may be the best option (user and compatibility wise), it is also quite complex and hard to implement, so I'm still open to suggestions .
3rd option done :) Wasn't as hard as I thought...
Great! :+1:
I can't choose to download 'PDF' if there's also 'PDF (HD)':