tv_rename/functions.hpp

46 lines
1.3 KiB
C++

#ifndef GETPAGE_H
#define GETPAGE_H
#include <string>
#include <set>
#include <map>
#include "network.hpp"
#ifdef GUI
#include <vector>
#endif
#ifndef GUI
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 printHelp();
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);
void parseSeasonNumbers(std::set<int> &seasons_num, const char *argument);
void printLangs();
bool findLanguage( const char *language );
std::string encodeUrl( const std::string &url );
#else
std::vector<std::pair<std::string, std::string>> getPossibleShows( std::string show, const std::string &language, Curl &c );
std::string userHome();
#endif
void iterateFS(std::map<int, std::set<std::string>> &seasons, const std::string &path);
bool searchSpecificSeason(const char *const p, size_t &ep_pos, const std::string &number);
std::string compilePattern(const std::string &pattern, int season, int episode, const std::string &filename, const std::string &episodeName, const std::string &showName);
#endif