From 2e02da046d3e56cdf4744f644af35ad07424f48b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sl=C3=A1vek=20Banko?= Date: Mon, 3 Mar 2014 13:46:44 +0100 Subject: Update to upstream version 1.3.6 --- src/translators/deliciousimporter.cpp | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) (limited to 'src/translators/deliciousimporter.cpp') diff --git a/src/translators/deliciousimporter.cpp b/src/translators/deliciousimporter.cpp index a82c006..be6fe3e 100644 --- a/src/translators/deliciousimporter.cpp +++ b/src/translators/deliciousimporter.cpp @@ -35,7 +35,9 @@ DeliciousImporter::DeliciousImporter(const KURL& url_) : XSLTImporter(url_) { } bool DeliciousImporter::canImport(int type) const { - return type == Data::Collection::Book; + return type == Data::Collection::Book || + type == Data::Collection::Video || + type == Data::Collection::Game; } Tellico::Data::CollPtr DeliciousImporter::collection() { @@ -51,7 +53,18 @@ Tellico::Data::CollPtr DeliciousImporter::collection() { << TQString::fromLatin1("Medium Covers/") << TQString::fromLatin1("Small Covers/") << TQString::fromLatin1("Plain Covers/"); - const TQString commField = TQString::fromLatin1("comments"); + TQString commField; + switch(coll->type()) { + case Data::Collection::Book: + commField = TQString::fromLatin1("comments"); break; + case Data::Collection::Video: + commField = TQString::fromLatin1("plot"); break; + case Data::Collection::Game: + commField = TQString::fromLatin1("description"); break; + default: + myWarning() << "bad collection type:" << coll->type() << endl; + } + const TQString uuidField = TQString::fromLatin1("uuid"); const TQString coverField = TQString::fromLatin1("cover"); const bool isLocal = url().isLocalFile(); -- cgit v1.2.1