diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/QuickMedia.cpp | 3 | ||||
-rw-r--r-- | src/VideoPlayer.cpp | 6 |
2 files changed, 6 insertions, 3 deletions
diff --git a/src/QuickMedia.cpp b/src/QuickMedia.cpp index 4b528cf..6935995 100644 --- a/src/QuickMedia.cpp +++ b/src/QuickMedia.cpp @@ -1299,6 +1299,9 @@ namespace QuickMedia { show_notification("Video player", "Failed to connect to mpv ipc after 10 seconds", Urgency::CRITICAL); current_page = previous_page; break; + } else if(update_err == VideoPlayer::Error::EXITED && video_player->exit_status == 0) { + fprintf(stderr, "mpv exited with status 0, the user most likely closed mpv with 'q'\n"); + current_page = previous_page; } else if(update_err != VideoPlayer::Error::OK) { show_notification("Video player", "The video player failed to play the video", Urgency::CRITICAL); current_page = previous_page; diff --git a/src/VideoPlayer.cpp b/src/VideoPlayer.cpp index 8d57f62..e8f8795 100644 --- a/src/VideoPlayer.cpp +++ b/src/VideoPlayer.cpp @@ -26,6 +26,7 @@ namespace QuickMedia { connected_to_ipc(false), connect_tries(0), find_window_tries(0), + exit_status(0), event_callback(_event_callback), window_create_callback(_window_create_callback), window_handle(0), @@ -209,9 +210,8 @@ namespace QuickMedia { } if(video_process_id != -1) { - int status; - if(wait_program_non_blocking(video_process_id, &status)) { - fprintf(stderr, "The video player exited!, status: %d\n", status); + if(wait_program_non_blocking(video_process_id, &exit_status)) { + fprintf(stderr, "The video player exited!, status: %d\n", exit_status); close(ipc_socket); remove(ipc_server_path); video_process_id = -1; |