aboutsummaryrefslogtreecommitdiff
path: root/src/plugins
diff options
context:
space:
mode:
authordec05eba <dec05eba@protonmail.com>2024-02-18 17:04:22 +0100
committerdec05eba <dec05eba@protonmail.com>2024-02-18 17:04:22 +0100
commitacc41524f17267448738644edd88b1664056bb34 (patch)
treee0e15e5580a4fb6cd07eee94d379b77ea488a1b4 /src/plugins
parent02bc291a920dac5bd75f322045e0722d54f45b9b (diff)
Dramacool: fix search thumbnails, fix video playback (fallback to other sources if fail)
Diffstat (limited to 'src/plugins')
-rw-r--r--src/plugins/DramaCool.cpp46
1 files changed, 23 insertions, 23 deletions
diff --git a/src/plugins/DramaCool.cpp b/src/plugins/DramaCool.cpp
index f259f9e..de5357a 100644
--- a/src/plugins/DramaCool.cpp
+++ b/src/plugins/DramaCool.cpp
@@ -42,7 +42,7 @@ namespace QuickMedia {
body_item->set_description_color(get_theme().faded_text_color);
}
if(cover_url_json.isString()) {
- body_item->thumbnail_url = "https://imagecdn.me/" + url_param_encode(cover_url_json.asString());
+ body_item->thumbnail_url = "https://asianimg.pro/" + url_param_encode(cover_url_json.asString());
body_item->thumbnail_size = { 150, 225 };
}
body_item->url = "https://dramacool.cr" + url_json.asString();
@@ -455,40 +455,40 @@ namespace QuickMedia {
if(!video_sources.streamtape.empty() && video_url.empty()) {
result = download_to_string(video_sources.streamtape, website_data, {}, true);
- if(result != DownloadResult::OK) return download_result_to_plugin_result(result);
- streamtape_extract_video_url(website_data, video_url);
-
- if(!video_url.empty())
- referer = "https://streamtape.com";
+ if(result == DownloadResult::OK) {
+ streamtape_extract_video_url(website_data, video_url);
+ if(!video_url.empty())
+ referer = "https://streamtape.com";
+ }
}
if(!video_sources.mixdrop.empty() && video_url.empty()) {
result = download_to_string(video_sources.mixdrop, website_data, {}, true);
- if(result != DownloadResult::OK) return download_result_to_plugin_result(result);
- mixdrop_extract_video_url(website_data, video_url);
-
- if(!video_url.empty())
- referer = "https://mixdrop.co";
+ if(result == DownloadResult::OK) {
+ mixdrop_extract_video_url(website_data, video_url);
+ if(!video_url.empty())
+ referer = "https://mixdrop.co";
+ }
}
if(!video_sources.mp4upload.empty() && video_url.empty()) {
result = download_to_string(video_sources.mp4upload, website_data, {}, true);
- if(result != DownloadResult::OK) return download_result_to_plugin_result(result);
- // mp4upload uses the same algorithm as mixdrop but with a different format.
- // |mixdrop_extract_video_url| handles both formats.
- mixdrop_extract_video_url(website_data, video_url);
-
- if(!video_url.empty())
- referer = "https://www.mp4upload.com";
+ if(result == DownloadResult::OK) {
+ // mp4upload uses the same algorithm as mixdrop but with a different format.
+ // |mixdrop_extract_video_url| handles both formats.
+ mixdrop_extract_video_url(website_data, video_url);
+ if(!video_url.empty())
+ referer = "https://www.mp4upload.com";
+ }
}
if(!video_sources.doodstream.empty() && video_url.empty()) {
result = download_to_string(video_sources.doodstream, website_data, {}, true);
- if(result != DownloadResult::OK) return download_result_to_plugin_result(result);
- doodstream_extract_video_url(website_data, video_url, video_sources.doodstream);
-
- if(!video_url.empty())
- referer = "https://dood.wf";
+ if(result == DownloadResult::OK) {
+ doodstream_extract_video_url(website_data, video_url, video_sources.doodstream);
+ if(!video_url.empty())
+ referer = "https://dood.wf";
+ }
}
if(video_url.empty())