Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Add the new strings we will use for video metadata parsing
Refs #10613
  • Loading branch information
Nicolas Riendeau committed Jul 16, 2012
1 parent cb1a06c commit de9ede4
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 3 deletions.
13 changes: 10 additions & 3 deletions mythtv/libs/libmythmetadata/videometadata.cpp
Expand Up @@ -1015,8 +1015,15 @@ QString VideoMetadata::FilenameToMeta(const QString &file_name, int position)
cleanFilename.replace(QRegExp("_"), " ");
cleanFilename.replace(QRegExp("\\."), " ");

QString season_translation = QObject::tr("Season");
QString episode_translation = QObject::tr("Episode");
/*: Word(s) which should be recognized as "season" when parsing a video
* file name. To list more than one word, separate them with a '|'.
*/
QString season_translation = tr("Season", "Metadata file name parsing");

/*: Word(s) which should be recognized as "episode" when parsing a video
* file name. To list more than one word, separate them with a '|'.
*/
QString episode_translation = tr("Episode", "Metadata file name parsing");

// Primary Regexp
QString separator = "(?:\\s?(?:-|/)?\\s?)?";
Expand Down Expand Up @@ -1090,7 +1097,7 @@ namespace
{
const QRegExp &getTitleTrim(bool ignore_case)
{
static QString pattern(QObject::tr("^(The |A |An )"));
static QString pattern(VideoMetadata::tr("^(The |A |An )"));
static QRegExp prefixes_case(pattern, Qt::CaseSensitive);
static QRegExp prefixes_nocase(pattern, Qt::CaseInsensitive);
return ignore_case ? prefixes_nocase : prefixes_case;
Expand Down
3 changes: 3 additions & 0 deletions mythtv/libs/libmythmetadata/videometadata.h
Expand Up @@ -6,6 +6,7 @@

#include <QString>
#include <QDate>
#include <QCoreApplication>

#include "parentalcontrols.h"
#include "mythmetaexp.h"
Expand All @@ -24,6 +25,8 @@ typedef QHash<QString,QString> MetadataMap;

class META_PUBLIC VideoMetadata
{
Q_DECLARE_TR_FUNCTIONS(VideoMetadata)

public:
typedef std::pair<int, QString> genre_entry;
typedef std::pair<int, QString> country_entry;
Expand Down

0 comments on commit de9ede4

Please sign in to comment.