aboutsummaryrefslogtreecommitdiff
path: root/plugins/LocalAnime.hpp
diff options
context:
space:
mode:
authordec05eba <dec05eba@protonmail.com>2022-03-02 00:12:30 +0100
committerdec05eba <dec05eba@protonmail.com>2022-03-02 00:12:30 +0100
commit46dc098cab659538b2f229636f49b84ac8af86a1 (patch)
treead5a7617d6b5879bf630f10ef5d8ed58a23f74d3 /plugins/LocalAnime.hpp
parent3ac82fad6bc883d979090e8cd56f3611703d6e14 (diff)
Set anime as finished watching in ui without having to restart
Diffstat (limited to 'plugins/LocalAnime.hpp')
-rw-r--r--plugins/LocalAnime.hpp11
1 files changed, 7 insertions, 4 deletions
diff --git a/plugins/LocalAnime.hpp b/plugins/LocalAnime.hpp
index 19b93e8..111d363 100644
--- a/plugins/LocalAnime.hpp
+++ b/plugins/LocalAnime.hpp
@@ -32,27 +32,30 @@ namespace QuickMedia {
class LocalAnimeSearchPage : public LazyFetchPage {
public:
- LocalAnimeSearchPage(Program *program, std::vector<LocalAnimeItem> anime_items)
- : LazyFetchPage(program), anime_items(std::move(anime_items)) {}
+ LocalAnimeSearchPage(Program *program, std::vector<LocalAnimeItem> anime_items, LocalAnimeSearchPage *parent_search_page = nullptr)
+ : LazyFetchPage(program), parent_search_page(parent_search_page), anime_items(std::move(anime_items)) {}
const char* get_title() const override { return "Search"; }
bool search_is_filter() override { return true; }
PluginResult submit(const SubmitArgs &args, std::vector<Tab> &result_tabs) override;
PluginResult lazy_fetch(BodyItems &result_items) override;
void toggle_read(BodyItem *selected_item) override;
+
+ LocalAnimeSearchPage *parent_search_page;
private:
std::vector<LocalAnimeItem> anime_items;
};
class LocalAnimeVideoPage : public VideoPage {
public:
- LocalAnimeVideoPage(Program *program, std::string filepath, WatchProgress *watch_progress)
- : VideoPage(program, std::move(filepath)), watch_progress(watch_progress) {}
+ LocalAnimeVideoPage(Program *program, LocalAnimeSearchPage *search_page, std::string filepath, WatchProgress *watch_progress)
+ : VideoPage(program, std::move(filepath)), search_page(search_page), watch_progress(watch_progress) {}
const char* get_title() const override { return ""; }
std::string get_video_url(int max_height, bool &has_embedded_audio, std::string &ext) override;
std::string get_url_timestamp() override;
bool is_local() const override { return true; }
void set_watch_progress(int64_t time_pos_sec) override;
private:
+ LocalAnimeSearchPage *search_page;
WatchProgress *watch_progress;
};
} \ No newline at end of file