aboutsummaryrefslogtreecommitdiff
path: root/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 /src
parentad2685624cf233456623c5fa34083412df53873c (diff)
Youtube: ignore broken itag 22 until youtube fixes it
Diffstat (limited to 'src')
-rw-r--r--src/QuickMedia.cpp2
-rw-r--r--src/plugins/Fourchan.cpp1
-rw-r--r--src/plugins/Youtube.cpp3
3 files changed, 6 insertions, 0 deletions
diff --git a/src/QuickMedia.cpp b/src/QuickMedia.cpp
index 3789cc1..dad215f 100644
--- a/src/QuickMedia.cpp
+++ b/src/QuickMedia.cpp
@@ -3691,6 +3691,8 @@ namespace QuickMedia {
double file_duration = 0.0;
video_player->get_duration_in_file(&file_duration);
video_duration = std::max(video_duration, file_duration);
+ if(video_duration > 0.001)
+ successfully_fetched_video_duration = true;
}
}
diff --git a/src/plugins/Fourchan.cpp b/src/plugins/Fourchan.cpp
index c11e13e..051acc3 100644
--- a/src/plugins/Fourchan.cpp
+++ b/src/plugins/Fourchan.cpp
@@ -442,6 +442,7 @@ namespace QuickMedia {
author_str = author.asString();
author_str += " #" + std::to_string(post_num.asInt64());
+ html_unescape_sequences(author_str);
std::string comment_text = html_to_text(sub_begin, sub_end - sub_begin, comment_by_postno, result_items, body_item_index);
if(!comment_text.empty())
diff --git a/src/plugins/Youtube.cpp b/src/plugins/Youtube.cpp
index 7722f5d..1b46ed6 100644
--- a/src/plugins/Youtube.cpp
+++ b/src/plugins/Youtube.cpp
@@ -2614,6 +2614,9 @@ R"END(
YoutubeFormat youtube_format_base;
+ const Json::Value &itag_json = format["itag"];
+ if(!itag_json.isInt() || itag_json.asInt() == 22) continue; // TODO: itag 22 video format is broken right now server-side for some reason
+
const Json::Value &mime_type_json = format["mimeType"];
if(!mime_type_json.isString()) continue;
youtube_format_base.mime_type = mime_type_json.asString();