Currently, one can write and read through taglib extractor and writer
plugins. Unfortunately, some "smart" transformation on the data are
applied when reading them. This does not allow to read exactly what was
written.
BUG: 408532
Currently, one can write and read through taglib extractor and writer
plugins. Unfortunately, some "smart" transformation on the data are
applied when reading them. This does not allow to read exactly what was
written.
BUG: 408532
New automatic test is OK, no regressions.
Automatic diff as part of commit; lint not applicable. |
Automatic diff as part of commit; unit tests not applicable. |
IMHO for searching, the separation from a single string into multiple entries is the best thing to do, from a metadata editing point of view not so much.
How about inserting the TStringList entry by entry, without using the contactsFromString method? That would maintain the exact representation of metadata tags also for the baloo database.
When searching is left to baloo, it already splits up strings at whitespace etc., so you can provide the string as is.
As far as I can see, in some cases (e.g. "ARTIST"), the Taglib::StringList PropertyMap::operator[] is first joined (.toString(';')) and then split again. How about avoiding that in the first place?
Great, that we don't have to worry about that.
As far as I can see, in some cases (e.g. "ARTIST"), the Taglib::StringList PropertyMap::operator[] is first joined (.toString(';')) and then split again. How about avoiding that in the first place?
That's what I meant. That was the easy way before because of the contactsFromString function, but if KFM individually adds each entry of the TStringList returned from TagLib's PropertyMap, all will be fine.
Please also adjust "Conductor", "Arranger", "Performer and "Author" for consistency
@mgallien Are you going to update? There are bug reports which will also be fixed by this, so it would be nice to get this in.
Or do you mind if I take over?
I would like but I am quite busy with real life. If you feel like working on this, that would be really great.
autotests/taglibwritertest.cpp | ||
---|---|---|
557 | const map<Property, QString> properties = { {Artist, "Artist", ...}; for (property : properties) { data.add(...); } write(data); exxtractResult(...); for (property: properties) { QCOMPARE(...); } | |
579 | fileExtension | |
src/extractors/taglibextractor.cpp | ||
169 | 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). | |
354 | is this always just one value, or a list as well? |
src/extractors/taglibextractor.cpp | ||
---|---|---|
354 | as far as I know, asf only allows single entry tags, so just a single value |