aboutsummaryrefslogtreecommitdiff
path: root/src/plugins
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins')
-rw-r--r--src/plugins/MediaGeneric.cpp2
-rw-r--r--src/plugins/Youtube.cpp38
2 files changed, 10 insertions, 30 deletions
diff --git a/src/plugins/MediaGeneric.cpp b/src/plugins/MediaGeneric.cpp
index cc869ef..b2d2538 100644
--- a/src/plugins/MediaGeneric.cpp
+++ b/src/plugins/MediaGeneric.cpp
@@ -220,7 +220,7 @@ namespace QuickMedia {
// TODO: Use max_height, if possible
(void)max_height;
has_embedded_audio = true;
- ext = "m3u8";
+ ext = ".m3u8";
return video_url;
}
diff --git a/src/plugins/Youtube.cpp b/src/plugins/Youtube.cpp
index 9b64054..33e4cea 100644
--- a/src/plugins/Youtube.cpp
+++ b/src/plugins/Youtube.cpp
@@ -1568,18 +1568,6 @@ namespace QuickMedia {
return fetch_comments(this, video_url, continuation_token, result_items);
}
- static const char* youtube_channel_page_type_to_api_params(YoutubeChannelPage::Type type) {
- switch(type) {
- case YoutubeChannelPage::Type::VIDEOS:
- return "EgZ2aWRlb3PyBgQKAjoA";
- case YoutubeChannelPage::Type::SHORTS:
- return "EgZzaG9ydHPyBgUKA5oBAA%3D%3D";
- case YoutubeChannelPage::Type::LIVE:
- return "EgdzdHJlYW1z8gYECgJ6AA%3D%3D";
- }
- return "";
- }
-
static const char* youtube_channel_page_type_get_endpoint(YoutubeChannelPage::Type type) {
switch(type) {
case YoutubeChannelPage::Type::VIDEOS:
@@ -2359,7 +2347,15 @@ namespace QuickMedia {
return nullptr;
}
+ std::string YoutubeVideoPage::get_download_url(int max_height) {
+ return url;
+ }
+
std::string YoutubeVideoPage::get_video_url(int max_height, bool &has_embedded_audio, std::string &ext) {
+ has_embedded_audio = true;
+ ext = ".mp4";
+ return url;
+#if 0
if(!livestream_url.empty()) {
has_embedded_audio = true;
return livestream_url;
@@ -2392,23 +2388,7 @@ namespace QuickMedia {
ext = ".webm";
return chosen_video_format->base.url;
- }
-
- std::string YoutubeVideoPage::get_audio_url(std::string &ext) {
- if(audio_formats.empty())
- return "";
-
- const YoutubeAudioFormat *chosen_audio_format = &audio_formats.front();
- fprintf(stderr, "Choosing youtube audio format: bitrate: %d, mime type: %s\n", chosen_audio_format->base.bitrate, chosen_audio_format->base.mime_type.c_str());
-
- if(chosen_audio_format->base.mime_type.find("mp4") != std::string::npos)
- ext = ".m4a";
- else if(chosen_audio_format->base.mime_type.find("webm") != std::string::npos)
- ext = ".opus"; // TODO: Detect if vorbis (.ogg) or opus (.opus)
- else if(chosen_audio_format->base.mime_type.find("opus") != std::string::npos)
- ext = ".opus";
-
- return chosen_audio_format->base.url;
+#endif
}
// Returns -1 if timestamp is in an invalid format