aboutsummaryrefslogtreecommitdiff
path: root/video_player/src
diff options
context:
space:
mode:
authordec05eba <dec05eba@protonmail.com>2022-06-19 00:15:20 +0200
committerdec05eba <dec05eba@protonmail.com>2022-06-19 00:15:20 +0200
commit42891df4c3c184b7123ba44693c489f489de10e3 (patch)
tree121256b497cb6468c8fa2f070baaf240a7af9949 /video_player/src
parentad2685624cf233456623c5fa34083412df53873c (diff)
Youtube: ignore broken itag 22 until youtube fixes it
Diffstat (limited to 'video_player/src')
-rw-r--r--video_player/src/main.cpp10
1 files changed, 5 insertions, 5 deletions
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;
}