From acc41524f17267448738644edd88b1664056bb34 Mon Sep 17 00:00:00 2001 From: dec05eba Date: Sun, 18 Feb 2024 17:04:22 +0100 Subject: Dramacool: fix search thumbnails, fix video playback (fallback to other sources if fail) --- src/plugins/DramaCool.cpp | 46 +++++++++++++++++++++++----------------------- 1 file changed, 23 insertions(+), 23 deletions(-) (limited to 'src/plugins') 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()) -- cgit v1.2.3