use rating and comment stored in metadata tags
ClosedPublic

Authored by astippich on Oct 21 2018, 7:16 PM.

Details

Summary

if no xattr rating and comment are found, use the
data stored in the metadata. First step for T5375
CCBUG: 395735

Test Plan

Create an audio file with rating written into the metadata.
The rating shows up in Elisa.
If xattr rating is set through dolphin, this rating is shown instead.
Same for comment

Diff Detail

Repository
R255 Elisa
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
astippich requested review of this revision.Oct 21 2018, 7:16 PM
astippich created this revision.
astippich edited the summary of this revision. (Show Details)Oct 21 2018, 7:18 PM
astippich added a project: Elisa.
mgallien added inline comments.Oct 26 2018, 5:03 AM
src/filescanner.cpp
199–203

I had believed that the data stored in Baloo would always be used regardless of what is stored in the format specific metadata. What is your idea ?

206–212

Same question.

astippich added inline comments.Oct 31 2018, 9:32 PM
src/filescanner.cpp
199–203

Could you rephrase please? I don't fully understand your question.
For now, the idea is to fallback to the metadata stored in the files if xattr data is not available.
So in case no xattr rating is set through e.g. dolphin, Elisa will show a rating if one is found within the file specific metadata.
Supporting the ratings tag was requested by users.
Note that we can only resolve (if at all) the issues of having two sources for the same metadata if writing these tags is possible, which I'm slowly working towards

mgallien added inline comments.Nov 2 2018, 9:14 AM
src/filescanner.cpp
199–203

Sorry for my bad English.
My question is about the long term plan for music ratings in Elisa, Dolphin and other software using KFileMetaData.
My understanding was that you wanted to keep using the extended attributes.

astippich added inline comments.Nov 2 2018, 8:06 PM
src/filescanner.cpp
199–203

Long term plan is to write to both fields once KFileMetaData supports writing the rating, though that also has the disadvantage that the modification time is changed.
In the meantime, Dolphin is currently only showing the xattr ratings, the file specific rating is hidden (like it is done with the comment).
Elisa will fall back to file specific information as an interim solution.
When writing is supported, the "only" issue is potentially conflicting rating data, which the applications have to solve. But hopefully this is only rarily the case.

mgallien accepted this revision.Nov 17 2018, 8:36 AM

Sorry for the delay

This revision is now accepted and ready to land.Nov 17 2018, 8:36 AM
This revision was automatically updated to reflect the committed changes.