1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47
#pragma once #include "Constants.h" #include "List.h" #include <stdbool.h> struct EpisodeList { char* name; List* episodes; float rewatchMarker; }; #define EPISODE_INVALID -3 #define EPISODE_SPECIAL -2 #define EPISODE_UNKNOWN -1 #define NOT_REWATCHING -1 struct Episode { float number; char* numberStr; char* path; char* releaseGroup; char* episodeName; bool watched; }; struct _json_value; void EpisodeList_init(struct EpisodeList* this); void EpisodeList_destroyMembers(struct EpisodeList* this); DEFAULT_CREATE_DESTROY_H(EpisodeList) struct EpisodeList* EpisodeList_fetch(const char* baseurl, const char* tvShow); struct EpisodeList* EpisodeList_restore(struct _json_value* json); List* EpisodeList_contstructPlaylist(struct EpisodeList* this); void EpisodeList_play(struct EpisodeList* this, const char* baseUrl, List* playlist); void Episode_init(struct Episode* this); void Episode_destroyMembers(struct Episode* this); DEFAULT_CREATE_DESTROY_H(Episode) /* void Episode_draw(struct Episode* this); */ struct Episode* Episode_restore(struct _json_value* episodeJson); int Episode_compare(void* av, void* bv);