diff options
Diffstat (limited to 'plugins/LocalAnime.hpp')
-rw-r--r-- | plugins/LocalAnime.hpp | 15 |
1 files changed, 4 insertions, 11 deletions
diff --git a/plugins/LocalAnime.hpp b/plugins/LocalAnime.hpp index 4c3efaa..7fe58d9 100644 --- a/plugins/LocalAnime.hpp +++ b/plugins/LocalAnime.hpp @@ -1,18 +1,11 @@ #pragma once #include "Page.hpp" +#include "WatchProgress.hpp" #include <vector> #include <variant> namespace QuickMedia { - struct LocalAnimeWatchProgress { - double time = 0.0; - double duration = 0.0; - - double get_watch_ratio() const; - bool has_finished_watching() const; - }; - struct LocalAnime; struct LocalAnimeSeason; struct LocalAnimeEpisode; @@ -59,14 +52,14 @@ namespace QuickMedia { class LocalAnimeVideoPage : public VideoPage { public: - LocalAnimeVideoPage(Program *program, std::string filepath, LocalAnimeWatchProgress watch_progress) + LocalAnimeVideoPage(Program *program, std::string filepath, WatchProgress watch_progress) : VideoPage(program, std::move(filepath)), watch_progress(std::move(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(double time_pos_sec) override; + void set_watch_progress(int64_t time_pos_sec) override; private: - LocalAnimeWatchProgress watch_progress; + WatchProgress watch_progress; }; }
\ No newline at end of file |