#pragma once #include "app_context.h" #include #include #ifdef __cplusplus extern "C" { #endif // Path helpers void make_sd_path(char* out, size_t out_len, const char* slug); void ensure_dir(void); bool has_slug(const char* slug); // LRU cache cleanup void lru_check(void); // Sorting void sort_seasons(void); void sort_eps(void); // Time formatting void fmt_time(char* o, int s); // Per-episode resume helpers int find_saved_pos_idx(const char* slug); int get_saved_pos_for_slug(const char* slug); void set_saved_pos_for_slug(const char* slug, int pos); void save_current_ep_pos(void); // Persistence void save_state(void); void load_state(void); // Seasons / episodes cache (PB data, rarely changes) bool save_cache(void); bool load_cache(void); #ifdef __cplusplus } #endif