Episode: Removed 'season_number' Value

It was unused.
This commit is contained in:
Moss 2022-09-30 15:47:05 -04:00
parent 1a82ddac32
commit a274e45106
2 changed files with 1 additions and 36 deletions

View File

@ -113,7 +113,7 @@ namespace dropout_dl {
} }
} }
} }
return "-1"; return "ERROR";
} }
std::string episode::get_episode_name(const std::string& html_data) { std::string episode::get_episode_name(const std::string& html_data) {
@ -157,24 +157,6 @@ namespace dropout_dl {
return "-1"; return "-1";
} }
std::string episode::get_season_number(const std::string& html_data) {
std::string season("Season");
std::string dash(",");
std::string season_num;
for (int i = 0; i < html_data.size(); i++) {
if (substr_is(html_data, i, season)) {
for (int j = i + 7; j < html_data.size(); j++) {
if (html_data[j] == '\n' || html_data[j] == ' ' || html_data[j] == '\t') continue;
if (html_data[j] == '-' || html_data[j] == ',' ) {
return season_num;
}
season_num += html_data[j];
}
}
}
return "-1";
}
std::string episode::get_embed_url(const std::string& html_data) { std::string episode::get_embed_url(const std::string& html_data) {
std::string config("window.VHX.config"); std::string config("window.VHX.config");
std::string embed_url("embed_url: "); std::string embed_url("embed_url: ");

View File

@ -222,8 +222,6 @@ namespace dropout_dl {
std::string name; std::string name;
/// The number of the episode in the season. This can be a number or a string /// The number of the episode in the season. This can be a number or a string
std::string episode_number; std::string episode_number;
/// The number of the season. This can be a number or a string
std::string season_number;
/// The url for the main episode page /// The url for the main episode page
std::string episode_url; std::string episode_url;
/// The data of the main episode page /// The data of the main episode page
@ -285,15 +283,6 @@ namespace dropout_dl {
*/ */
static std::string get_episode_number(const std::string& html_data); static std::string get_episode_number(const std::string& html_data);
/**
*
* @param html_data - Episode page data
* @return The season number
*
* Get the season number from the episode page
*/
static std::string get_season_number(const std::string& html_data);
/** /**
* *
* @param html_data - Episode page data * @param html_data - Episode page data
@ -378,12 +367,6 @@ namespace dropout_dl {
exit(6); exit(6);
} }
this->season_number = get_season_number(episode_data);
if (verbose) {
std::cout << "Got season: " << this->season_number << '\n';
}
this->episode_number = get_episode_number(episode_data); this->episode_number = get_episode_number(episode_data);
if (verbose) { if (verbose) {