diff options
author | Sergey Poznyakoff <gray@gnu.org.ua> | 2011-07-12 01:18:20 +0300 |
---|---|---|
committer | Sergey Poznyakoff <gray@gnu.org.ua> | 2011-07-12 01:18:20 +0300 |
commit | 42851eb7a5f2c406db90c3912bd1581e047ef825 (patch) | |
tree | eedc5201674cc240a395b9a2a85831f89c74c133 /src/idop.c | |
parent | a39fd290009b6f8a1312d880d025022f8b15d976 (diff) | |
download | idest-42851eb7a5f2c406db90c3912bd1581e047ef825.tar.gz idest-42851eb7a5f2c406db90c3912bd1581e047ef825.tar.bz2 |
Accept comment content descriptors in --delete.
* src/idest.h (ed_item_matches_frame): New proto.
* src/idop.c (del_tags): Use ed_item_matches_frame to
find matching frames.
* src/main.c (ed_item_matches_frame): Remove static qualifier.
* NEWS, doc/idest.texi: Update.
Diffstat (limited to 'src/idop.c')
-rw-r--r-- | src/idop.c | 10 |
1 files changed, 7 insertions, 3 deletions
@@ -207,10 +207,14 @@ del_tags(const char *name) | |||
207 | while (gl_list_iterator_next(&itr, &p, NULL)) { | 207 | while (gl_list_iterator_next(&itr, &p, NULL)) { |
208 | const struct ed_item *item = p; | 208 | const struct ed_item *item = p; |
209 | struct id3_frame *frame; | 209 | struct id3_frame *frame; |
210 | int i = 0; | ||
210 | 211 | ||
211 | while (frame = id3_tag_findframe(tag, item->id, 0)) { | 212 | while (frame = id3_tag_findframe(tag, item->id, i)) { |
212 | id3_tag_detachframe(tag, frame); | 213 | if (ed_item_matches_frame(item, frame)) { |
213 | id3_frame_delete(frame); | 214 | id3_tag_detachframe(tag, frame); |
215 | id3_frame_delete(frame); | ||
216 | } else | ||
217 | i++; | ||
214 | } | 218 | } |
215 | } | 219 | } |
216 | gl_list_iterator_free(&itr); | 220 | gl_list_iterator_free(&itr); |