Example #1
0
bool Parser::Parse() {
  SearchForKeywords();

  if (parse_options.parse_episode_number)
    SearchForEpisodeNumber();

  SearchForAnimeTitle();

  if (parse_options.parse_release_group &&
      elements_.empty(kElementReleaseGroup))
    SearchForReleaseGroup();

  if (parse_options.parse_episode_title)
    SearchForEpisodeTitle();

  return !elements_.empty(kElementAnimeTitle);
}
Example #2
0
bool Parser::Parse() {
  SearchForKeywords();

  SearchForIsolatedNumbers();

  if (options_.parse_episode_number)
    SearchForEpisodeNumber();

  SearchForAnimeTitle();

  if (options_.parse_release_group &&
      elements_.empty(kElementReleaseGroup))
    SearchForReleaseGroup();

  if (options_.parse_episode_title &&
      !elements_.empty(kElementEpisodeNumber))
    SearchForEpisodeTitle();

  ValidateElements();

  return !elements_.empty(kElementAnimeTitle);
}