diff options
Diffstat (limited to 'src/video.hpp')
-rw-r--r-- | src/video.hpp | 61 |
1 files changed, 0 insertions, 61 deletions
diff --git a/src/video.hpp b/src/video.hpp deleted file mode 100644 index fd57d0b..0000000 --- a/src/video.hpp +++ /dev/null @@ -1,61 +0,0 @@ -#ifndef VIDEO_H -#define VIDEO_H -#include <string> -#include <optional> -#include <vector> -#include <nlohmann/json.hpp> - -namespace Video { - - struct format { - - std::string format; - std::string url; - std::string vcodec; - std::string acodec; - std::string ext; - std::optional<float> quality; - std::optional<std::string> resolution; - std::optional<int> height; - std::optional<int> width; - }; - - struct thumbnail { - - std::string url; - int preference; - std::string id; - std::optional<std::string> resolution; - std::optional<int> height; - std::optional<int> width; - }; - - struct video { - - std::string id; - std::string title; - std::string url; - std::string channelId; - std::string channelUrl; - std::vector<format> formats; - std::vector<thumbnail> thumbnails; - std::optional<std::string> uploader; - std::optional<std::string> uploaderId; - std::optional<std::string> uploaderUrl; - std::optional<int> duration; - std::optional<int> viewcount; - std::optional<std::string> description; - }; - - void to_json(nlohmann::json& j, const format& f); - void to_json(nlohmann::json& j, const std::vector<format>& v); - void to_json(nlohmann::json& j, const thumbnail& t); - void to_json(nlohmann::json& j, const std::vector<thumbnail>& v); - void to_json(nlohmann::json& j, const video& v); - void from_json(const nlohmann::json& j, format& f); - void from_json(const nlohmann::json& j, std::vector<format>& v); - void from_json(const nlohmann::json& j, thumbnail& t); - void from_json(const nlohmann::json& j, std::vector<thumbnail>& v); - void from_json(const nlohmann::json& j, video& v); -}; -#endif \ No newline at end of file |