Skip to content

Conversation

@bwildenhain
Copy link
Contributor

Currently trying to use default player xdg-open when it's not installed
will only cause messages on the console, which might not be visible to
the user. This PR creates an alert box in this case.

Fixes #1003.

@auouymous
Copy link
Member

Thank you for working on this.

It might be better to pass self to gui_open via an optional gui? parameter, and open the dialog there. For osx and linux it could check for open or xdg-open, perhaps by storing the open or xdg-open in a variable and set it to None for windows. If the command is found or the command is None (windows), it could use gui.show_message_details() and display the exception in the details box to handle other errors. That way it works for all platforms, handles errors besides command not found, and works for the other gui_open call in on_open_download_folder.

However, the other call isn't trying to play a file, and would need a different error message. Unless gui_open doesn't check if the program exists and simply calls show_message_details.

@bwildenhain bwildenhain force-pushed the 1003-check-for-xdg-open branch from 67d1764 to cb159d2 Compare January 7, 2022 17:53
Currently trying to use default player (xdg-)open when it's not installed
will only cause messages on the console, which might not be visible to
the user. This PR creates an alert box in this case.

Fixes gpodder#1003.
@bwildenhain bwildenhain force-pushed the 1003-check-for-xdg-open branch from cb159d2 to 34098c1 Compare January 16, 2022 17:25
@auouymous auouymous merged commit ee769c9 into gpodder:master Jan 17, 2022
@auouymous
Copy link
Member

Thank you for fixing this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Check for xdg-open or player command before running it.

2 participants