bool ShowTree::addEpisode(QString title, int season, int episode, QString language, int theMovieDbId) { Show *show = this->findOrInsert(title, theMovieDbId); show->addEpisode(season, episode, language, ""); return true; }
bool ShowTree::addEpisode(QString title, QString link) { QString showTitle; QString language; int season; int episode; if (!EpisodeParser::parseTitle(title, &showTitle, &language, &season, &episode)) { return false; } Show *show = this->findOrInsert(showTitle, -1); show->addEpisode(season, episode, language, link); return true; }