[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: extragear/office/tellico/src/fetch
From: Robby Stephenson <robby () periapsis ! org>
Date: 2010-04-08 5:43:25
Message-ID: 20100408054325.39715AC892 () svn ! kde ! org
[Download RAW message or body]
SVN commit 1112419 by rstephenson:
add additional tokens to recognize in amazon title results
M +14 -0 amazonfetcher.cpp
--- trunk/extragear/office/tellico/src/fetch/amazonfetcher.cpp #1112418:1112419
@@ -788,6 +788,7 @@
}
bool AmazonFetcher::parseTitleToken(Tellico::Data::EntryPtr entry, const QString& token) {
+// myDebug() << "title token:" << token;
// if res = true, then the token gets removed from the title
bool res = false;
if(token.indexOf(QLatin1String("widescreen"), 0, Qt::CaseInsensitive) > -1 ||
@@ -810,6 +811,19 @@
entry->setField(QLatin1String("directors-cut"), QLatin1String("true"));
// res = true; leave it in the title
}
+ if(token.toLower() == QLatin1String("ntsc")) {
+ entry->setField(QLatin1String("format"), i18n("NTSC"));
+ res = true;
+ }
+ if(token.toLower() == QLatin1String("dvd")) {
+ entry->setField(QLatin1String("medium"), i18n("DVD"));
+ res = true;
+ }
+ static QRegExp regionRx(QLatin1String("Region [1-9]"));
+ if(regionRx.indexIn(token) > -1) {
+ entry->setField(QLatin1String("region"), i18n(regionRx.cap(0).toUtf8()));
+ res = true;
+ }
return res;
}
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic