summaryrefslogtreecommitdiffstats
path: root/src/translators/deliciousimporter.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/translators/deliciousimporter.cpp')
-rw-r--r--src/translators/deliciousimporter.cpp17
1 files changed, 15 insertions, 2 deletions
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();