[office/tellico/4.2] src/fetch: itunes: only set binding for ebook
Robby Stephenson <[email protected]>
| Newsgroups | gmane.comp.kde.cvs |
|---|---|
| Message-ID | <[email protected]> |
Git commit 6d4e5e651532ba6b3b9beebb56fcf2d16c04d264 by Robby Stephenson.
Committed on 26/07/2026 at 18:11.
Pushed by rstephenson into branch '4.2'.
itunes: only set binding for ebook
M +3 -1 src/fetch/itunesfetcher.cpp
https://invent.kde.org/office/tellico/-/commit/6d4e5e651532ba6b3b9beebb56fcf2d16c04d264
diff --git a/src/fetch/itunesfetcher.cpp b/src/fetch/itunesfetcher.cpp
index 860345922..3a6b8a87b 100644
--- a/src/fetch/itunesfetcher.cpp
+++ b/src/fetch/itunesfetcher.cpp
@@ -458,7 +458,9 @@ void ItunesFetcher::populateEntry(Data::EntryPtr entry_, const QJsonObject& obj_
entry_->setField(QStringLiteral("plot"), objValue(obj_, "longDescription"));
}
if(collectionType() == Data::Collection::Book) {
- entry_->setField(QStringLiteral("binding"), i18n("E-Book")); // true for audio books as well?
+ if(objValue(obj_, "kind") == QLatin1String("ebook")) { // not for audiobooks
+ entry_->setField(QStringLiteral("binding"), i18n("E-Book"));
+ }
entry_->setField(QStringLiteral("pub_year"), objValue(obj_, "releaseDate").left(4));
} else {
entry_->setField(QStringLiteral("year"), objValue(obj_, "releaseDate").left(4));