From 42891df4c3c184b7123ba44693c489f489de10e3 Mon Sep 17 00:00:00 2001 From: dec05eba Date: Sun, 19 Jun 2022 00:15:20 +0200 Subject: Youtube: ignore broken itag 22 until youtube fixes it --- video_player/src/main.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'video_player/src') diff --git a/video_player/src/main.cpp b/video_player/src/main.cpp index 2c6dba4..c80cf9a 100644 --- a/video_player/src/main.cpp +++ b/video_player/src/main.cpp @@ -43,7 +43,7 @@ static Json::Value handle_json_command_time_pos(mpv_handle *mpv_ctx) { Json::Value response_json(Json::objectValue); if(res < 0) { response_json["status"] = "error"; - response_json["message"] = mpv_error_string(res); + response_json["message"] = std::string("time-pos: ") + mpv_error_string(res); } else { response_json["status"] = "success"; response_json["data"] = time_pos; @@ -58,7 +58,7 @@ static Json::Value handle_json_command_duration(mpv_handle *mpv_ctx) { Json::Value response_json(Json::objectValue); if(res < 0) { response_json["status"] = "error"; - response_json["message"] = mpv_error_string(res); + response_json["message"] = std::string("duration: ") + mpv_error_string(res); } else { response_json["status"] = "success"; response_json["data"] = duration; @@ -114,7 +114,7 @@ static Json::Value handle_json_command_sub_add(mpv_handle *mpv_ctx, const Json:: const int res = mpv_command_async(mpv_ctx, 0, args.data()); if(res < 0) { response_json["status"] = "error"; - response_json["message"] = mpv_error_string(res); + response_json["message"] = std::string("sub-add: ") + mpv_error_string(res); } else { response_json["status"] = "success"; } @@ -128,7 +128,7 @@ static Json::Value handle_json_command_cycle_fullscreen(mpv_handle *mpv_ctx) { Json::Value response_json(Json::objectValue); if(res < 0) { response_json["status"] = "error"; - response_json["message"] = mpv_error_string(res); + response_json["message"] = std::string("cycle fullscreen: ") + mpv_error_string(res); } else { response_json["status"] = "success"; } @@ -644,7 +644,7 @@ int main(int argc, char **argv) { break; } else if(event->event_id == MPV_EVENT_END_FILE) { mpv_event_end_file *end_file_event = (mpv_event_end_file*)event->data; - if(end_file_event->error == MPV_END_FILE_REASON_ERROR) { + if(end_file_event->reason == MPV_END_FILE_REASON_ERROR) { exit_code = 2; break; } -- cgit v1.2.3