#pragma once #include "app_context.h" #include #include #ifdef __cplusplus extern "C" { #endif uint16_t my_htons(uint16_t v); bool resolve_host(const char* host, uint32_t* out_ip); void normalize_audio_url(const char* in, char* out, size_t out_len); // Robust HTTP GET with PSRAM buffer, returns length and allocates *out_body (must be free'd via free/heap_caps_free) int http_get_raw(const char* url, char** out_body); // Fetch seasons and episodes from PB – returns true if network fetch succeeded with real data bool fetch_data(void); #ifdef __cplusplus } #endif