D18604: Implement support for writing rating information for taglib writer

Stefan BrĂ¼ns noreply at phabricator.kde.org
Thu Feb 28 22:52:27 GMT 2019


bruns added inline comments.

INLINE COMMENTS

> taglibwriter.cpp:80
> +    if (newProperties.contains(Property::Rating)) {
> +        int rating = newProperties.value(Property::Rating).toInt();
> +        id3Tags->removeFrames("POPM");

This requires a range check here - and then you can use a plain array for lookup.

> taglibwriter.cpp:89
> +
> +void writeVorbisAndApeTags(TagLib::PropertyMap &oldProperties, const PropertyMap &newProperties)
> +{

I think this should be split in
`writeApeTags(Taglib::APE::Tag *tags, PropertyMap) { ...; tags->setItem(...) }`
and
`writeXiphTags(Taglib::Ogg::XiphComment *tags, PropertyMap) {...; tags->addField(..., replace) }`

Thats much more in line with the other calls.

REPOSITORY
  R286 KFileMetaData

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

To: astippich, bruns, mgallien
Cc: kde-frameworks-devel, #baloo, 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/20190228/034aff88/attachment-0001.html>


More information about the Kde-frameworks-devel mailing list