D12156: implement reading of rating tag

Matthieu Gallien noreply at phabricator.kde.org
Wed Apr 18 20:14:09 UTC 2018


mgallien added a comment.


  Thanks.
  Fix one issue and we should be good to go.
  Another nice thing is that we should have a portable way to have ratings in Elisa that could be read or write somewhere else.

INLINE COMMENTS

> taglibextractor.cpp:222-234
> +            if (temp == 0) {
> +                data.rating = 0;
> +            } else if (temp >= 1 && temp <= 31) {
> +                data.rating = 2;
> +            } else if (temp >= 32 && temp <= 95) {
> +                data.rating = 4;
> +            } else if (temp >= 96 && temp <= 159) {

You can and should be using all intermediate values. If I remember correctly, in dolphin, you can set all values between 0 and 10. This is done by half blue stars.
Can you use modulo instead of embedded if ?

REPOSITORY
  R286 KFileMetaData

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

To: astippich, mgallien, michaelh
Cc: #frameworks, ashaposhnikov, michaelh, astippich, spoorun, bruns
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20180418/9be5581a/attachment.html>


More information about the Kde-frameworks-devel mailing list