-
-
Notifications
You must be signed in to change notification settings - Fork 388
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
feat: Warn user if FFmpeg is not installed #441
Conversation
Creates a Warning dialog on startup if the program cannot find FFmpeg or FFprobe in the PATH. Other interactions with the program are blocked until the issue is either ignore or resolved.
Per QT docs, handling custom iconPixmap requires multiple icons per platform. Easier to just use universal, default warning icon (yellow triangle)
5f77fe2
to
e7ad1ee
Compare
e7ad1ee
to
9f11182
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approved once comments are resolved.
Nice change!
def installed(self): | ||
"""Checks if both FFmpeg and FFprobe are installed and in the PATH.""" | ||
# Same checker that ffmpeg-python uses | ||
if which("ffmpeg"): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I dont like this implementation of which, it could just have been a method in your class, but since it ships with ffmpegs install it is fine to use. But, it uses os.name
for platform checking, and I have seen many discussion about this usage and how it is better to use platform.system()
to get the current platform name.
It also uses os.path instead of pathlib
I would like @CyanVoxel to comment on this. I can write the method if that is wanted as a new PR after this is merged. there is currently nothing wrong about this usage.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could shutil.which()
be used here instead?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I did not know the Python stdlib had a built in which command, using that instead.
It may better to hold off until #460 is merged and update the url to point to the new docs site |
By the way as soon as #460 is merged, CyanVoxel plans to use the domain "tagstud.io" that they have already bought, so the url will actually be something like docs.tagstud.io but it will still be github pages under the hood. |
@seakrueger With #460 having been merged, the docs can be updated here 👍 |
The url now points to "https://docs.tagstud.io/help/ffmpeg/". Though it seems the new doc page will need to be cherry-picked to main for the url to work |
The |
The actual docs page has now been spun off into its own PR (#473). The guide does not actually need to be part of this PR, and that solves the renamed dir and need to be on a different branch problems. |
Confirmed that the help buttons works pointing towards https://docs.tagstud.io/help/ffmpeg/ |
Maybe just me but on Macos it says it can't find ffmpeg but the ffmpeg command works fine along with which or where ffmpeg |
Creates a Warning dialog on startup if the program cannot find FFmpeg orFFprobe in the PATH. Other interactions with the program are blocked until the issue is either ignored or resolved.
Uses native OS dialog, so should match Mac and Windows design paradigms on their respective systems (testers required to confirm)
