diff options
author | dec05eba <dec05eba@protonmail.com> | 2021-04-13 09:09:30 +0200 |
---|---|---|
committer | dec05eba <dec05eba@protonmail.com> | 2021-04-14 15:00:12 +0200 |
commit | 4db0876f45533d3b55ee79df2d2bc78b789b5a28 (patch) | |
tree | 41f513c10462ba219c1df0481b221b97f016ea45 /src/QuickMedia.cpp | |
parent | fc632e90d793babc47044ff87ab63a86211e0bd0 (diff) |
Make search fuzzy, fix soundcloud next song when hitting user
Also some other misc changes
Diffstat (limited to 'src/QuickMedia.cpp')
-rw-r--r-- | src/QuickMedia.cpp | 13 |
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); |