From 644c8b04f27827759a830738820143105c7e2536 Mon Sep 17 00:00:00 2001 From: dec05eba Date: Fri, 18 Jun 2021 12:56:26 +0200 Subject: 4chan, soundcloud: move selection to autoplay item --- include/Body.hpp | 1 + include/QuickMedia.hpp | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/Body.hpp b/include/Body.hpp index 8fffcb0..841ba5a 100644 --- a/include/Body.hpp +++ b/include/Body.hpp @@ -203,6 +203,7 @@ namespace QuickMedia { // Select next item, ignoring invisible items. Returns true if the item was changed or if the item scrolled. This can be used to check if the bottom was hit when wrap_around is set to false bool select_next_item(bool scroll_page_if_large_item = false, bool ignore_columns = false); void set_selected_item(int item, bool reset_prev_selected_item = true); + void set_selected_item(BodyItem *body_item); void reset_prev_selected_item(); // Returns -1 if item can't be found diff --git a/include/QuickMedia.hpp b/include/QuickMedia.hpp index 70d3637..a1656aa 100644 --- a/include/QuickMedia.hpp +++ b/include/QuickMedia.hpp @@ -116,7 +116,7 @@ namespace QuickMedia { bool page_loop(std::vector &tabs, int start_tab_index = 0, PageLoopSubmitHandler after_submit_handler = nullptr); void video_page_download_video(const std::string &url, bool use_youtube_dl, sf::WindowHandle video_player_window = None); bool video_download_if_non_streamable(std::string &video_url, std::string &audio_url, bool &is_audio_only, bool &has_embedded_audio, PageType previous_page); - void video_content_page(Page *parent_page, VideoPage *video_page, std::string video_title, bool download_if_streaming_fails, BodyItems &next_play_items, int play_index, int *parent_body_page = nullptr, const std::string &parent_page_search = ""); + void video_content_page(Page *parent_page, VideoPage *video_page, std::string video_title, bool download_if_streaming_fails, Body *parent_body, BodyItems &next_play_items, int play_index, int *parent_body_page = nullptr, const std::string &parent_page_search = ""); // Returns -1 to go to previous chapter, 0 to stay on same chapter and 1 to go to next chapter int image_page(MangaImagesPage *images_page, Body *chapters_body); void image_continuous_page(MangaImagesPage *images_page); -- cgit v1.2.3