text/plain
•
938 B
•
32 lines
#pragma once
#include <stdbool.h>
#define PODCAST_MAX_FEEDS 32
#define PODCAST_MAX_EPISODES 64
typedef struct {
char title[128];
char url[256];
} podcast_feed_t;
typedef struct {
char title[128];
char guid[128];
char enclosure_url[256];
} podcast_episode_t;
// Parse OPML file, extract RSS feed entries
// Returns number of feeds found, or -1 on error
int podcast_parse_opml(const char* path, podcast_feed_t* feeds, int max_feeds);
// Parse RSS feed file, extract episodes with audio enclosures
// Returns number of episodes found, or -1 on error
int podcast_parse_rss(const char* path,
podcast_episode_t* episodes,
int max_episodes);
// Extract raw <item> XML block at given index from RSS file
// Writes to out_path. Returns true on success.
bool podcast_extract_item(const char* rss_path,
int item_index,
const char* out_path);