tv_rename/functions.hpp

30 lines
915 B
C++

#ifndef GETPAGE_H
#define GETPAGE_H
#include <string>
#include <set>
#include <curl/curl.h>
#include <map>
class Curl {
public:
Curl();
~Curl();
std::string execute( const std::string &url );
private:
CURL *curl_handle;
};
std::string getDefUrl( std::string show, const std::string &language, Curl &c );
void findSeason(std::set<std::string> &files, int season, const std::string &path);
void findSeasons(std::map<int, std::set<std::string>> &seasons, const std::string &path, const std::set<int> &season_numbers);
void iterateFS(std::map<int, std::set<std::string>> &seasons, const std::string &path);
void printHelp();
bool searchSpecificSeason(const char *const p, size_t &ep_pos, const std::string &number);
bool searchSpecificSeason(const char *const p, const std::string &number);
bool searchSeason(const char *const p, size_t &season_pos);
bool searchSeason(const char *const p);
#endif