aboutsummaryrefslogtreecommitdiff
path: root/src/plugins/Peertube.cpp
diff options
context:
space:
mode:
authordec05eba <dec05eba@protonmail.com>2021-09-16 13:30:49 +0200
committerdec05eba <dec05eba@protonmail.com>2021-09-16 13:30:49 +0200
commit848ae799803a448d7b66f528fd4e033e2b50ffc3 (patch)
treeda0c476638facfe949580e0b4166611f90f51a54 /src/plugins/Peertube.cpp
parentd798fa75562da1d9ad2b1cc064c062fde6775b72 (diff)
Fix peertube for older servers, add working peertube instances from https://peertube_isolation.frama.io/list/
Diffstat (limited to 'src/plugins/Peertube.cpp')
-rw-r--r--src/plugins/Peertube.cpp21
1 files changed, 20 insertions, 1 deletions
diff --git a/src/plugins/Peertube.cpp b/src/plugins/Peertube.cpp
index dd789d4..3b74871 100644
--- a/src/plugins/Peertube.cpp
+++ b/src/plugins/Peertube.cpp
@@ -29,6 +29,21 @@ namespace QuickMedia {
PluginResult PeertubeInstanceSelectionPage::lazy_fetch(BodyItems &result_items) {
result_items.push_back(create_instance_selection_item("tube.midov.pl", "https://tube.midov.pl"));
result_items.push_back(create_instance_selection_item("videos.lukesmith.xyz", "https://videos.lukesmith.xyz"));
+ result_items.push_back(create_instance_selection_item("peertube.se", "https://peertube.se"));
+ result_items.push_back(create_instance_selection_item("bittube.video", "https://bittube.video"));
+ result_items.push_back(create_instance_selection_item("video.nobodyhasthe.biz", "https://video.nobodyhasthe.biz"));
+ result_items.push_back(create_instance_selection_item("libre.tube", "https://libre.tube"));
+ result_items.push_back(create_instance_selection_item("open.tube", "https://open.tube"));
+ result_items.push_back(create_instance_selection_item("runtube.re", "https://runtube.re"));
+ result_items.push_back(create_instance_selection_item("tube.kenfm.de", "https://tube.kenfm.de"));
+ result_items.push_back(create_instance_selection_item("tcode.kenfm.de", "https://tcode.kenfm.de"));
+ result_items.push_back(create_instance_selection_item("tube.querdenken-711.de", "https://tube.querdenken-711.de"));
+ result_items.push_back(create_instance_selection_item("peertube.rage.lol", "https://peertube.rage.lol"));
+ result_items.push_back(create_instance_selection_item("gegenstimme.tv", "https://gegenstimme.tv"));
+ result_items.push_back(create_instance_selection_item("tv.poa.st", "https://tv.poa.st"));
+ result_items.push_back(create_instance_selection_item("libre.video", "https://libre.video"));
+ result_items.push_back(create_instance_selection_item("gorf.tube", "https://gorf.tube"));
+ result_items.push_back(create_instance_selection_item("neogenesis.tv", "https://neogenesis.tv"));
return PluginResult::OK;
}
@@ -95,6 +110,8 @@ namespace QuickMedia {
body_item->url = short_uuid_json.asString();
else if(name_json.isString() && host_json.isString())
body_item->url = name_str + "@" + host_json.asString();
+ else if(uuid_json.isString())
+ body_item->url = uuid_json.asString();
else
return nullptr;
}
@@ -221,8 +238,10 @@ namespace QuickMedia {
DownloadResult result = page->download_json(json_root, url, {}, true, &err_msg);
if(result != DownloadResult::OK) return download_result_to_plugin_result(result);
+ // Return OK because some versions of peertube doesn't support video-playlists api (or is it not enabled for the instance?) and in such cases it returns
+ // an empty string
if(!json_root.isObject())
- return PluginResult::ERR;
+ return PluginResult::OK;
std::string err_str;
if(handle_error(json_root, err_str)) {