[easytag] Mark files with old Vorbis tag comments as changed
- From: David King <davidk src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [easytag] Mark files with old Vorbis tag comments as changed
- Date: Sun, 21 Feb 2016 23:23:49 +0000 (UTC)
commit d081c73f8d72155f6f0cde1b6e06ddf3ebcafba7
Author: David King <amigadave amigadave com>
Date: Sun Feb 21 22:43:44 2016 +0000
Mark files with old Vorbis tag comments as changed
If a Vorbis comment has a COMMENT field, mark the file as modified, so that it
is converted to a DESCRIPTION field during saving.
src/tags/flac_tag.c | 6 ++++++
src/tags/ogg_tag.c | 6 ++++++
2 files changed, 12 insertions(+), 0 deletions(-)
---
diff --git a/src/tags/flac_tag.c b/src/tags/flac_tag.c
index 3906600..e811753 100644
--- a/src/tags/flac_tag.c
+++ b/src/tags/flac_tag.c
@@ -414,6 +414,10 @@ flac_tag_read_file_tag (GFile *file,
}
else if (descs && comments)
{
+ /* Mark the file as modified, so that comments are written
+ * to the DESCRIPTION field on saving. */
+ FileTag->saved = FALSE;
+
g_slist_foreach (descs, values_list_foreach,
&FileTag->comment);
g_slist_foreach (comments, values_list_foreach,
@@ -421,6 +425,8 @@ flac_tag_read_file_tag (GFile *file,
}
else if (comments)
{
+ FileTag->saved = FALSE;
+
g_slist_foreach (comments, values_list_foreach,
&FileTag->comment);
}
diff --git a/src/tags/ogg_tag.c b/src/tags/ogg_tag.c
index b11a4fd..799436b 100644
--- a/src/tags/ogg_tag.c
+++ b/src/tags/ogg_tag.c
@@ -411,11 +411,17 @@ et_add_file_tags_from_vorbis_comments (vorbis_comment *vc,
}
else if (descs && comments)
{
+ /* Mark the file as modified, so that comments are written to the
+ * DESCRIPTION field on saving. */
+ FileTag->saved = FALSE;
+
g_slist_foreach (descs, values_list_foreach, &FileTag->comment);
g_slist_foreach (comments, values_list_foreach, &FileTag->comment);
}
else if (descs && comments)
{
+ FileTag->saved = FALSE;
+
g_slist_foreach (comments, values_list_foreach, &FileTag->comment);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]