sim0n00ps / OF-DL

C# console app to download all of the media from Onlyfans accounts with DRM video downloading support
753 stars 65 forks source link

Auto-detect ffmpeg path with additional configuration in config.json #284

Closed whimsical-c4lic0 closed 7 months ago

whimsical-c4lic0 commented 7 months ago

This PR moves the FFmpeg path config from auth.json to config.json. This should be done since the FFmpeg path is unrelated to auth, and it is the only non-auth related config in auth.json. For backwards compatibility, the program will still allow the FFmpeg path to be set in auth.json to prevent breaking config changes.

This PR will also auto-detect the FFmpeg path (from the current directory and from the PATH environment variable) when the FFmpeg path is not set in either config.json or auth.json. This will mean for the majority of users that they can leave the FFmpegPath set to "". If ffmpeg.exe exists in the same directory as the executable (like in the video tutorial) or ffmpeg exists in /usr/bin like in many Linux installs, the default auto-detect behavior will detect FFmpeg's path.

Finally, making FFmpeg path optional in auth.json means that auth.json can be created automatically using a browser extension. I created a Chrome and Firefox extension (OF-DL Auth Helper) as a fork of the extension you mentioned in the docs. OF-DL Auth Helper creates the complete OF-DL auth.json file for you that can be copied or saved directly. The generated auth.json file no longer requires manual editing.

vlakoff commented 3 months ago

For consistency, the two other .exe paths, YTDLP_PATH and MP4DECRYPT_PATH, should be moved to config.json as well.

jasmeralia commented 3 months ago

For consistency, the two other .exe paths, YTDLP_PATH and MP4DECRYPT_PATH, should be moved to config.json as well.

Those aren't used in OF-DL anymore. Maybe in OF-DRM, but not OF-DL.

vlakoff commented 3 months ago

You are right. I had these settings as leftovers from previous versions. Refs #235.