2019-01-19 12:40:10 +00:00
|
|
|
#ifndef TV_RENAME_HPP
|
|
|
|
#define TV_RENAME_HPP
|
|
|
|
|
2020-01-15 21:20:44 +00:00
|
|
|
#include <map>
|
2019-01-19 12:40:10 +00:00
|
|
|
#include <set>
|
2019-01-23 19:46:03 +00:00
|
|
|
#include <vector>
|
2019-02-04 16:39:48 +00:00
|
|
|
|
|
|
|
#include "network.hpp"
|
|
|
|
|
2020-01-15 21:20:44 +00:00
|
|
|
// TV flags
|
|
|
|
#define TV_CHDIR 0x0100
|
|
|
|
#define TV_TRUST 0x0200
|
|
|
|
#define TV_LINUX 0x0400
|
|
|
|
#define TV_DVD 0x0800
|
|
|
|
|
2019-02-04 16:39:48 +00:00
|
|
|
#ifdef _WIN32
|
|
|
|
|
|
|
|
using string = std::wstring;
|
|
|
|
using char_t = wchar_t;
|
|
|
|
|
|
|
|
#else
|
|
|
|
|
|
|
|
using string = std::string;
|
|
|
|
using char_t = char;
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|
2020-01-15 09:00:25 +00:00
|
|
|
void singleSeason( const string &path, string &show, int season, string id,
|
2019-07-12 21:10:40 +00:00
|
|
|
const string &language, const string &pattern,
|
2020-01-15 09:00:25 +00:00
|
|
|
const bool &linux, const bool &trust,
|
2020-01-15 21:20:44 +00:00
|
|
|
std::map< int, string > *files_ptr = nullptr,
|
2020-01-15 09:00:25 +00:00
|
|
|
bool print = true, bool dvd = false );
|
2019-07-12 21:10:40 +00:00
|
|
|
|
2020-01-15 21:20:44 +00:00
|
|
|
void singleSeason( const string &path, string &show, int season, string id,
|
|
|
|
const string &language, const string &pattern,
|
|
|
|
const size_t &flags, std::map< int, string > *files_ptr = nullptr,
|
|
|
|
bool print = true );
|
|
|
|
|
2019-02-04 16:39:48 +00:00
|
|
|
#ifdef GUI
|
2019-01-23 19:46:03 +00:00
|
|
|
|
2020-01-16 10:12:22 +00:00
|
|
|
std::vector< std::pair< std::pair< int, string >, std::pair< string, string > > >
|
|
|
|
getRenamedFiles( const string &show, int season, const string id,
|
2019-02-04 16:39:48 +00:00
|
|
|
const string &language, const string &pattern,
|
2020-01-16 10:12:22 +00:00
|
|
|
const bool &linux, const std::map< int, string > &files, bool dvd = false );
|
|
|
|
|
|
|
|
std::vector< std::pair< string, string > > getLangs();
|
2019-01-23 19:46:03 +00:00
|
|
|
|
|
|
|
#else
|
|
|
|
|
2019-02-04 16:39:48 +00:00
|
|
|
void multipleSeasons( const string &path, string &show,
|
|
|
|
const std::set< int > seasons, const string &language,
|
2020-01-15 21:20:44 +00:00
|
|
|
const string &pattern, const size_t &flags );
|
2020-01-16 10:12:22 +00:00
|
|
|
|
2019-02-04 16:39:48 +00:00
|
|
|
void allSeasons( const string &path, string &show, const string &language,
|
2020-01-15 21:20:44 +00:00
|
|
|
const string &pattern, const size_t &flags );
|
2019-01-19 12:40:10 +00:00
|
|
|
|
2020-01-16 10:12:22 +00:00
|
|
|
string getShowId( string &show, const string &language );
|
|
|
|
|
2019-01-19 12:40:10 +00:00
|
|
|
#endif
|
2019-01-23 19:46:03 +00:00
|
|
|
|
2020-01-15 09:00:25 +00:00
|
|
|
void printLangs();
|
2020-01-16 10:12:22 +00:00
|
|
|
|
2020-01-15 09:00:25 +00:00
|
|
|
bool findLanguage( const char_t *language );
|
2020-01-16 10:12:22 +00:00
|
|
|
|
2020-01-15 09:00:25 +00:00
|
|
|
bool authenticate( const std::string &api_key );
|
2020-01-16 10:12:22 +00:00
|
|
|
|
2020-01-15 09:00:25 +00:00
|
|
|
string showNameFromId( const string &id, const string &language );
|
2020-01-16 10:12:22 +00:00
|
|
|
|
2020-01-15 09:00:25 +00:00
|
|
|
std::vector< std::pair< string, string > > searchShow( const string &show,
|
|
|
|
const string &language );
|
|
|
|
|
2019-01-29 16:50:19 +00:00
|
|
|
#endif // TV_RENAME_HPP
|