Skip to content

Commit

Permalink
Always recognize Season and Episode in addition to their translation
Browse files Browse the repository at this point in the history
when parsing video files.

Closes #10613
  • Loading branch information
Nicolas Riendeau committed Aug 6, 2012
1 parent 44f5414 commit 0f3d088
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions mythtv/libs/libmythmetadata/videometadata.cpp
Expand Up @@ -1030,11 +1030,11 @@ QString VideoMetadata::FilenameToMeta(const QString &file_name, int position)
QString regexp = QString(
"^(.*[^s0-9])" // Title
"%1" // optional separator
"(?:s|(?:%2))?" // season marker
"(?:s|(?:Season|%2))?" // season marker
"%1" // optional separator
"(\\d{1,4})" // Season
"%1" // optional separator
"(?:[ex/]|%3)" // episode marker
"(?:[ex/]|Episode|%3)" // episode marker
"%1" // optional separator
"(\\d{1,3})" // Episode
"%1" // optional separator
Expand All @@ -1045,7 +1045,7 @@ QString VideoMetadata::FilenameToMeta(const QString &file_name, int position)
Qt::CaseInsensitive, QRegExp::RegExp2);

// Cleanup Regexp
QString regexp2 = QString("(%1(?:%2%1\\d*%1)*%1)$")
QString regexp2 = QString("(%1(?:(?:Season|%2)%1\\d*%1)*%1)$")
.arg(separator).arg(season_translation);
QRegExp title_parse(regexp2, Qt::CaseInsensitive, QRegExp::RegExp2);

Expand Down

0 comments on commit 0f3d088

Please sign in to comment.