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

Eliminate naming voodoo #7

Closed
Vodolazz opened this issue Sep 7, 2017 · 2 comments
Closed

Eliminate naming voodoo #7

Vodolazz opened this issue Sep 7, 2017 · 2 comments
Assignees
Labels

Comments

@Vodolazz
Copy link

Vodolazz commented Sep 7, 2017

.First(x => x.Name.Contains("FFmpeg"))

Hi, it's me again. Suggest the following change:

.First(x => x.Name.Contains("ffprobe"))
.FullName;
.First(x => x.Name.Contains("FFmpeg"))
.FullName;

to:
private const string _MPEG_FILE_NAME = "ffmpeg";
private const string _PROBE_FILE_NAME = "ffprobe";

.First(x => x.Name.ToLower().Contains(_PROBE_FILE_NAME))
.FullName;
.First(x => x.Name.ToLower().Contains(_MPEG_FILE_NAME))
.FullName;

Suggest this change for both calls.
I'm having both exe files in lower case and current solution gave me exception :(

btw. also it'll be good idea to wrap all this in try-catch block, because now if linq fails to find file with needed name in the user-provided dir it throws linq exception which is rather misleading in its place.

@tomaszzmuda
Copy link
Owner

Hello,
i'm glad someone use this library :)
I'm going to fix it today in 2.0.2 hotfix.

Thank you for report bugs.
If you have more suggestions or something tell me, please.

@tomaszzmuda tomaszzmuda self-assigned this Sep 7, 2017
@tomaszzmuda tomaszzmuda added the bug label Sep 7, 2017
@tomaszzmuda
Copy link
Owner

I have done it.
Now name of executables are case insensitive and you can override default names in static fields in FFbase.
I've added more clear message if FFmpeg executables wasn't found.

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

No branches or pull requests

2 participants