aboutsummaryrefslogtreecommitdiff
path: root/src/QuickMedia.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/QuickMedia.cpp')
-rw-r--r--src/QuickMedia.cpp13
1 files changed, 11 insertions, 2 deletions
diff --git a/src/QuickMedia.cpp b/src/QuickMedia.cpp
index fad2b94..053c97f 100644
--- a/src/QuickMedia.cpp
+++ b/src/QuickMedia.cpp
@@ -685,6 +685,11 @@ namespace QuickMedia {
window.setTitle("QuickMedia - " + std::string(plugin_name));
no_video = force_no_video;
+ if(strcmp(plugin_name, "youtube-audio") == 0) {
+ plugin_name = "youtube";
+ no_video = true;
+ }
+
std::string plugin_logo_path;
const char *plugin_logo_name = get_plugin_logo_name(plugin_name);
if(plugin_logo_name)
@@ -710,6 +715,7 @@ namespace QuickMedia {
pipe_body->items.push_back(create_launcher_body_item("Soundcloud", "soundcloud", resources_root + "icons/soundcloud_launcher.png"));
pipe_body->items.push_back(create_launcher_body_item("Spotify", "spotify", resources_root + "icons/spotify_launcher.png"));
pipe_body->items.push_back(create_launcher_body_item("YouTube", "youtube", resources_root + "icons/yt_launcher.png"));
+ pipe_body->items.push_back(create_launcher_body_item("YouTube (audio only)", "youtube-audio", resources_root + "icons/yt_launcher.png"));
tabs.push_back(Tab{std::move(pipe_body), std::make_unique<PipePage>(this, "Select plugin to launch"), create_search_bar("Search...", SEARCH_DELAY_FILTER)});
} else if(strcmp(plugin_name, "manganelo") == 0) {
auto search_body = create_body();
@@ -787,7 +793,7 @@ namespace QuickMedia {
tabs.push_back(Tab{std::move(search_body), std::make_unique<SpankbangSearchPage>(this), create_search_bar("Search...", 500)});
} else if(strcmp(plugin_name, "spotify") == 0) {
auto search_body = create_body();
- tabs.push_back(Tab{std::move(search_body), std::make_unique<SpotifyPodcastSearchPage>(this), create_search_bar("Search...", 250)});
+ tabs.push_back(Tab{std::move(search_body), std::make_unique<SpotifyPodcastSearchPage>(this), create_search_bar("Search...", 350)});
no_video = true;
} else if(strcmp(plugin_name, "soundcloud") == 0) {
auto search_body = create_body();
@@ -1482,6 +1488,9 @@ namespace QuickMedia {
update_idle_state();
handle_window_close();
+ if(!loop_running || !window.isOpen())
+ break;
+
if(redraw) {
redraw = false;
if(tabs[selected_tab].search_bar) tabs[selected_tab].search_bar->onWindowResize(window_size);
@@ -1985,7 +1994,7 @@ namespace QuickMedia {
}
}
- fprintf(stderr, "event name: %s\n", event_name);
+ //fprintf(stderr, "event name: %s\n", event_name);
};
load_video_error_check(false);