file browser: pick up star ratings from the image metadata if available

(cherry picked from commit 98f0675b2e419d18bd88259997b81bcbcc4e5c96)
This commit is contained in:
Alberto Griggio
2020-04-07 09:48:43 -07:00
committed by Lawrence Lee
parent f62f6807a7
commit 5fdff8dab4
2 changed files with 27 additions and 20 deletions

View File

@@ -325,6 +325,11 @@ FramesData::FramesData(const Glib::ustring &fname) :
if (find_exif_tag("Exif.Image.Rating")) {
rating = pos->toLong();
} else {
auto it = meta.xmpData().findKey(Exiv2::XmpKey("Xmp.xmp.Rating"));
if (it != meta.xmpData().end() && it->size()) {
rating = it->toLong();
}
}
// -----------------------