[easytag] Move extended date field warning out of tag code
- From: David King <davidk src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [easytag] Move extended date field warning out of tag code
- Date: Thu, 6 Nov 2014 16:36:54 +0000 (UTC)
commit 4a67851124bf2b9a64e232e773a19badb3d18aff
Author: David King <amigadave amigadave com>
Date: Thu Nov 6 16:33:18 2014 +0000
Move extended date field warning out of tag code
src/et_core.c | 7 +++++++
src/tags/flac_tag.c | 6 ------
src/tags/ogg_tag.c | 7 -------
3 files changed, 7 insertions(+), 13 deletions(-)
---
diff --git a/src/et_core.c b/src/et_core.c
index 108e03b..a07b0f9 100644
--- a/src/et_core.c
+++ b/src/et_core.c
@@ -608,6 +608,13 @@ GList *ET_Add_File_To_File_List (gchar *filename)
break;
}
+ if (FileTag->year && g_utf8_strlen (FileTag->year, -1) > 4)
+ {
+ Log_Print (LOG_WARNING,
+ _("The year value ‘%s’ seems to be invalid in file ‘%s’. The information will be lost
when saving"),
+ FileTag->year, filename_utf8);
+ }
+
/* Fill the ET_File_Info structure */
ETFileInfo = ET_File_Info_Item_New ();
diff --git a/src/tags/flac_tag.c b/src/tags/flac_tag.c
index 16d71d8..a142122 100644
--- a/src/tags/flac_tag.c
+++ b/src/tags/flac_tag.c
@@ -356,12 +356,6 @@ flac_tag_read_file_tag (GFile *file,
field_value = Try_To_Validate_Utf8_String(field_value_tmp);
g_free(field_value_tmp);
FileTag->year = field_value;
- if (g_utf8_strlen (FileTag->year, -1) > 4)
- {
- Log_Print (LOG_WARNING,
- _("The year value ‘%s’ seems to be invalid in file ‘%s’. The
information will be lost when saving"),
- FileTag->year, filename_utf8);
- }
}
}
}
diff --git a/src/tags/ogg_tag.c b/src/tags/ogg_tag.c
index 64eaa17..2d8feb8 100644
--- a/src/tags/ogg_tag.c
+++ b/src/tags/ogg_tag.c
@@ -285,13 +285,6 @@ et_add_file_tags_from_vorbis_comments (vorbis_comment *vc, File_Tag *FileTag,
if ( (string = vorbis_comment_query(vc,"DATE",0)) != NULL && g_utf8_strlen(string, -1) > 0 )
{
FileTag->year = g_strdup(string);
-
- if (g_utf8_strlen (FileTag->year, -1) > 4)
- {
- Log_Print (LOG_WARNING,
- _("The year value ‘%s’ seems to be invalid in file ‘%s’. The information will be lost
when saving"),
- FileTag->year, filename_utf8);
- }
}
/*************************
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]