summaryrefslogtreecommitdiffabout
path: root/src/idop.c
authorSergey Poznyakoff <gray@gnu.org.ua>2011-07-11 22:18:20 (GMT)
committer Sergey Poznyakoff <gray@gnu.org.ua>2011-07-11 22:18:20 (GMT)
commit42851eb7a5f2c406db90c3912bd1581e047ef825 (patch) (side-by-side diff)
treeeedc5201674cc240a395b9a2a85831f89c74c133 /src/idop.c
parenta39fd290009b6f8a1312d880d025022f8b15d976 (diff)
downloadidest-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') (more/less context) (ignore whitespace changes)
-rw-r--r--src/idop.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/idop.c b/src/idop.c
index 5f0d7f9..87c4f0a 100644
--- a/src/idop.c
+++ b/src/idop.c
@@ -207,10 +207,14 @@ del_tags(const char *name)
while (gl_list_iterator_next(&itr, &p, NULL)) {
const struct ed_item *item = p;
struct id3_frame *frame;
+ int i = 0;
- while (frame = id3_tag_findframe(tag, item->id, 0)) {
- id3_tag_detachframe(tag, frame);
- id3_frame_delete(frame);
+ while (frame = id3_tag_findframe(tag, item->id, i)) {
+ if (ed_item_matches_frame(item, frame)) {
+ id3_tag_detachframe(tag, frame);
+ id3_frame_delete(frame);
+ } else
+ i++;
}
}
gl_list_iterator_free(&itr);

Return to:

Send suggestions and report system problems to the System administrator.