summaryrefslogtreecommitdiffabout
path: root/src/idop.c
authorSergey Poznyakoff <gray@gnu.org.ua>2011-07-08 11:12:05 (GMT)
committer Sergey Poznyakoff <gray@gnu.org.ua>2011-07-08 11:12:05 (GMT)
commite906e318c552d89fdd7d56045cc0fe15a5853547 (patch) (side-by-side diff)
tree448892b20487e6929c4971ab4aec64f4ead6508b /src/idop.c
parent3d82867917b5a5d517a0b238b7f0dbd244855dec (diff)
downloadidest-e906e318c552d89fdd7d56045cc0fe15a5853547.tar.gz
idest-e906e318c552d89fdd7d56045cc0fe15a5853547.tar.bz2
Make sure no old tag instances remain after modifications.
* src/guile.c (guile_transform): Remove existing tags prior to installing new ones. * src/idop.c (set_tags): Remove all existing instances of the tag except the first one prior to altering it. * libid3tag/frame.c: Add type casts. * libid3tag/render.c: Likewise. * libid3tag/tag.c: Likewise.
Diffstat (limited to 'src/idop.c') (more/less context) (ignore whitespace changes)
-rw-r--r--src/idop.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/idop.c b/src/idop.c
index 79f9491..7310aad 100644
--- a/src/idop.c
+++ b/src/idop.c
@@ -114,6 +114,14 @@ set_tags(const char *name)
frame = id3_frame_new(item->id);
if (id3_tag_attachframe(tag, frame))
error(1, 0, "cannot attach new frame");
+ } else {
+ struct id3_frame *fp;
+
+ while (fp = id3_tag_findframe(tag, item->id,
+ 1)) {
+ id3_tag_detachframe(tag, fp);
+ id3_frame_delete(fp);
+ }
}
set_frame_value(frame, item->v.value);
modified |= 1;

Return to:

Send suggestions and report system problems to the System administrator.