D20526: Fix extracting of some properties to match what was written

Stefan BrĂ¼ns noreply at phabricator.kde.org
Sat Jun 29 16:35:46 BST 2019


bruns added inline comments.

INLINE COMMENTS

> taglibwritertest.cpp:556
> +
> +    data.add(Property::Artist, QStringLiteral("Artist1 feat Artist2"));
> +    data.add(Property::AlbumArtist, QStringLiteral("Artist1 feat. Artist2"));

const map<Property, QString> properties = { {Artist, "Artist", ...};
  for (property : properties) {
    data.add(...);
  }
  
  write(data);
  exxtractResult(...);
  
  for (property: properties) {
    QCOMPARE(...);
  }

> taglibwritertest.cpp:578
> +{
> +    QTest::addColumn<QString>("fileType");
> +    QTest::addColumn<QString>("mimeType");

fileExtension

> taglibextractor.cpp:171
>          for (const auto& artist : artists) {
> -            result->add(Property::Artist, artist);
> +            result->add(Property::Artist, TStringToQString(artist));
>          }

There is a small mismatch between this one (and all others below) and e.g. "LYRICS" above - one uses `trimmed()`, the other does not.

IMHO, all properties should be trimmed (though we risk not being roundtrip-save).

> taglibextractor.cpp:356
>      lstASF = asfTags->attribute("Author");
>      if (!lstASF.isEmpty()) {
>          const auto attribute = lstASF.front();

is this always just one value, or a list as well?

REPOSITORY
  R286 KFileMetaData

REVISION DETAIL
  https://phabricator.kde.org/D20526

To: astippich, bruns, mgallien
Cc: kde-frameworks-devel, #baloo, LeGast00n, fbampaloukas, domson, ashaposhnikov, michaelh, astippich, spoorun, ngraham, bruns, abrahams
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20190629/4353ddc0/attachment-0001.html>


More information about the Kde-frameworks-devel mailing list