Debian

Available patches from Ubuntu

To see Ubuntu differences wrt. to Debian, write down a grep-dctrl query identifying the packages you're interested in:
grep-dctrl -n -sPackage Sources.Debian
(e.g. -FPackage linux-ntfs or linux-ntfs)

Modified packages are listed below:

Debian ( Changelog | PTS | Bugs ) Ubuntu ( Changelog | txt | LP | Bugs ) | Diff from Ubuntu

Source: kfilemetadata-kf5

kfilemetadata-kf5 (5.71.0-0ubuntu2) groovy; urgency=medium * Add libappimage-dev and libkf5config-dev build deps to enable building of the appimage extractor. -- Rik Mills <rikmills@kde.org> Thu, 25 Jun 2020 18:03:17 +0100 kfilemetadata-kf5 (5.71.0-0ubuntu1) groovy; urgency=medium * New upstream release (5.71.0) -- Rik Mills <rikmills@kde.org> Sun, 14 Jun 2020 12:06:01 +0100 kfilemetadata-kf5 (5.70.0-1ubuntu1) groovy; urgency=medium * Merge from debian unstable. Remaining changes: - Kubuntu Vcs fields. - debhelper-compat = 12 for backports. -- Rik Mills <rikmills@kde.org> Tue, 09 Jun 2020 22:47:07 +0100

Modifications :
  1. Download patch src/extractors/xmlextractor.cpp

    --- 5.70.0-1/src/extractors/xmlextractor.cpp 2020-05-02 22:18:13.000000000 +0000 +++ 5.71.0-0ubuntu2/src/extractors/xmlextractor.cpp 2020-06-07 18:27:04.000000000 +0000 @@ -101,6 +101,10 @@ void XmlExtractor::extract(ExtractionRes } if (e.localName() == QLatin1String("metadata")) { + if (!(flags & ExtractionResult::ExtractMetaData)) { + continue; + } + auto rdf = e.firstChildElement(QLatin1String("RDF")); if (rdf.isNull() || rdf.namespaceURI() != rdfNS()) { continue;
  2. Download patch autotests/ffmpegextractortest.cpp

    --- 5.70.0-1/autotests/ffmpegextractortest.cpp 2020-05-02 22:18:13.000000000 +0000 +++ 5.71.0-0ubuntu2/autotests/ffmpegextractortest.cpp 2020-06-07 18:27:04.000000000 +0000 @@ -37,6 +37,24 @@ QString testFilePath(const QString& base } // namespace +void ffmpegExtractorTest::testNoExtraction() +{ + QString fileName = testFilePath(QStringLiteral("test"), QStringLiteral("webm")); + QMimeDatabase mimeDb; + QString mimeType = MimeUtils::strictMimeType(fileName, mimeDb).name(); + + FFmpegExtractor plugin{this}; + QVERIFY(plugin.mimetypes().contains(plugin.getSupportedMimeType(mimeType))); + + SimpleExtractionResult result(fileName, mimeType, ExtractionResult::ExtractNothing); + plugin.extract(&result); + + QCOMPARE(result.types().size(), 1); + QCOMPARE(result.types().constFirst(), Type::Video); + QCOMPARE(result.properties().size(), 0); +} + + void ffmpegExtractorTest::testVideoProperties_data() { QTest::addColumn<QString>("fileType");
  3. Download patch src/extractors/odfextractor.cpp

    --- 5.70.0-1/src/extractors/odfextractor.cpp 2020-05-02 22:18:13.000000000 +0000 +++ 5.71.0-0ubuntu2/src/extractors/odfextractor.cpp 2020-06-07 18:27:04.000000000 +0000 @@ -87,61 +87,63 @@ void OdfExtractor::extract(ExtractionRes return; } - QDomDocument metaData(QStringLiteral("metaData")); - metaData.setContent(static_cast<const KArchiveFile*>(metaXml)->data(), true); - - // parse metadata ... - QDomElement meta = firstChildElementNS(firstChildElementNS(metaData, - officeNS(), QStringLiteral("document-meta")), - officeNS(), QStringLiteral("meta")); - - QDomNode n = meta.firstChild(); - while (!n.isNull()) { - QDomElement e = n.toElement(); - if (!e.isNull()) { - const QString namespaceURI = e.namespaceURI(); - const QString localName = e.localName(); - - // Dublin Core - if (namespaceURI == dcNS()) { - if (localName == QLatin1String("description")) { - result->add(Property::Description, e.text()); - } else if (localName == QLatin1String("subject")) { - result->add(Property::Subject, e.text()); - } else if (localName == QLatin1String("title")) { - result->add(Property::Title, e.text()); - } else if (localName == QLatin1String("creator")) { - result->add(Property::Author, e.text()); - } else if (localName == QLatin1String("language")) { - result->add(Property::Language, e.text()); - } - } - // Meta Properties - else if (namespaceURI == metaNS()) { - if (localName == QLatin1String("document-statistic")) { - bool ok = false; - int pageCount = e.attributeNS(metaNS(), QStringLiteral("page-count")).toInt(&ok); - if (ok) { - result->add(Property::PageCount, pageCount); + if (result->inputFlags() & ExtractionResult::ExtractMetaData) { + QDomDocument metaData(QStringLiteral("metaData")); + metaData.setContent(static_cast<const KArchiveFile*>(metaXml)->data(), true); + + // parse metadata ... + QDomElement meta = firstChildElementNS(firstChildElementNS(metaData, + officeNS(), QStringLiteral("document-meta")), + officeNS(), QStringLiteral("meta")); + + QDomNode n = meta.firstChild(); + while (!n.isNull()) { + QDomElement e = n.toElement(); + if (!e.isNull()) { + const QString namespaceURI = e.namespaceURI(); + const QString localName = e.localName(); + + // Dublin Core + if (namespaceURI == dcNS()) { + if (localName == QLatin1String("description")) { + result->add(Property::Description, e.text()); + } else if (localName == QLatin1String("subject")) { + result->add(Property::Subject, e.text()); + } else if (localName == QLatin1String("title")) { + result->add(Property::Title, e.text()); + } else if (localName == QLatin1String("creator")) { + result->add(Property::Author, e.text()); + } else if (localName == QLatin1String("language")) { + result->add(Property::Language, e.text()); } - - int wordCount = e.attributeNS(metaNS(), QStringLiteral("word-count")).toInt(&ok); - if (ok) { - result->add(Property::WordCount, wordCount); + } + // Meta Properties + else if (namespaceURI == metaNS()) { + if (localName == QLatin1String("document-statistic")) { + bool ok = false; + int pageCount = e.attributeNS(metaNS(), QStringLiteral("page-count")).toInt(&ok); + if (ok) { + result->add(Property::PageCount, pageCount); + } + + int wordCount = e.attributeNS(metaNS(), QStringLiteral("word-count")).toInt(&ok); + if (ok) { + result->add(Property::WordCount, wordCount); + } + } else if (localName == QLatin1String("keyword")) { + QString keywords = e.text(); + result->add(Property::Keywords, keywords); + } else if (localName == QLatin1String("generator")) { + result->add(Property::Generator, e.text()); + } else if (localName == QLatin1String("creation-date")) { + QDateTime dt = ExtractorPlugin::dateTimeFromString(e.text()); + if (!dt.isNull()) + result->add(Property::CreationDate, dt); } - } else if (localName == QLatin1String("keyword")) { - QString keywords = e.text(); - result->add(Property::Keywords, keywords); - } else if (localName == QLatin1String("generator")) { - result->add(Property::Generator, e.text()); - } else if (localName == QLatin1String("creation-date")) { - QDateTime dt = ExtractorPlugin::dateTimeFromString(e.text()); - if (!dt.isNull()) - result->add(Property::CreationDate, dt); } } + n = n.nextSibling(); } - n = n.nextSibling(); } result->addType(Type::Document);
  4. Download patch src/extractors/taglibextractor.cpp

    --- 5.70.0-1/src/extractors/taglibextractor.cpp 2020-05-02 22:18:13.000000000 +0000 +++ 5.71.0-0ubuntu2/src/extractors/taglibextractor.cpp 2020-06-07 18:27:04.000000000 +0000 @@ -58,6 +58,7 @@ const QStringList supportedMimeTypes = { QStringLiteral("audio/opus"), QStringLiteral("audio/speex"), QStringLiteral("audio/wav"), + QStringLiteral("audio/vnd.audible.aax"), QStringLiteral("audio/x-aiff"), QStringLiteral("audio/x-aifc"), QStringLiteral("audio/x-ape"), @@ -74,7 +75,7 @@ const QStringList supportedMimeTypes = { void extractAudioProperties(TagLib::File* file, ExtractionResult* result) { TagLib::AudioProperties* audioProp = file->audioProperties(); - if (audioProp) { + if (audioProp && (result->inputFlags() & ExtractionResult::ExtractMetaData)) { if (audioProp->length()) { // What about the xml duration? result->add(Property::Duration, audioProp->length()); @@ -96,9 +97,10 @@ void extractAudioProperties(TagLib::File void readGenericProperties(const TagLib::PropertyMap &savedProperties, ExtractionResult* result) { - if (savedProperties.isEmpty()) { + if (!(result->inputFlags() & ExtractionResult::ExtractMetaData) || savedProperties.isEmpty()) { return; } + if (savedProperties.contains("TITLE")) { result->add(Property::Title, TStringToQString(savedProperties["TITLE"].toString()).trimmed()); } @@ -254,9 +256,10 @@ void readGenericProperties(const TagLib: void extractId3Tags(TagLib::ID3v2::Tag* Id3Tags, ExtractionResult* result) { - if (Id3Tags->isEmpty()) { + if (!(result->inputFlags() & ExtractionResult::ExtractMetaData) || Id3Tags->isEmpty()) { return; } + TagLib::ID3v2::FrameList lstID3v2; /* @@ -303,9 +306,10 @@ void extractId3Tags(TagLib::ID3v2::Tag* void extractMp4Tags(TagLib::MP4::Tag* mp4Tags, ExtractionResult* result) { - if (mp4Tags->isEmpty()) { + if (!(result->inputFlags() & ExtractionResult::ExtractMetaData) || mp4Tags->isEmpty()) { return; } + TagLib::MP4::ItemListMap allTags = mp4Tags->itemListMap(); /* @@ -321,7 +325,7 @@ void extractMp4Tags(TagLib::MP4::Tag* mp void extractAsfTags(TagLib::ASF::Tag* asfTags, ExtractionResult* result) { - if (asfTags->isEmpty()) { + if (!(result->inputFlags() & ExtractionResult::ExtractMetaData) || asfTags->isEmpty()) { return; } @@ -440,7 +444,8 @@ void TagLibExtractor::extract(Extraction extractAudioProperties(&file, result); readGenericProperties(file.properties(), result); } - } else if (mimeType == QLatin1String("audio/mp4")) { + } else if ((mimeType == QLatin1String("audio/mp4")) || + (mimeType == QLatin1String("audio/vnd.audible.aax"))) { TagLib::MP4::File file(&stream, true); if (file.isValid()) { extractAudioProperties(&file, result);
  5. Download patch autotests/postscriptdscextractortest.cpp

    --- 5.70.0-1/autotests/postscriptdscextractortest.cpp 2020-05-02 22:18:13.000000000 +0000 +++ 5.71.0-0ubuntu2/autotests/postscriptdscextractortest.cpp 2020-06-07 18:27:04.000000000 +0000 @@ -32,6 +32,22 @@ QString PostscriptDscExtractorTest::test return QLatin1String(INDEXER_TESTS_SAMPLE_FILES_PATH) + QLatin1Char('/') + fileName; } +void PostscriptDscExtractorTest::testNoExtraction() +{ + DscExtractor plugin{this}; + + QString fileName = testFilePath(QStringLiteral("test.ps")); + QString mimeType = MimeUtils::strictMimeType(fileName, mimeDb).name(); + QVERIFY(plugin.mimetypes().contains(mimeType)); + + SimpleExtractionResult result(fileName, mimeType, ExtractionResult::ExtractNothing); + plugin.extract(&result); + + QCOMPARE(result.types().size(), 1); + QCOMPARE(result.types().constFirst(), Type::Document); + QCOMPARE(result.properties().size(), 0); +} + void PostscriptDscExtractorTest::testPS() { DscExtractor plugin{this};
  6. Download patch src/extractors/postscriptdscextractor.cpp

    --- 5.70.0-1/src/extractors/postscriptdscextractor.cpp 2020-05-02 22:18:13.000000000 +0000 +++ 5.71.0-0ubuntu2/src/extractors/postscriptdscextractor.cpp 2020-06-07 18:27:04.000000000 +0000 @@ -42,11 +42,6 @@ QStringList DscExtractor::mimetypes() co void DscExtractor::extract(ExtractionResult* result) { - auto flags = result->inputFlags(); - if (!(flags & ExtractionResult::ExtractMetaData)) { - return; - } - QFile file(result->inputUrl()); if (!file.open(QIODevice::ReadOnly)) { qCWarning(KFILEMETADATA_LOG) << "Document is not a valid file"; @@ -60,6 +55,9 @@ void DscExtractor::extract(ExtractionRes result->addType(Type::Image); } + if (!(result->inputFlags() & ExtractionResult::ExtractMetaData)) { + return; + } // Try to find some DSC (PostScript Language Document Structuring Conventions) conforming data QTextStream stream(&file); QString line;
  7. Download patch autotests/popplerextractortest.cpp

    --- 5.70.0-1/autotests/popplerextractortest.cpp 2020-05-02 22:18:13.000000000 +0000 +++ 5.71.0-0ubuntu2/autotests/popplerextractortest.cpp 2020-06-07 18:27:04.000000000 +0000 @@ -34,6 +34,23 @@ QString PopplerExtractorTest::testFilePa return QLatin1String(INDEXER_TESTS_SAMPLE_FILES_PATH) + QLatin1Char('/') + fileName; } +void PopplerExtractorTest::testNoExtraction() +{ + PopplerExtractor plugin{this}; + + QString fileName = testFilePath(QStringLiteral("test.pdf")); + QMimeDatabase mimeDb; + QString mimeType = MimeUtils::strictMimeType(fileName, mimeDb).name(); + QVERIFY(plugin.mimetypes().contains(mimeType)); + + SimpleExtractionResult result(fileName, mimeType, ExtractionResult::ExtractNothing); + plugin.extract(&result); + + QCOMPARE(result.types().size(), 1); + QCOMPARE(result.types().constFirst(), Type::Document); + QCOMPARE(result.properties().size(), 0); +} + void PopplerExtractorTest::test() { PopplerExtractor plugin{this};
  8. Download patch autotests/exiv2extractortest.cpp

    --- 5.70.0-1/autotests/exiv2extractortest.cpp 2020-05-02 22:18:13.000000000 +0000 +++ 5.71.0-0ubuntu2/autotests/exiv2extractortest.cpp 2020-06-07 18:27:04.000000000 +0000 @@ -35,6 +35,23 @@ QString Exiv2ExtractorTest::testFilePath return QLatin1String(INDEXER_TESTS_SAMPLE_FILES_PATH) + QLatin1Char('/') + fileName; } +void Exiv2ExtractorTest::testNoExtraction() +{ + Exiv2Extractor plugin{this}; + + QString fileName = testFilePath(QStringLiteral("test.jpg")); + QMimeDatabase mimeDb; + QString mimeType = MimeUtils::strictMimeType(fileName, mimeDb).name(); + QVERIFY(plugin.mimetypes().contains(mimeType)); + + SimpleExtractionResult result(fileName, mimeType, ExtractionResult::ExtractNothing); + plugin.extract(&result); + + QCOMPARE(result.types().size(), 1); + QCOMPARE(result.types().constFirst(), Type::Image); + QCOMPARE(result.properties().size(), 0); +} + void Exiv2ExtractorTest::test() { Exiv2Extractor plugin{this};
  9. Download patch autotests/office2007extractortest.h

    --- 5.70.0-1/autotests/office2007extractortest.h 2020-05-02 22:18:13.000000000 +0000 +++ 5.71.0-0ubuntu2/autotests/office2007extractortest.h 2020-06-07 18:27:04.000000000 +0000 @@ -30,6 +30,7 @@ private: QString testFilePath(const QString& fileName) const; private Q_SLOTS: + void testNoExtraction(); void test(); void testMetaDataOnly(); };
  10. Download patch debian/control

    --- 5.70.0-1/debian/control 2020-05-26 21:56:43.000000000 +0000 +++ 5.71.0-0ubuntu2/debian/control 2020-06-25 17:03:17.000000000 +0000 @@ -4,10 +4,11 @@ Priority: optional Maintainer: Debian/Kubuntu Qt/KDE Maintainers <debian-qt-kde@lists.debian.org> Uploaders: Maximiliano Curia <maxy@debian.org> Build-Depends: cmake (>= 3.5~), - debhelper-compat (= 13), + debhelper-compat (= 12), doxygen, - extra-cmake-modules (>= 5.70.0~), + extra-cmake-modules (>= 5.71.0~), graphviz, + libappimage-dev (>= 0.1.10), libattr1-dev, libavcodec-dev (>= 57.48~), libavdevice-dev (>= 3.1~), @@ -15,9 +16,10 @@ Build-Depends: cmake (>= 3.5~), libavutil-dev, libepub-dev, libexiv2-dev (>= 0.21), - libkf5archive-dev (>= 5.70.0~), - libkf5coreaddons-dev (>= 5.70.0~), - libkf5i18n-dev (>= 5.70.0~), + libkf5archive-dev (>= 5.71.0~), + libkf5config-dev (>= 5.71.0~), + libkf5coreaddons-dev (>= 5.71.0~), + libkf5i18n-dev (>= 5.71.0~), libpoppler-qt5-dev (>= 0.12.1), libpostproc-dev, libqt5sql5-sqlite:native, @@ -27,17 +29,17 @@ Build-Depends: cmake (>= 3.5~), pkg-kde-tools (>= 0.15.18), qtbase5-dev (>= 5.12.0~), qttools5-dev, - qttools5-dev-tools + qttools5-dev-tools, Standards-Version: 4.5.0 Homepage: https://projects.kde.org/projects/frameworks/kfilemetadata -Vcs-Browser: https://salsa.debian.org/qt-kde-team/kde/kfilemetadata -Vcs-Git: https://salsa.debian.org/qt-kde-team/kde/kfilemetadata.git +Vcs-Browser: https://code.launchpad.net/~kubuntu-packagers/kubuntu-packaging/+git/kfilemetadata +Vcs-Git: https://git.launchpad.net/~kubuntu-packagers/kubuntu-packaging/+git/kfilemetadata Rules-Requires-Root: no Package: libkf5filemetadata-bin Architecture: any -Depends: catdoc, ${misc:Depends}, ${shlibs:Depends} Multi-Arch: same +Depends: catdoc, ${misc:Depends}, ${shlibs:Depends} Description: library for extracting file metadata This library is for extracting file metadata. . @@ -55,12 +57,12 @@ Description: library for extracting file kfilemetadata is part of the KDE frameworks. Package: libkf5filemetadata-dev -Section: libdevel Architecture: any +Section: libdevel Depends: libkf5filemetadata3 (= ${binary:Version}), qtbase5-dev (>= 5.12.0~), ${misc:Depends}, - ${shlibs:Depends} + ${shlibs:Depends}, Recommends: libkf5filemetadata-doc (= ${source:Version}) Description: library for extracting file metadata This library is for extracting file metadata. @@ -72,6 +74,7 @@ Description: library for extracting file Package: libkf5filemetadata-doc Architecture: all Multi-Arch: foreign +Section: doc Depends: ${misc:Depends}, ${shlibs:Depends} Description: library for extracting file metadata (documentation) This library is for extracting file metadata. @@ -79,15 +82,14 @@ Description: library for extracting file kfilemetadata is part of the KDE Plasma desktop. . This package contains the qch documentation files. -Section: doc Package: libkf5filemetadata3 -Section: libs Architecture: any +Multi-Arch: same +Section: libs Depends: libkf5filemetadata-data (= ${source:Version}), ${misc:Depends}, - ${shlibs:Depends} -Multi-Arch: same + ${shlibs:Depends}, Recommends: libkf5filemetadata-bin (= ${binary:Version}) Description: library for extracting file metadata This library is for extracting file metadata.
  11. Download patch autotests/xmlextractortest.cpp

    --- 5.70.0-1/autotests/xmlextractortest.cpp 2020-05-02 22:18:13.000000000 +0000 +++ 5.71.0-0ubuntu2/autotests/xmlextractortest.cpp 2020-06-07 18:27:04.000000000 +0000 @@ -41,6 +41,24 @@ QString XmlExtractorTests::testFilePath( return QLatin1String(INDEXER_TESTS_SAMPLE_FILES_PATH) + QLatin1Char('/') + fileName; } +void XmlExtractorTests::testNoExtraction() +{ + XmlExtractor plugin{this}; + + QString fileName = testFilePath(QStringLiteral("test_with_metadata.svg")); + QMimeDatabase mimeDb; + QString mimeType = MimeUtils::strictMimeType(fileName, mimeDb).name(); + QVERIFY(plugin.mimetypes().contains(mimeType)); + + SimpleExtractionResult result(fileName, mimeType, + ExtractionResult::ExtractNothing); + plugin.extract(&result); + + QCOMPARE(result.types().size(), 1); + QCOMPARE(result.types().at(0), Type::Image); + QCOMPARE(result.properties().size(), 0); +} + void XmlExtractorTests::benchMarkXmlExtractor() { XmlExtractor plugin(this);
  12. Download patch autotests/taglibextractortest.cpp

    --- 5.70.0-1/autotests/taglibextractortest.cpp 2020-05-02 22:18:13.000000000 +0000 +++ 5.71.0-0ubuntu2/autotests/taglibextractortest.cpp 2020-06-07 18:27:04.000000000 +0000 @@ -46,6 +46,18 @@ const QStringList TagLibExtractorTest::p return result; } +void TagLibExtractorTest::testNoExtraction() +{ + TagLibExtractor plugin{this}; + + SimpleExtractionResult result(testFilePath("test.opus"), QStringLiteral("audio/opus"), ExtractionResult::ExtractNothing); + plugin.extract(&result); + + QCOMPARE(result.types().size(), 1); + QCOMPARE(result.types().constFirst(), Type::Audio); + QCOMPARE(result.properties().size(), 0); +} + void TagLibExtractorTest::testPropertyTypes() { TagLibExtractor plugin{this}; @@ -377,6 +389,34 @@ void TagLibExtractorTest::testMp4_data() ; } +void TagLibExtractorTest::testAax() +{ + QFETCH(QString, fileType); + + QString fileName = testFilePath(QStringLiteral("nocoverage_test.") + fileType); + QString mimeType = QStringLiteral("audio/vnd.audible.aax"); + + TagLibExtractor plugin{this}; + SimpleExtractionResult resultAax(fileName, mimeType); + plugin.extract(&resultAax); + + QCOMPARE(resultAax.properties().value(Property::AlbumArtist), QVariant(QStringLiteral("Album Artist"))); + QCOMPARE(resultAax.properties().value(Property::Artist), QVariant(QStringLiteral("Artist"))); + QCOMPARE(resultAax.properties().value(Property::Genre), QVariant(QStringLiteral("Hörbuch"))); + QCOMPARE(resultAax.properties().value(Property::Copyright), QVariant(QStringLiteral("CopyrightHolder"))); + QCOMPARE(resultAax.properties().value(Property::Title), QVariant(QStringLiteral("TrackTitle"))); + QCOMPARE(resultAax.properties().value(Property::Channels).toInt(), 2); +} + +void TagLibExtractorTest::testAax_data() +{ + QTest::addColumn<QString>("fileType"); + + QTest::addRow("aax") + << QStringLiteral("aax") + ; +} + void TagLibExtractorTest::testAsf() { QFETCH(QString, fileType); @@ -565,6 +605,12 @@ void TagLibExtractorTest::testNoMetadata << expectedKeys << QString() ; + QTest::addRow("aax") + << QFINDTESTDATA("samplefiles/no-meta/test.aax") + << QStringLiteral("audio/vnd.audible.aax") + << expectedKeys << QString() + ; + } void TagLibExtractorTest::testNoMetadata()
  13. Download patch autotests/xmlextractortest.h

    --- 5.70.0-1/autotests/xmlextractortest.h 2020-05-02 22:18:13.000000000 +0000 +++ 5.71.0-0ubuntu2/autotests/xmlextractortest.h 2020-06-07 18:27:04.000000000 +0000 @@ -34,6 +34,7 @@ private: QString testFilePath(const QString& fileName) const; private Q_SLOTS: + void testNoExtraction(); void benchMarkXmlExtractor(); void testXmlExtractor(); void testXmlExtractorNoContent();
  14. Download patch autotests/embeddedimagedatatest.cpp

    --- 5.70.0-1/autotests/embeddedimagedatatest.cpp 2020-05-02 22:18:13.000000000 +0000 +++ 5.71.0-0ubuntu2/autotests/embeddedimagedatatest.cpp 2020-06-07 18:27:04.000000000 +0000 @@ -47,7 +47,11 @@ void EmbeddedImageDataTest::test() originalFrontCoverImage = testFile.readAll(); testAudioFile = testFilePath(fileName); - QVERIFY(imageData.mimeTypes().contains(mimeDb.mimeTypeForFile(testAudioFile).name())); + const QString mimeType = mimeDb.mimeTypeForFile(testAudioFile).name(); + if (!imageData.mimeTypes().contains(mimeType)) { + qWarning() << "mimeType" << mimeType << "not in imageData.mimeTypes()" << imageData.mimeTypes(); + } + QVERIFY(imageData.mimeTypes().contains(mimeType)); images = imageData.imageData(testAudioFile); QCOMPARE(images.value(EmbeddedImageData::FrontCover), originalFrontCoverImage); }
  15. Download patch src/extractors/ffmpegextractor.cpp

    --- 5.70.0-1/src/extractors/ffmpegextractor.cpp 2020-05-02 22:18:13.000000000 +0000 +++ 5.71.0-0ubuntu2/src/extractors/ffmpegextractor.cpp 2020-06-07 18:27:04.000000000 +0000 @@ -89,93 +89,95 @@ void FFmpegExtractor::extract(Extraction result->addType(Type::Video); - int totalSecs = fmt_ctx->duration / AV_TIME_BASE; - int bitrate = fmt_ctx->bit_rate; + if (result->inputFlags() & ExtractionResult::ExtractMetaData) { + int totalSecs = fmt_ctx->duration / AV_TIME_BASE; + int bitrate = fmt_ctx->bit_rate; - result->add(Property::Duration, totalSecs); - result->add(Property::BitRate, bitrate); + result->add(Property::Duration, totalSecs); + result->add(Property::BitRate, bitrate); - for (uint i = 0; i < fmt_ctx->nb_streams; i++) { - AVStream* stream = fmt_ctx->streams[i]; + for (uint i = 0; i < fmt_ctx->nb_streams; i++) { + AVStream* stream = fmt_ctx->streams[i]; #if defined HAVE_AVSTREAM_CODECPAR && HAVE_AVSTREAM_CODECPAR - const AVCodecParameters* codec = stream->codecpar; + const AVCodecParameters* codec = stream->codecpar; #else - const AVCodecContext* codec = stream->codec; + const AVCodecContext* codec = stream->codec; #endif - if (codec->codec_type == AVMEDIA_TYPE_VIDEO) { - result->add(Property::Width, codec->width); - result->add(Property::Height, codec->height); - - AVRational avSampleAspectRatio = av_guess_sample_aspect_ratio(fmt_ctx, stream, nullptr); - AVRational avDisplayAspectRatio; - av_reduce(&avDisplayAspectRatio.num, &avDisplayAspectRatio.den, - codec->width * avSampleAspectRatio.num, - codec->height * avSampleAspectRatio.den, - 1024*1024); - double displayAspectRatio = avDisplayAspectRatio.num; - if (avDisplayAspectRatio.den) - displayAspectRatio /= avDisplayAspectRatio.den; - if (displayAspectRatio) - result->add(Property::AspectRatio, displayAspectRatio); - - AVRational avFrameRate = av_guess_frame_rate(fmt_ctx, stream, nullptr); - double frameRate = avFrameRate.num; - if (avFrameRate.den) - frameRate /= avFrameRate.den; - if (frameRate) - result->add(Property::FrameRate, frameRate); + if (codec->codec_type == AVMEDIA_TYPE_VIDEO) { + result->add(Property::Width, codec->width); + result->add(Property::Height, codec->height); + + AVRational avSampleAspectRatio = av_guess_sample_aspect_ratio(fmt_ctx, stream, nullptr); + AVRational avDisplayAspectRatio; + av_reduce(&avDisplayAspectRatio.num, &avDisplayAspectRatio.den, + codec->width * avSampleAspectRatio.num, + codec->height * avSampleAspectRatio.den, + 1024*1024); + double displayAspectRatio = avDisplayAspectRatio.num; + if (avDisplayAspectRatio.den) + displayAspectRatio /= avDisplayAspectRatio.den; + if (displayAspectRatio) + result->add(Property::AspectRatio, displayAspectRatio); + + AVRational avFrameRate = av_guess_frame_rate(fmt_ctx, stream, nullptr); + double frameRate = avFrameRate.num; + if (avFrameRate.den) + frameRate /= avFrameRate.den; + if (frameRate) + result->add(Property::FrameRate, frameRate); + } } - } - AVDictionary* dict = fmt_ctx->metadata; - AVDictionaryEntry* entry; + AVDictionary* dict = fmt_ctx->metadata; + AVDictionaryEntry* entry; - entry = av_dict_get(dict, "title", nullptr, 0); - if (entry) { - result->add(Property::Title, QString::fromUtf8(entry->value)); - } + entry = av_dict_get(dict, "title", nullptr, 0); + if (entry) { + result->add(Property::Title, QString::fromUtf8(entry->value)); + } - entry = av_dict_get(dict, "author", nullptr, 0); - if (entry) { - result->add(Property::Author, QString::fromUtf8(entry->value)); - } + entry = av_dict_get(dict, "author", nullptr, 0); + if (entry) { + result->add(Property::Author, QString::fromUtf8(entry->value)); + } - entry = av_dict_get(dict, "copyright", nullptr, 0); - if (entry) { - result->add(Property::Copyright, QString::fromUtf8(entry->value)); - } + entry = av_dict_get(dict, "copyright", nullptr, 0); + if (entry) { + result->add(Property::Copyright, QString::fromUtf8(entry->value)); + } - entry = av_dict_get(dict, "comment", nullptr, 0); - if (entry) { - result->add(Property::Comment, QString::fromUtf8(entry->value)); - } + entry = av_dict_get(dict, "comment", nullptr, 0); + if (entry) { + result->add(Property::Comment, QString::fromUtf8(entry->value)); + } - entry = av_dict_get(dict, "album", nullptr, 0); - if (entry) { - result->add(Property::Album, QString::fromUtf8(entry->value)); - } + entry = av_dict_get(dict, "album", nullptr, 0); + if (entry) { + result->add(Property::Album, QString::fromUtf8(entry->value)); + } - entry = av_dict_get(dict, "genre", nullptr, 0); - if (entry) { - result->add(Property::Genre, QString::fromUtf8(entry->value)); - } + entry = av_dict_get(dict, "genre", nullptr, 0); + if (entry) { + result->add(Property::Genre, QString::fromUtf8(entry->value)); + } - entry = av_dict_get(dict, "track", nullptr, 0); - if (entry) { - QString value = QString::fromUtf8(entry->value); - - bool ok = false; - int track = value.toInt(&ok); - if (ok && track) - result->add(Property::TrackNumber, track); - } + entry = av_dict_get(dict, "track", nullptr, 0); + if (entry) { + QString value = QString::fromUtf8(entry->value); + + bool ok = false; + int track = value.toInt(&ok); + if (ok && track) + result->add(Property::TrackNumber, track); + } - entry = av_dict_get(dict, "year", nullptr, 0); - if (entry) { - int year = QString::fromUtf8(entry->value).toInt(); - result->add(Property::ReleaseYear, year); + entry = av_dict_get(dict, "year", nullptr, 0); + if (entry) { + int year = QString::fromUtf8(entry->value).toInt(); + result->add(Property::ReleaseYear, year); + } } avformat_close_input(&fmt_ctx);
  16. Download patch CMakeLists.txt

    --- 5.70.0-1/CMakeLists.txt 2020-05-02 22:18:13.000000000 +0000 +++ 5.71.0-0ubuntu2/CMakeLists.txt 2020-06-07 18:27:04.000000000 +0000 @@ -1,11 +1,11 @@ cmake_minimum_required(VERSION 3.5) -set(KF5_VERSION "5.70.0") # handled by release scripts -set(KF5_DEP_VERSION "5.70.0") # handled by release scripts +set(KF5_VERSION "5.71.0") # handled by release scripts +set(KF5_DEP_VERSION "5.71.0") # handled by release scripts project(KFileMetaData VERSION ${KF5_VERSION}) include(FeatureSummary) -find_package(ECM 5.70.0 NO_MODULE) +find_package(ECM 5.71.0 NO_MODULE) set_package_properties(ECM PROPERTIES TYPE REQUIRED DESCRIPTION "Extra CMake Modules." URL "https://commits.kde.org/extra-cmake-modules") feature_summary(WHAT REQUIRED_PACKAGES_NOT_FOUND FATAL_ON_MISSING_REQUIRED_PACKAGES) @@ -117,7 +117,7 @@ set_package_properties(libappimage PROPE ) add_definitions(-DQT_DISABLE_DEPRECATED_BEFORE=0x050d00) -add_definitions(-DKF_DISABLE_DEPRECATED_BEFORE_AND_AT=0x054400) +add_definitions(-DKF_DISABLE_DEPRECATED_BEFORE_AND_AT=0x054700) add_definitions(-DTRANSLATION_DOMAIN=\"kfilemetadata5\") add_definitions(-DQT_NO_FOREACH) add_subdirectory(src)
  17. Download patch autotests/office2007extractortest.cpp

    --- 5.70.0-1/autotests/office2007extractortest.cpp 2020-05-02 22:18:13.000000000 +0000 +++ 5.71.0-0ubuntu2/autotests/office2007extractortest.cpp 2020-06-07 18:27:04.000000000 +0000 @@ -34,6 +34,23 @@ QString Office2007ExtractorTest::testFil return QLatin1String(INDEXER_TESTS_SAMPLE_FILES_PATH) + QLatin1Char('/') + fileName; } +void Office2007ExtractorTest::testNoExtraction() +{ + Office2007Extractor plugin{this}; + + QString fileName = testFilePath(QStringLiteral("test_libreoffice.docx")); + QMimeDatabase mimeDb; + QString mimeType = MimeUtils::strictMimeType(fileName, mimeDb).name(); + QVERIFY(plugin.mimetypes().contains(mimeType)); + + SimpleExtractionResult result(fileName, mimeType, ExtractionResult::ExtractNothing); + plugin.extract(&result); + + QCOMPARE(result.types().size(), 1); + QCOMPARE(result.types().at(0), Type::Document); + QCOMPARE(result.properties().size(), 0); +} + void Office2007ExtractorTest::test() { Office2007Extractor plugin{this};
  18. Download patch autotests/odfextractortest.cpp

    --- 5.70.0-1/autotests/odfextractortest.cpp 2020-05-02 22:18:13.000000000 +0000 +++ 5.71.0-0ubuntu2/autotests/odfextractortest.cpp 2020-06-07 18:27:04.000000000 +0000 @@ -35,6 +35,22 @@ QString OdfExtractorTest::testFilePath(c return QLatin1String(INDEXER_TESTS_SAMPLE_FILES_PATH) + QLatin1Char('/') + fileName; } +void OdfExtractorTest::testNoExtraction() +{ + OdfExtractor plugin{this}; + + QString fileName = testFilePath(QStringLiteral("test.odt")); + QString mimeType = MimeUtils::strictMimeType(fileName, mimeDb).name(); + QVERIFY(plugin.mimetypes().contains(mimeType)); + + SimpleExtractionResult result(fileName, mimeType, ExtractionResult::ExtractNothing); + plugin.extract(&result); + + QCOMPARE(result.types().size(), 1); + QCOMPARE(result.types().at(0), Type::Document); + QCOMPARE(result.properties().size(),0); +} + void OdfExtractorTest::testText() { OdfExtractor plugin{this};
  19. Download patch src/extractors/epubextractor.cpp

    --- 5.70.0-1/src/extractors/epubextractor.cpp 2020-05-02 22:18:13.000000000 +0000 +++ 5.71.0-0ubuntu2/src/extractors/epubextractor.cpp 2020-06-07 18:27:04.000000000 +0000 @@ -78,34 +78,36 @@ void EPubExtractor::extract(ExtractionRe result->addType(Type::Document); - QString value = fetchMetadata(ePubDoc, EPUB_TITLE); - if (!value.isEmpty()) { - result->add(Property::Title, value); - } + if (result->inputFlags() & ExtractionResult::ExtractMetaData) { - value = fetchMetadata(ePubDoc, EPUB_SUBJECT); - if (!value.isEmpty()) { - result->add(Property::Subject, value); - } + QString value = fetchMetadata(ePubDoc, EPUB_TITLE); + if (!value.isEmpty()) { + result->add(Property::Title, value); + } - value = fetchMetadata(ePubDoc, EPUB_CREATOR); - if (!value.isEmpty()) { - if (value.startsWith(QLatin1String("aut:"), Qt::CaseInsensitive)) { - value = value.mid(4).simplified(); - } else if (value.startsWith(QLatin1String("author:"), Qt::CaseInsensitive)) { - value = value.mid(7).simplified(); + value = fetchMetadata(ePubDoc, EPUB_SUBJECT); + if (!value.isEmpty()) { + result->add(Property::Subject, value); } - // A lot of authors have their name written in () again. We discard that part - int index = value.indexOf(QLatin1Char('(')); - if (index) - value = value.mid(0, index); + value = fetchMetadata(ePubDoc, EPUB_CREATOR); + if (!value.isEmpty()) { + if (value.startsWith(QLatin1String("aut:"), Qt::CaseInsensitive)) { + value = value.mid(4).simplified(); + } else if (value.startsWith(QLatin1String("author:"), Qt::CaseInsensitive)) { + value = value.mid(7).simplified(); + } + + // A lot of authors have their name written in () again. We discard that part + int index = value.indexOf(QLatin1Char('(')); + if (index) + value = value.mid(0, index); - result->add(Property::Author, value); - } + result->add(Property::Author, value); + } - // The Contributor just seems to be mostly Calibre aka the Generator - /* + // The Contributor just seems to be mostly Calibre aka the Generator + /* value = fetchMetadata(ePubDoc, EPUB_CONTRIB); if( !value.isEmpty() ) { SimpleResource con; @@ -116,29 +118,30 @@ void EPubExtractor::extract(ExtractionRe graph << con; }*/ - value = fetchMetadata(ePubDoc, EPUB_PUBLISHER); - if (!value.isEmpty()) { - result->add(Property::Publisher, value); - } + value = fetchMetadata(ePubDoc, EPUB_PUBLISHER); + if (!value.isEmpty()) { + result->add(Property::Publisher, value); + } - value = fetchMetadata(ePubDoc, EPUB_DESCRIPTION); - if (!value.isEmpty()) { - result->add(Property::Description, value); - } + value = fetchMetadata(ePubDoc, EPUB_DESCRIPTION); + if (!value.isEmpty()) { + result->add(Property::Description, value); + } - value = fetchMetadata(ePubDoc, EPUB_DATE); - if (!value.isEmpty()) { - if (value.startsWith(QLatin1String("Unspecified:"), Qt::CaseInsensitive)) { - value = value.mid(QByteArray("Unspecified:").size()).simplified(); - } - int ind = value.indexOf(QLatin1String("publication:"), Qt::CaseInsensitive); - if (ind != -1) { - value = value.mid(ind + QByteArray("publication:").size()).simplified(); - } - QDateTime dt = ExtractorPlugin::dateTimeFromString(value); - if (!dt.isNull()) { - result->add(Property::CreationDate, dt); - result->add(Property::ReleaseYear, dt.date().year()); + value = fetchMetadata(ePubDoc, EPUB_DATE); + if (!value.isEmpty()) { + if (value.startsWith(QLatin1String("Unspecified:"), Qt::CaseInsensitive)) { + value = value.mid(QByteArray("Unspecified:").size()).simplified(); + } + int ind = value.indexOf(QLatin1String("publication:"), Qt::CaseInsensitive); + if (ind != -1) { + value = value.mid(ind + QByteArray("publication:").size()).simplified(); + } + QDateTime dt = ExtractorPlugin::dateTimeFromString(value); + if (!dt.isNull()) { + result->add(Property::CreationDate, dt); + result->add(Property::ReleaseYear, dt.date().year()); + } } }
  20. Download patch autotests/popplerextractortest.h

    --- 5.70.0-1/autotests/popplerextractortest.h 2020-05-02 22:18:13.000000000 +0000 +++ 5.71.0-0ubuntu2/autotests/popplerextractortest.h 2020-06-07 18:27:04.000000000 +0000 @@ -30,6 +30,7 @@ private: QString testFilePath(const QString& fileName) const; private Q_SLOTS: + void testNoExtraction(); void test(); void testMetaDataOnly(); };
  21. Download patch src/extractors/plaintextextractor.cpp

    --- 5.70.0-1/src/extractors/plaintextextractor.cpp 2020-05-02 22:18:13.000000000 +0000 +++ 5.71.0-0ubuntu2/src/extractors/plaintextextractor.cpp 2020-06-07 18:27:04.000000000 +0000 @@ -98,8 +98,9 @@ void PlainTextExtractor::extract(Extract lines += 1; } - - result->add(Property::LineCount, lines); + if (result->inputFlags() & ExtractionResult::ExtractMetaData) { + result->add(Property::LineCount, lines); + } free(line); close(fd);
  22. Download patch autotests/taglibextractortest.h

    --- 5.70.0-1/autotests/taglibextractortest.h 2020-05-02 22:18:13.000000000 +0000 +++ 5.71.0-0ubuntu2/autotests/taglibextractortest.h 2020-06-07 18:27:04.000000000 +0000 @@ -33,6 +33,7 @@ private: QString testFilePath(const QString& fileName) const; private Q_SLOTS: + void testNoExtraction(); void testPropertyTypes(); void testCommonData(); void testCommonData_data(); @@ -46,6 +47,8 @@ private Q_SLOTS: void testApe_data(); void testMp4(); void testMp4_data(); + void testAax(); + void testAax_data(); void testAsf(); void testAsf_data(); void testId3Rating_data();
  23. Download patch .arcconfig

    --- 5.70.0-1/.arcconfig 2020-05-02 22:18:13.000000000 +0000 +++ 5.71.0-0ubuntu2/.arcconfig 1970-01-01 00:00:00.000000000 +0000 @@ -1,3 +0,0 @@ -{ - "phabricator.uri" : "https://phabricator.kde.org/" -}
  24. Download patch po/zh_CN/kfilemetadata5.po

    --- 5.70.0-1/po/zh_CN/kfilemetadata5.po 2020-05-02 22:18:13.000000000 +0000 +++ 5.71.0-0ubuntu2/po/zh_CN/kfilemetadata5.po 2020-06-07 18:27:04.000000000 +0000 @@ -10,7 +10,7 @@ msgstr "" "Project-Id-Version: kdeorg\n" "Report-Msgid-Bugs-To: https://bugs.kde.org\n" "POT-Creation-Date: 2019-07-19 02:55+0200\n" -"PO-Revision-Date: 2020-03-25 19:51\n" +"PO-Revision-Date: 2020-05-09 13:50\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Language-Team: Chinese Simplified\n" "Language: zh_CN\n"
  25. Download patch po/et/kfilemetadata5.po

    --- 5.70.0-1/po/et/kfilemetadata5.po 2020-05-02 22:18:13.000000000 +0000 +++ 5.71.0-0ubuntu2/po/et/kfilemetadata5.po 2020-06-07 18:27:04.000000000 +0000 @@ -1,13 +1,13 @@ # Copyright (C) YEAR This_file_is_part_of_KDE # This file is distributed under the same license as the PACKAGE package. # -# Marek Laane <qiilaq69@gmail.com>, 2016, 2019. +# Marek Laane <qiilaq69@gmail.com>, 2016, 2019, 2020. msgid "" msgstr "" "Project-Id-Version: \n" "Report-Msgid-Bugs-To: https://bugs.kde.org\n" "POT-Creation-Date: 2019-07-19 02:55+0200\n" -"PO-Revision-Date: 2019-12-29 11:26+0200\n" +"PO-Revision-Date: 2020-05-05 13:10+0300\n" "Last-Translator: Marek Laane <qiilaq69@gmail.com>\n" "Language-Team: Estonian <kde-et@lists.linux.ee>\n" "Language: et\n" @@ -15,7 +15,7 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=n != 1;\n" -"X-Generator: Lokalize 19.08.1\n" +"X-Generator: Lokalize 19.12.3\n" #: src/formatstrings.cpp:77 #, kde-format @@ -51,7 +51,7 @@ msgstr "Püstiselt keeratud" #, kde-format msgctxt "Description of image orientation" msgid "Transposed" -msgstr "" +msgstr "Transponeeritud" #: src/formatstrings.cpp:96 #, kde-format @@ -63,7 +63,7 @@ msgstr "90° vastupäeva pööratud" #, kde-format msgctxt "Description of image orientation" msgid "Transversed" -msgstr "" +msgstr "Põiki" #: src/formatstrings.cpp:98 #, kde-format
  26. Download patch autotests/ffmpegextractortest.h

    --- 5.70.0-1/autotests/ffmpegextractortest.h 2020-05-02 22:18:13.000000000 +0000 +++ 5.71.0-0ubuntu2/autotests/ffmpegextractortest.h 2020-06-07 18:27:04.000000000 +0000 @@ -30,6 +30,7 @@ class ffmpegExtractorTest : public QObje Q_OBJECT private Q_SLOTS: + void testNoExtraction(); void testVideoProperties(); void testVideoProperties_data(); void testMetaData();
  27. Download patch autotests/epubextractortest.h

    --- 5.70.0-1/autotests/epubextractortest.h 2020-05-02 22:18:13.000000000 +0000 +++ 5.71.0-0ubuntu2/autotests/epubextractortest.h 2020-06-07 18:27:04.000000000 +0000 @@ -30,6 +30,7 @@ private: QString testFilePath(const QString& fileName) const; private Q_SLOTS: + void testNoExtraction(); void test(); void testMetaDataOnly(); };
  28. Download patch autotests/odfextractortest.h

    --- 5.70.0-1/autotests/odfextractortest.h 2020-05-02 22:18:13.000000000 +0000 +++ 5.71.0-0ubuntu2/autotests/odfextractortest.h 2020-06-07 18:27:04.000000000 +0000 @@ -32,6 +32,7 @@ private: QString testFilePath(const QString& fileName) const; private Q_SLOTS: + void testNoExtraction(); void testText(); void testTextMetaDataOnly();
  29. Download patch src/extractors/exiv2extractor.cpp

    --- 5.70.0-1/src/extractors/exiv2extractor.cpp 2020-05-02 22:18:13.000000000 +0000 +++ 5.71.0-0ubuntu2/src/extractors/exiv2extractor.cpp 2020-06-07 18:27:04.000000000 +0000 @@ -169,6 +169,10 @@ void Exiv2Extractor::extract(ExtractionR } result->addType(Type::Image); + if (!(result->inputFlags() & ExtractionResult::ExtractMetaData)) { + return; + } + if (image->pixelHeight()) { result->add(Property::Height, image->pixelHeight()); }
  30. Download patch autotests/exiv2extractortest.h

    --- 5.70.0-1/autotests/exiv2extractortest.h 2020-05-02 22:18:13.000000000 +0000 +++ 5.71.0-0ubuntu2/autotests/exiv2extractortest.h 2020-06-07 18:27:04.000000000 +0000 @@ -30,6 +30,7 @@ private: QString testFilePath(const QString& fileName) const; private Q_SLOTS: + void testNoExtraction(); void test(); void testGPS(); };
  31. Download patch po/az/kfilemetadata5.po
  32. Download patch autotests/postscriptdscextractortest.h

    --- 5.70.0-1/autotests/postscriptdscextractortest.h 2020-05-02 22:18:13.000000000 +0000 +++ 5.71.0-0ubuntu2/autotests/postscriptdscextractortest.h 2020-06-07 18:27:04.000000000 +0000 @@ -30,6 +30,7 @@ private: QString testFilePath(const QString& fileName) const; private Q_SLOTS: + void testNoExtraction(); void testPS(); void testEPS(); private: Binary files 5.70.0-1/autotests/samplefiles/nocoverage_test.aax and 5.71.0-0ubuntu2/autotests/samplefiles/nocoverage_test.aax differ Binary files 5.70.0-1/autotests/samplefiles/no-meta/test.aax and 5.71.0-0ubuntu2/autotests/samplefiles/no-meta/test.aax differ
  33. Download patch po/sl/kfilemetadata5.po

    --- 5.70.0-1/po/sl/kfilemetadata5.po 2020-05-02 22:18:13.000000000 +0000 +++ 5.71.0-0ubuntu2/po/sl/kfilemetadata5.po 2020-06-07 18:27:04.000000000 +0000 @@ -3,13 +3,13 @@ # This file is distributed under the same license as the PACKAGE package. # # Andrej Mernik <andrejm@ubuntu.si>, 2014, 2015, 2016, 2017, 2018. -# Matjaž Jeran <matjaz.jeran@amis.net>, 2019. +# Matjaž Jeran <matjaz.jeran@amis.net>, 2019, 2020. msgid "" msgstr "" "Project-Id-Version: \n" "Report-Msgid-Bugs-To: https://bugs.kde.org\n" "POT-Creation-Date: 2019-07-19 02:55+0200\n" -"PO-Revision-Date: 2020-01-23 15:56+0100\n" +"PO-Revision-Date: 2020-05-24 19:29+0200\n" "Last-Translator: Matjaž Jeran <matjaz.jeran@amis.net>\n" "Language-Team: Slovenian <lugos-slo@lugos.si>\n" "Language: sl\n" @@ -19,7 +19,7 @@ msgstr "" "Translator: Andrej Mernik <andrejm@ubuntu.si>\n" "Plural-Forms: nplurals=4; plural=(n%100==1 ? 1 : n%100==2 ? 2 : n%100==3 || n" "%100==4 ? 3 : 0);\n" -"X-Generator: Poedit 2.2.4\n" +"X-Generator: Lokalize 19.12.2\n" #: src/formatstrings.cpp:77 #, kde-format @@ -55,7 +55,7 @@ msgstr "Navpično obrnjeno" #, kde-format msgctxt "Description of image orientation" msgid "Transposed" -msgstr "" +msgstr "Transponirano" #: src/formatstrings.cpp:96 #, kde-format @@ -67,7 +67,7 @@ msgstr "Zasukano za 90° v obratni smeri #, kde-format msgctxt "Description of image orientation" msgid "Transversed" -msgstr "" +msgstr "Prečeno" #: src/formatstrings.cpp:98 #, kde-format
  34. Download patch autotests/indexerextractortests.cpp

    --- 5.70.0-1/autotests/indexerextractortests.cpp 2020-05-02 22:18:13.000000000 +0000 +++ 5.71.0-0ubuntu2/autotests/indexerextractortests.cpp 2020-06-07 18:27:04.000000000 +0000 @@ -63,6 +63,20 @@ void IndexerExtractorTests::benchMarkPla } } +void IndexerExtractorTests::testNoExtraction() +{ + PlainTextExtractor plugin{this}; + + SimpleExtractionResult result(testFilePath(QStringLiteral("plain_text_file.txt")), QStringLiteral("text/plain"), ExtractionResult::ExtractNothing); + plugin.extract(&result); + + + QCOMPARE(result.types().size(), 1); + QCOMPARE(result.types().at(0), Type::Text); + + QCOMPARE(result.properties().size(), 0); +} + void IndexerExtractorTests::testPlainTextExtractor() { PlainTextExtractor plugin{this};
  35. Download patch autotests/epubextractortest.cpp

    --- 5.70.0-1/autotests/epubextractortest.cpp 2020-05-02 22:18:13.000000000 +0000 +++ 5.71.0-0ubuntu2/autotests/epubextractortest.cpp 2020-06-07 18:27:04.000000000 +0000 @@ -34,6 +34,23 @@ QString EPubExtractorTest::testFilePath( return QLatin1String(INDEXER_TESTS_SAMPLE_FILES_PATH) + QLatin1Char('/') + fileName; } +void EPubExtractorTest::testNoExtraction() +{ + EPubExtractor plugin{this}; + + QString fileName = testFilePath(QStringLiteral("test.epub")); + QMimeDatabase mimeDb; + QString mimeType = MimeUtils::strictMimeType(fileName, mimeDb).name(); + QVERIFY(plugin.mimetypes().contains(mimeType)); + + SimpleExtractionResult result(fileName, mimeType, ExtractionResult::ExtractNothing); + plugin.extract(&result); + + QCOMPARE(result.types().size(), 1); + QCOMPARE(result.types().constFirst(), Type::Document); + QCOMPARE(result.properties().size(), 0); +} + void EPubExtractorTest::test() { EPubExtractor plugin{this};
  36. Download patch src/extractors/office2007extractor.cpp

    --- 5.70.0-1/src/extractors/office2007extractor.cpp 2020-05-02 22:18:13.000000000 +0000 +++ 5.71.0-0ubuntu2/src/extractors/office2007extractor.cpp 2020-06-07 18:27:04.000000000 +0000 @@ -74,7 +74,9 @@ void Office2007Extractor::extract(Extrac const KArchiveDirectory* docPropDirectory = dynamic_cast<const KArchiveDirectory*>(docPropEntry); const QStringList docPropsEntries = docPropDirectory->entries(); - if (docPropsEntries.contains(QStringLiteral("core.xml"))) { + const bool extractMetaData = result->inputFlags() & ExtractionResult::ExtractMetaData; + + if (extractMetaData && docPropsEntries.contains(QStringLiteral("core.xml"))) { QDomDocument coreDoc(QStringLiteral("core")); const KArchiveFile* file = static_cast<const KArchiveFile*>(docPropDirectory->entry(QStringLiteral("core.xml"))); coreDoc.setContent(file->data()); @@ -139,7 +141,7 @@ void Office2007Extractor::extract(Extrac } } - if (docPropsEntries.contains(QStringLiteral("app.xml"))) { + if (extractMetaData && docPropsEntries.contains(QStringLiteral("app.xml"))) { QDomDocument appDoc(QStringLiteral("app")); const KArchiveFile* file = static_cast<const KArchiveFile*>(docPropDirectory->entry(QStringLiteral("app.xml"))); appDoc.setContent(file->data());
  37. Download patch src/extractors/taglibextractor.json

    --- 5.70.0-1/src/extractors/taglibextractor.json 2020-05-02 22:18:13.000000000 +0000 +++ 5.71.0-0ubuntu2/src/extractors/taglibextractor.json 2020-06-07 18:27:04.000000000 +0000 @@ -10,6 +10,7 @@ "audio/opus" : { "Version" : "0.0" }, "audio/speex" : { "Version" : "0.0" }, "audio/wav" : { "Version" : "0.0" }, + "audio/vnd.audible.aax" : { "Version" : "0.0" }, "audio/x-aiff" : { "Version" : "0.0" }, "audio/x-aifc" : { "Version" : "0.0" }, "audio/x-ape" : { "Version" : "0.0" },
  38. Download patch src/extractors/popplerextractor.cpp

    --- 5.70.0-1/src/extractors/popplerextractor.cpp 2020-05-02 22:18:13.000000000 +0000 +++ 5.71.0-0ubuntu2/src/extractors/popplerextractor.cpp 2020-06-07 18:27:04.000000000 +0000 @@ -52,31 +52,33 @@ void PopplerExtractor::extract(Extractio result->addType(Type::Document); - QString title = pdfDoc->info(QStringLiteral("Title")).trimmed(); + if (result->inputFlags() & ExtractionResult::ExtractMetaData) { + QString title = pdfDoc->info(QStringLiteral("Title")).trimmed(); - if (!title.isEmpty()) { - result->add(Property::Title, title); - } - - QString subject = pdfDoc->info(QStringLiteral("Subject")); - if (!subject.isEmpty()) { - result->add(Property::Subject, subject); - } - - QString author = pdfDoc->info(QStringLiteral("Author")); - if (!author.isEmpty()) { - result->add(Property::Author, author); - } - - QString generator = pdfDoc->info(QStringLiteral("Producer")); - if (!generator.isEmpty()) { - result->add(Property::Generator, generator); - } - - QString creationDate = pdfDoc->info(QStringLiteral("CreationDate")); - if (!creationDate.isEmpty()) { - QByteArray utf8 = creationDate.toUtf8(); - result->add(Property::CreationDate, Poppler::convertDate(utf8.data())); + if (!title.isEmpty()) { + result->add(Property::Title, title); + } + + QString subject = pdfDoc->info(QStringLiteral("Subject")); + if (!subject.isEmpty()) { + result->add(Property::Subject, subject); + } + + QString author = pdfDoc->info(QStringLiteral("Author")); + if (!author.isEmpty()) { + result->add(Property::Author, author); + } + + QString generator = pdfDoc->info(QStringLiteral("Producer")); + if (!generator.isEmpty()) { + result->add(Property::Generator, generator); + } + + QString creationDate = pdfDoc->info(QStringLiteral("CreationDate")); + if (!creationDate.isEmpty()) { + QByteArray utf8 = creationDate.toUtf8(); + result->add(Property::CreationDate, Poppler::convertDate(utf8.data())); + } } if (!(result->inputFlags() & ExtractionResult::ExtractPlainText)) {
  39. Download patch autotests/indexerextractortests.h

    --- 5.70.0-1/autotests/indexerextractortests.h 2020-05-02 22:18:13.000000000 +0000 +++ 5.71.0-0ubuntu2/autotests/indexerextractortests.h 2020-06-07 18:27:04.000000000 +0000 @@ -35,6 +35,7 @@ private: QString testFilePath(const QString& fileName) const; private Q_SLOTS: + void testNoExtraction(); void benchMarkPlainTextExtractor(); void testPlainTextExtractor(); void testPlainTextExtractorNoPlainText();
  1. kfilemetadata-kf5