Script 'mail_helper' called by obssrc
Hello community,
here is the log from the commit of package kf6-kfilemetadata for
openSUSE:Factory checked in at 2026-09-11 17:59:43
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/kf6-kfilemetadata (Old)
and /work/SRC/openSUSE:Factory/.kf6-kfilemetadata.new.1265 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "kf6-kfilemetadata"
Fri Sep 11 17:59:43 2026 rev:31 rq:1376693 version:6.30.0
Changes:
--------
--- /work/SRC/openSUSE:Factory/kf6-kfilemetadata/kf6-kfilemetadata.changes
2026-08-17 16:59:27.134006020 +0200
+++
/work/SRC/openSUSE:Factory/.kf6-kfilemetadata.new.1265/kf6-kfilemetadata.changes
2026-09-11 18:02:00.856555452 +0200
@@ -1,0 +2,20 @@
+Tue Sep 8 09:22:02 UTC 2026 - Christophe Marin <[email protected]>
+
+- Update to 6.30.0
+ * New feature release
+ * For more details please see:
+ * https://kde.org/announcements/frameworks/6/6.30.0
+- Changes since 6.29.0:
+ * Update dependency version to 6.30.0
+ * [PostscriptDscExtractor] Fix time offset parsing for Qt 6.12
+ * [PostscriptDscExtractor] Modernize QString usage
+ * [SimpleExtractionResult] Fix copy constructor
+ * [EmbeddedImageData] Remove some dead, unreachable code and data
+ * Fix a few nodiscard warnings for QFile::open
+ * [ExtractorPlugin] Allow alias names when matching extractor mimetypes
(kde#522678)
+ * [kfilemetadata_dump] Provide information about cover images etc
+ * [FFmpegExtractor] Extract cover image from Matroska streams
+ * [FFmpegExtractorTest] Move test class declaration to implementation file
+ * Update version to 6.30.0
+
+-------------------------------------------------------------------
Old:
----
kfilemetadata-6.29.0.tar.xz
kfilemetadata-6.29.0.tar.xz.sig
New:
----
kfilemetadata-6.30.0.tar.xz
kfilemetadata-6.30.0.tar.xz.sig
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ kf6-kfilemetadata.spec ++++++
--- /var/tmp/diff_new_pack.ICtPm8/_old 2026-09-11 18:02:01.879598034 +0200
+++ /var/tmp/diff_new_pack.ICtPm8/_new 2026-09-11 18:02:01.882598159 +0200
@@ -19,12 +19,12 @@
%define qt6_version 6.9.0
%define rname kfilemetadata
-# Full KF6 version (e.g. 6.29.0)
+# Full KF6 version (e.g. 6.30.0)
%{!?_kf6_version: %global _kf6_version %{version}}
%bcond_without ffmpeg
%bcond_without released
Name: kf6-kfilemetadata
-Version: 6.29.0
+Version: 6.30.0
Release: 0
Summary: Library for extracting Metadata
License: GPL-2.0-or-later AND LGPL-2.1-or-later AND LGPL-3.0-only
++++++ kfilemetadata-6.29.0.tar.xz -> kfilemetadata-6.30.0.tar.xz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/kfilemetadata-6.29.0/.gitlab-ci.yml
new/kfilemetadata-6.30.0/.gitlab-ci.yml
--- old/kfilemetadata-6.29.0/.gitlab-ci.yml 2026-08-07 22:40:20.000000000
+0200
+++ new/kfilemetadata-6.30.0/.gitlab-ci.yml 2026-09-04 13:38:25.000000000
+0200
@@ -5,7 +5,7 @@
- project: sysadmin/ci-utilities
file:
- /gitlab-templates/linux-qt6.yml
- # - /gitlab-templates/linux-qt6-next.yml
+ - /gitlab-templates/linux-qt6-next.yml
- /gitlab-templates/freebsd-qt6.yml
- /gitlab-templates/windows-qt6.yml
- /gitlab-templates/xml-lint.yml
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/kfilemetadata-6.29.0/CMakeLists.txt
new/kfilemetadata-6.30.0/CMakeLists.txt
--- old/kfilemetadata-6.29.0/CMakeLists.txt 2026-08-07 22:40:20.000000000
+0200
+++ new/kfilemetadata-6.30.0/CMakeLists.txt 2026-09-04 13:38:25.000000000
+0200
@@ -1,11 +1,11 @@
cmake_minimum_required(VERSION 3.29)
-set(KF_VERSION "6.29.0") # handled by release scripts
-set(KF_DEP_VERSION "6.29.0") # handled by release scripts
+set(KF_VERSION "6.30.0") # handled by release scripts
+set(KF_DEP_VERSION "6.30.0") # handled by release scripts
project(KFileMetaData VERSION ${KF_VERSION})
include(FeatureSummary)
-find_package(ECM 6.29.0 NO_MODULE)
+find_package(ECM 6.30.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)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/kfilemetadata-6.29.0/autotests/extractorcoveragetest.cpp
new/kfilemetadata-6.30.0/autotests/extractorcoveragetest.cpp
--- old/kfilemetadata-6.29.0/autotests/extractorcoveragetest.cpp
2026-08-07 22:40:20.000000000 +0200
+++ new/kfilemetadata-6.30.0/autotests/extractorcoveragetest.cpp
2026-09-04 13:38:25.000000000 +0200
@@ -76,6 +76,7 @@
{ "test_missing_content.odt",
"application/vnd.oasis.opendocument.text"},
{ "test_missing_meta.odt",
"application/vnd.oasis.opendocument.text"},
{ "test.mkv", "video/x-matroska"},
+ { "test_cover.mkv", "video/x-matroska"},
{ "test.mp3", "audio/mpeg"},
{ "test.id3v1.mp3", "audio/mpeg"},
{ "test.aax", "audio/vnd.audible.aax"},
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/kfilemetadata-6.29.0/autotests/ffmpegextractortest.cpp
new/kfilemetadata-6.30.0/autotests/ffmpegextractortest.cpp
--- old/kfilemetadata-6.29.0/autotests/ffmpegextractortest.cpp 2026-08-07
22:40:20.000000000 +0200
+++ new/kfilemetadata-6.30.0/autotests/ffmpegextractortest.cpp 2026-09-04
13:38:25.000000000 +0200
@@ -4,15 +4,38 @@
SPDX-License-Identifier: LGPL-2.1-or-later
*/
-#include "ffmpegextractortest.h"
#include "simpleextractionresult.h"
#include "indexerextractortestsconfig.h"
#include "extractors/ffmpegextractor.h"
#include "mimeutils.h"
+#include <QMimeDatabase>
+#include <QObject>
#include <QTest>
using namespace KFileMetaData;
+using namespace Qt::StringLiterals;
+
+namespace KFileMetaData {
+class ffmpegExtractorTest : public QObject
+{
+ Q_OBJECT
+
+private Q_SLOTS:
+ void initTestCase();
+ void testNoExtraction();
+ void testVideoProperties();
+ void testVideoProperties_data();
+ void testMetaData();
+ void testMetaData_data();
+ void testCoverimage();
+ void testCoverimage_data();
+
+private:
+ QMimeDatabase mimeDb;
+ QByteArray m_coverImage;
+};
+} // namespace KFileMetaData
namespace {
@@ -24,6 +47,13 @@
} // namespace
+void ffmpegExtractorTest::initTestCase()
+{
+ QFile imgFile(testFilePath(u"cover"_s, u"jpg"_s));
+ QVERIFY(imgFile.open(QIODevice::ReadOnly));
+ m_coverImage = imgFile.readAll();
+}
+
void ffmpegExtractorTest::testNoExtraction()
{
QString fileName = testFilePath(QStringLiteral("test"),
QStringLiteral("webm"));
@@ -147,6 +177,44 @@
QCOMPARE(result.properties().value(Property::Artist).toString(),
QStringLiteral("Artist"));
QCOMPARE(result.properties().value(Property::ReleaseYear).toInt(), 2019);
}
+
+void ffmpegExtractorTest::testCoverimage_data()
+{
+ using IT = EmbeddedImageData::ImageType;
+ QTest::addColumn<QString>("baseName");
+ QTest::addColumn<QString>("fileType");
+ QTest::addColumn<QList<IT>>("coverTypes");
+
+ // clang-format off
+ QTest::addRow("Matroska Video") << u"test"_s << u"mkv"_s
<< QList<IT>();
+ QTest::addRow("Matroska Video with cover") << u"test_cover"_s << u"mkv"_s
<< QList<IT>{IT::FrontCover};
+ // clang-format on
+}
+
+void ffmpegExtractorTest::testCoverimage()
+{
+ QFETCH(QString, baseName);
+ QFETCH(QString, fileType);
+ QFETCH(QList<EmbeddedImageData::ImageType>, coverTypes);
+
+ const QString fileName = testFilePath(baseName, fileType);
+ const QString mimeType = MimeUtils::strictMimeType(fileName,
mimeDb).name();
+
+ FFmpegExtractor plugin{this};
+
+ SimpleExtractionResult result(fileName, mimeType,
ExtractionResult::ExtractImageData);
+ plugin.extract(&result);
+
+ const auto imageMap = result.imageData();
+ QCOMPARE(imageMap.size(), coverTypes.size());
+ for (const auto type : coverTypes) {
+ QVERIFY(imageMap.contains(type));
+ }
+ for (const auto [type, imageData]: imageMap.asKeyValueRange()) {
+ QCOMPARE(imageData, m_coverImage);
+ }
+}
+
QTEST_GUILESS_MAIN(ffmpegExtractorTest)
-#include "moc_ffmpegextractortest.cpp"
+#include "ffmpegextractortest.moc"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/kfilemetadata-6.29.0/autotests/ffmpegextractortest.h
new/kfilemetadata-6.30.0/autotests/ffmpegextractortest.h
--- old/kfilemetadata-6.29.0/autotests/ffmpegextractortest.h 2026-08-07
22:40:20.000000000 +0200
+++ new/kfilemetadata-6.30.0/autotests/ffmpegextractortest.h 1970-01-01
01:00:00.000000000 +0100
@@ -1,31 +0,0 @@
-/*
- SPDX-FileCopyrightText: 2019 Alexander Stippich <[email protected]>
-
- SPDX-License-Identifier: LGPL-2.1-or-later
-*/
-
-#ifndef FFMPEGEXTRACTORTEST_H
-#define FFMPEGEXTRACTORTEST_H
-
-#include <QObject>
-#include <QMimeDatabase>
-
-namespace KFileMetaData {
-
-class ffmpegExtractorTest : public QObject
-{
- Q_OBJECT
-
-private Q_SLOTS:
- void testNoExtraction();
- void testVideoProperties();
- void testVideoProperties_data();
- void testMetaData();
- void testMetaData_data();
-
-private:
- QMimeDatabase mimeDb;
-};
-} // namespace KFileMetaData
-
-#endif // FFMPEGEXTRACTORTEST_H
Binary files old/kfilemetadata-6.29.0/autotests/samplefiles/test_cover.mkv and
new/kfilemetadata-6.30.0/autotests/samplefiles/test_cover.mkv differ
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/kfilemetadata-6.29.0/autotests/taglibextractortest.cpp
new/kfilemetadata-6.30.0/autotests/taglibextractortest.cpp
--- old/kfilemetadata-6.29.0/autotests/taglibextractortest.cpp 2026-08-07
22:40:20.000000000 +0200
+++ new/kfilemetadata-6.30.0/autotests/taglibextractortest.cpp 2026-09-04
13:38:25.000000000 +0200
@@ -75,7 +75,7 @@
void TagLibExtractorTest::initTestCase()
{
QFile imgFile(testFilePath(QStringLiteral("cover.jpg")));
- imgFile.open(QIODevice::ReadOnly);
+ QVERIFY(imgFile.open(QIODevice::ReadOnly));
m_coverImage = imgFile.readAll();
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/kfilemetadata-6.29.0/autotests/taglibwritertest.cpp
new/kfilemetadata-6.30.0/autotests/taglibwritertest.cpp
--- old/kfilemetadata-6.29.0/autotests/taglibwritertest.cpp 2026-08-07
22:40:20.000000000 +0200
+++ new/kfilemetadata-6.30.0/autotests/taglibwritertest.cpp 2026-09-04
13:38:25.000000000 +0200
@@ -88,7 +88,7 @@
QVERIFY(QDir().mkpath(testOutputPath({})));
QFile imgFile(testFilePath(QStringLiteral("cover.jpg")));
- imgFile.open(QIODevice::ReadOnly);
+ QVERIFY(imgFile.open(QIODevice::ReadOnly));
m_coverImage = imgFile.readAll();
}
@@ -801,7 +801,7 @@
WriteData data(testFileName, mimeType);
QFile imgFile(testFilePath(QStringLiteral("test.jpg")));
- imgFile.open(QIODevice::ReadOnly);
+ QVERIFY(imgFile.open(QIODevice::ReadOnly));
QMap<EmbeddedImageData::ImageType, QByteArray> delImages;
QMap<EmbeddedImageData::ImageType, QByteArray> writeImages;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/kfilemetadata-6.29.0/po/ca/kfilemetadata6.po
new/kfilemetadata-6.30.0/po/ca/kfilemetadata6.po
--- old/kfilemetadata-6.29.0/po/ca/kfilemetadata6.po 2026-08-07
22:40:20.000000000 +0200
+++ new/kfilemetadata-6.30.0/po/ca/kfilemetadata6.po 2026-09-04
13:38:25.000000000 +0200
@@ -3,8 +3,8 @@
# This file is distributed under the license LGPL version 2.1 or
# version 3 or later versions approved by the membership of KDE e.V.
#
-# SPDX-FileCopyrightText: 2014, 2015, 2016, 2017, 2018, 2019, 2022, 2023,
2024, 2025 Josep M. Ferrer <[email protected]>
-# SPDX-FileCopyrightText: 2014, 2015 Antoni Bella Pérez
<[email protected]>
+# SPDX-FileCopyrightText: 2014-2019, 2022-2025 Josep M. Ferrer
<[email protected]>
+# SPDX-FileCopyrightText: 2014-2015 Antoni Bella Pérez <[email protected]>
msgid ""
msgstr ""
"Project-Id-Version: kfilemetadata\n"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/kfilemetadata-6.29.0/src/embeddedimagedata.cpp
new/kfilemetadata-6.30.0/src/embeddedimagedata.cpp
--- old/kfilemetadata-6.29.0/src/embeddedimagedata.cpp 2026-08-07
22:40:20.000000000 +0200
+++ new/kfilemetadata-6.30.0/src/embeddedimagedata.cpp 2026-09-04
13:38:25.000000000 +0200
@@ -6,39 +6,9 @@
#include "embeddedimagedata.h"
-#include <QMimeDatabase>
-
using namespace KFileMetaData;
-class Q_DECL_HIDDEN EmbeddedImageData::Private
-{
-public:
- QMimeDatabase mMimeDatabase;
- static const QStringList mMimetypes;
-};
-
-const QStringList EmbeddedImageData::Private::mMimetypes =
-{
- QStringLiteral("audio/flac"),
- QStringLiteral("audio/mp4"),
- QStringLiteral("audio/mpeg"),
- QStringLiteral("audio/ogg"),
- QStringLiteral("audio/wav"),
- QStringLiteral("audio/x-aiff"),
- QStringLiteral("audio/x-ape"),
- QStringLiteral("audio/x-ms-wma"),
- QStringLiteral("audio/x-musepack"),
- QStringLiteral("audio/x-opus+ogg"),
- QStringLiteral("audio/x-speex+ogg"),
- QStringLiteral("audio/x-vorbis+ogg"),
- QStringLiteral("audio/x-wav"),
- QStringLiteral("audio/x-wavpack"),
-};
-
-EmbeddedImageData::EmbeddedImageData()
- : d(std::unique_ptr<Private>(new Private()))
-{
-}
+EmbeddedImageData::EmbeddedImageData() = default;
EmbeddedImageData::~EmbeddedImageData()
= default;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/kfilemetadata-6.29.0/src/embeddedimagedata.h
new/kfilemetadata-6.30.0/src/embeddedimagedata.h
--- old/kfilemetadata-6.29.0/src/embeddedimagedata.h 2026-08-07
22:40:20.000000000 +0200
+++ new/kfilemetadata-6.30.0/src/embeddedimagedata.h 2026-09-04
13:38:25.000000000 +0200
@@ -9,11 +9,8 @@
#define KFILEMETADATA_EMBEDDEDIMAGEDATA_H
#include "kfilemetadata_export.h"
-#include <QByteArray>
#include <QFlags>
-#include <QMap>
#include <QMetaType>
-#include <memory>
namespace KFileMetaData {
@@ -86,8 +83,7 @@
Q_DECLARE_FLAGS(ImageTypes, ImageType)
private:
- class Private;
- std::unique_ptr<Private> d;
+ void *d = nullptr; // BIC placeholder
EmbeddedImageData& operator=(const EmbeddedImageData&) = delete;
};
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/kfilemetadata-6.29.0/src/externalextractor.cpp
new/kfilemetadata-6.30.0/src/externalextractor.cpp
--- old/kfilemetadata-6.29.0/src/externalextractor.cpp 2026-08-07
22:40:20.000000000 +0200
+++ new/kfilemetadata-6.30.0/src/externalextractor.cpp 2026-09-04
13:38:25.000000000 +0200
@@ -46,15 +46,13 @@
d->path = pluginPath;
QDir pluginDir(pluginPath);
- QStringList pluginDirContents = pluginDir.entryList(QDir::Files |
QDir::NoDotAndDotDot);
- if (!pluginDirContents.contains(QStringLiteral("manifest.json"))) {
+ QFile manifest(pluginDir.filePath(QStringLiteral("manifest.json")));
+ if (!manifest.open(QIODevice::ReadOnly)) {
qCDebug(KFILEMETADATA_LOG) << pluginPath << "does not seem to contain
a valid plugin";
return;
}
- QFile manifest(pluginDir.filePath(QStringLiteral("manifest.json")));
- manifest.open(QIODevice::ReadOnly);
QJsonDocument manifestDoc = QJsonDocument::fromJson(manifest.readAll());
if (!manifestDoc.isObject()) {
qCDebug(KFILEMETADATA_LOG) << "Manifest does not seem to be a valid
JSON Object";
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/kfilemetadata-6.29.0/src/externalwriter.cpp
new/kfilemetadata-6.30.0/src/externalwriter.cpp
--- old/kfilemetadata-6.29.0/src/externalwriter.cpp 2026-08-07
22:40:20.000000000 +0200
+++ new/kfilemetadata-6.30.0/src/externalwriter.cpp 2026-09-04
13:38:25.000000000 +0200
@@ -43,15 +43,13 @@
d->path = pluginPath;
QDir pluginDir(pluginPath);
- QStringList pluginDirContents = pluginDir.entryList();
- if (!pluginDirContents.contains(QStringLiteral("manifest.json"))) {
+ QFile manifest(pluginDir.filePath(QStringLiteral("manifest.json")));
+ if (!manifest.open(QIODevice::ReadOnly)) {
qCDebug(KFILEMETADATA_LOG) << "Path does not seem to contain a valid
plugin";
return;
}
- QFile manifest(pluginDir.filePath(QStringLiteral("manifest.json")));
- manifest.open(QIODevice::ReadOnly);
QJsonDocument manifestDoc = QJsonDocument::fromJson(manifest.readAll());
if (!manifestDoc.isObject()) {
qCDebug(KFILEMETADATA_LOG) << "Manifest does not seem to be a valid
JSON Object";
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/kfilemetadata-6.29.0/src/extractorcollection.cpp
new/kfilemetadata-6.30.0/src/extractorcollection.cpp
--- old/kfilemetadata-6.29.0/src/extractorcollection.cpp 2026-08-07
22:40:20.000000000 +0200
+++ new/kfilemetadata-6.30.0/src/extractorcollection.cpp 2026-09-04
13:38:25.000000000 +0200
@@ -165,9 +165,18 @@
return plugins;
}
- // try to find the best matching more generic extractor by mimetype
inheritance
QMimeDatabase db;
auto type = db.mimeTypeForName(mimetype);
+ const QStringList aliases = type.aliases();
+ for (const auto &alias: aliases) {
+ QList<Extractor*> plugins = d->getExtractors(alias);
+ if (!plugins.isEmpty()) {
+ qCDebug(KFILEMETADATA_LOG) << "Using deprecated mimetype" << alias
<< "for" << mimetype;
+ return plugins;
+ }
+ }
+
+ // try to find the best matching more generic extractor by mimetype
inheritance
const QStringList ancestors = type.allAncestors();
for (const auto &ancestor : ancestors) {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/kfilemetadata-6.29.0/src/extractorplugin.cpp
new/kfilemetadata-6.30.0/src/extractorplugin.cpp
--- old/kfilemetadata-6.29.0/src/extractorplugin.cpp 2026-08-07
22:40:20.000000000 +0200
+++ new/kfilemetadata-6.30.0/src/extractorplugin.cpp 2026-09-04
13:38:25.000000000 +0200
@@ -72,13 +72,20 @@
QMimeDatabase db;
auto type = db.mimeTypeForName(mimetype);
+
+ const QStringList aliases = type.aliases();
+ for (auto alias : aliases) {
+ if (allTypes.contains(alias)) {
+ return alias;
+ }
+ }
+
const QStringList ancestors = type.allAncestors();
for (auto ancestor : ancestors) {
if (allTypes.contains(ancestor)) {
return ancestor;
}
}
-
return QString();
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/kfilemetadata-6.29.0/src/extractors/ffmpegextractor.cpp
new/kfilemetadata-6.30.0/src/extractors/ffmpegextractor.cpp
--- old/kfilemetadata-6.29.0/src/extractors/ffmpegextractor.cpp 2026-08-07
22:40:20.000000000 +0200
+++ new/kfilemetadata-6.30.0/src/extractors/ffmpegextractor.cpp 2026-09-04
13:38:25.000000000 +0200
@@ -10,6 +10,7 @@
#include "ffmpegextractor.h"
+#include "embeddedimagedata.h"
#include "kfilemetadata_debug.h"
#ifdef __cplusplus
@@ -30,6 +31,36 @@
using namespace KFileMetaData;
+namespace {
+QMap<EmbeddedImageData::ImageType, QByteArray>
+extractCover(const AVStream* stream)
+{
+ if (const auto e = av_dict_get(stream->metadata, "filename", nullptr, 0)) {
+ const std::string_view value{e->value};
+ if (!(value.starts_with("cover") || value.starts_with("small_cover")))
{
+ qCDebug(KFILEMETADATA_LOG) << "Ignore attached" << value;
+ return {};
+ }
+ if (!(value.ends_with(".png") || value.ends_with(".jpg") ||
value.ends_with(".jpeg"))) {
+ qCDebug(KFILEMETADATA_LOG) << "Ignore attached" << value;
+ return {};
+ }
+ }
+ if (const auto e = av_dict_get(stream->metadata, "mimetype", nullptr, 0)) {
+ const std::string_view value{e->value};
+ if (!value.starts_with("image/")) {
+ qCDebug(KFILEMETADATA_LOG) << "Ignore attached file with type" <<
value;
+ return {};
+ }
+ }
+ const auto &ap = stream->attached_pic;
+ if (!(ap.data && ap.size)) {
+ return {};
+ }
+ return {std::pair{EmbeddedImageData::FrontCover,
QByteArray{QByteArrayView(ap.data, ap.size)}}};
+}
+} // namespace <anonymous>
+
FFmpegExtractor::FFmpegExtractor(QObject* parent)
: ExtractorPlugin(parent)
{
@@ -88,7 +119,7 @@
result->addType(Type::Video);
- if (result->inputFlags() & ExtractionResult::ExtractMetaData) {
+ if (result->inputFlags() & (ExtractionResult::ExtractMetaData |
ExtractionResult::ExtractImageData)) {
int totalSecs = fmt_ctx->duration / AV_TIME_BASE;
int bitrate = fmt_ctx->bit_rate;
@@ -96,12 +127,24 @@
result->add(Property::BitRate, bitrate);
const int index_stream = av_find_default_stream_index(fmt_ctx);
- if (index_stream >= 0) {
- AVStream* stream = fmt_ctx->streams[index_stream];
+
+ for (unsigned int index = 0; index < fmt_ctx->nb_streams; index++) {
+ AVStream* stream = fmt_ctx->streams[index];
const AVCodecParameters* codec = stream->codecpar;
if (codec->codec_type == AVMEDIA_TYPE_VIDEO) {
+ if (stream->disposition & AV_DISPOSITION_ATTACHED_PIC) {
+ if (auto images = extractCover(stream); !images.isEmpty())
{
+ result->addImageData(std::move(images));
+ }
+ continue;
+ } else if (index_stream < 0) {
+ continue;
+ } else if (unsigned int t = index_stream; index != t) {
+ continue;
+ }
+
result->add(Property::Width, codec->width);
result->add(Property::Height, codec->height);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/kfilemetadata-6.29.0/src/extractors/postscriptdscextractor.cpp
new/kfilemetadata-6.30.0/src/extractors/postscriptdscextractor.cpp
--- old/kfilemetadata-6.29.0/src/extractors/postscriptdscextractor.cpp
2026-08-07 22:40:20.000000000 +0200
+++ new/kfilemetadata-6.30.0/src/extractors/postscriptdscextractor.cpp
2026-09-04 13:38:25.000000000 +0200
@@ -9,8 +9,11 @@
#include "kfilemetadata_debug.h"
#include <QFile>
+#include <QLibraryInfo>
#include <QTimeZone>
+using namespace Qt::StringLiterals;
+
namespace KFileMetaData
{
@@ -20,13 +23,14 @@
}
+const QStringList supportedMimeTypes = {
+ u"application/postscript"_s,
+ u"image/x-eps"_s,
+};
+
QStringList DscExtractor::mimetypes() const
{
- QStringList list;
- list << QStringLiteral("application/postscript")
- << QStringLiteral("image/x-eps");
-
- return list;
+ return supportedMimeTypes;
}
void DscExtractor::extract(ExtractionResult* result)
@@ -81,16 +85,20 @@
}
if (date.startsWith(QLatin1String("D:")) && date.size() >= 23) {
// Standard PDF date format, ASN.1 like -
(D:YYYYMMDDHHmmSSOHH'mm')
- auto dt = QDateTime::fromString(date.mid(2, 14).toString(),
QLatin1String("yyyyMMddhhmmss"));
- auto offset = QTime::fromString(date.mid(17, 5).toString(),
QLatin1String("hh'\\''mm"));
+ auto dt = QDateTime::fromString(date.mid(2, 14),
u"yyyyMMddhhmmss"_sv);
+ const auto offset = (QLibraryInfo::version() <
QVersionNumber(6, 12))
+ ? QTime::fromString(date.mid(17, 5), u"hh'\\''mm"_sv)
+ : QTime::fromString(date.mid(17, 5), u"hh''mm"_sv);
+
+ const auto seconds = QTime(0, 0).secsTo(offset);
if (date.at(16) == QLatin1Char('+')) {
- dt.setTimeZone(QTimeZone::fromSecondsAheadOfUtc(QTime(0,
0).secsTo(offset)));
+ dt.setTimeZone(QTimeZone::fromSecondsAheadOfUtc(seconds));
} else {
- dt.setTimeZone(QTimeZone::fromSecondsAheadOfUtc(-1 *
QTime(0, 0).secsTo(offset)));
+ dt.setTimeZone(QTimeZone::fromSecondsAheadOfUtc(-1 *
seconds));
}
result->add(Property::CreationDate, dt);
} else {
- auto dt = QDateTime::fromString(date.toString());
+ auto dt = QDateTime::fromString(date);
if (dt.isValid()) {
result->add(Property::CreationDate, dt);
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/kfilemetadata-6.29.0/src/simpleextractionresult.cpp
new/kfilemetadata-6.30.0/src/simpleextractionresult.cpp
--- old/kfilemetadata-6.29.0/src/simpleextractionresult.cpp 2026-08-07
22:40:20.000000000 +0200
+++ new/kfilemetadata-6.30.0/src/simpleextractionresult.cpp 2026-09-04
13:38:25.000000000 +0200
@@ -23,7 +23,7 @@
}
SimpleExtractionResult::SimpleExtractionResult(const SimpleExtractionResult&
rhs)
- : ExtractionResult(*this)
+ : ExtractionResult(rhs)
, d(new SimpleExtractionResultPrivate(*rhs.d))
{
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/kfilemetadata-6.29.0/tests/dump.cpp
new/kfilemetadata-6.30.0/tests/dump.cpp
--- old/kfilemetadata-6.29.0/tests/dump.cpp 2026-08-07 22:40:20.000000000
+0200
+++ new/kfilemetadata-6.30.0/tests/dump.cpp 2026-09-04 13:38:25.000000000
+0200
@@ -4,10 +4,12 @@
SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR
LicenseRef-KDE-Accepted-LGPL
*/
-#include <QGuiApplication>
+#include <QBuffer>
#include <QCommandLineParser>
#include <QDebug>
#include <QFileInfo>
+#include <QGuiApplication>
+#include <QImageReader>
#include <QMimeDatabase>
#include <QTextStream>
@@ -36,8 +38,8 @@
using KFileMetaData::ExtractionResult;
const ExtractionResult::Flags extractionLevel = (extractFulltext
- ? ExtractionResult::ExtractMetaData |
ExtractionResult::ExtractPlainText
- : ExtractionResult::ExtractMetaData);
+ ? ExtractionResult::ExtractMetaData |
ExtractionResult::ExtractImageData | ExtractionResult::ExtractPlainText
+ : ExtractionResult::ExtractMetaData |
ExtractionResult::ExtractImageData);
auto fi = QFileInfo(parser.positionalArguments().at(0));
QString url = fi.absoluteFilePath();
@@ -86,6 +88,19 @@
out << "\t\t" <<
KFileMetaData::PropertyInfo(it.key()).displayName() << ": "
<< it.value().toString() << " (" << it.value().typeName() <<
")\n";
}
+ const auto imageMap = result.imageData();
+ if (!imageMap.empty()) {
+ out << "\t\tImages:\n";
+ for (const auto [type, imageData]: imageMap.asKeyValueRange()) {
+ QBuffer buffer;
+ buffer.setData(imageData);
+ std::ignore = buffer.open(QIODevice::ReadOnly);
+ QImageReader reader(&buffer);
+ auto format = reader.format();
+ const auto image = reader.read();
+ out << "\t\t " << type << " " << format << " " <<
image.width() << "x" << image.height() << "\n";
+ }
+ }
if (extractFulltext) {
out << "\t\tText: " << result.text() << "\n";
}