gchar *comment = NULL;
gchar *orig_comment = NULL;
gchar *comment_not_null;
+ gshort rating;
GtkTextBuffer *comment_buffer = gtk_text_view_get_buffer(GTK_TEXT_VIEW(pcd->comment_view));
orig_comment = text_widget_text_pull(pcd->comment_view);
- comment = metadata_read_string(pcd->fd, pcd->key, METADATA_PLAIN);
+ if (g_strcmp0(pcd->key, "Xmp.xmp.Rating") == 0)
+ {
+ rating = metadata_read_int(pcd->fd, pcd->key, 0);
+ comment = g_strdup_printf("%d", rating);
+ }
+ else
+ {
+ comment = metadata_read_string(pcd->fd, pcd->key, METADATA_PLAIN);
+ }
comment_not_null = (comment) ? comment : "";
if (strcmp(orig_comment, comment_not_null) != 0)
{
gchar *text;
ExifEntry *ee = g_object_get_data(G_OBJECT(entry), "entry_data");
+ gshort rating;
if (!ee) return;
- text = metadata_read_string(ped->fd, ee->key, ee->editable ? METADATA_PLAIN : METADATA_FORMATTED);
+ if (g_strcmp0(ee->key, "Xmp.xmp.Rating") == 0)
+ {
+ rating = metadata_read_int(ee->ped->fd, ee->key, 0);
+ text = g_strdup_printf("%d", rating);
+ }
+ else
+ {
+ text = metadata_read_string(ped->fd, ee->key, ee->editable ? METADATA_PLAIN : METADATA_FORMATTED);
+ }
if (!ped->show_all && ee->if_set && !ee->editable && (!text || !*text))
{