summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authorGravatar Alexey Yakovenko <waker@users.sourceforge.net>2014-07-06 10:43:42 +0200
committerGravatar Alexey Yakovenko <waker@users.sourceforge.net>2014-07-06 10:43:42 +0200
commitd012d39f4d256d43cd5e2d95a96f4868fbedd464 (patch)
treeaa9e019475dc3e5183c4c8440ea7c0d8c91ee001 /plugins
parente10994169fbae93890eb13af423aa89556eafb6e (diff)
converter: strip subtrack metadata from converted result before writing tags, this fixes bug #1104 (writing tags to ogg/flac files after converting them from chained tracks)
Diffstat (limited to 'plugins')
-rw-r--r--plugins/converter/converter.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/plugins/converter/converter.c b/plugins/converter/converter.c
index 806d6a0a..fc8989c4 100644
--- a/plugins/converter/converter.c
+++ b/plugins/converter/converter.c
@@ -32,6 +32,7 @@
#include <dirent.h>
#include <fcntl.h>
#include <unistd.h>
+#include <inttypes.h>
#include "converter.h"
#include "../../deadbeef.h"
#include "../../strdupa.h"
@@ -1058,7 +1059,7 @@ convert (DB_playItem_t *it, const char *out, int output_bps, int output_is_float
int64_t res = write (temp_file, buffer, sz);
if (sz != res) {
- fprintf (stderr, "converter: write error (%lld bytes written out of %d)\n", res, sz);
+ fprintf (stderr, "converter: write error (%"PRId64" bytes written out of %d)\n", res, sz);
goto error;
}
}
@@ -1133,8 +1134,11 @@ error:
*o++ = *p++;
}
*o = 0;
+ // FIXME: need to delete all colon-fields, except the URI
deadbeef->pl_replace_meta (out_it, ":URI", unesc_path);
+ deadbeef->pl_delete_meta (out_it, ":TRACKNUM");
deadbeef->pl_delete_meta (out_it, "cuesheet");
+ deadbeef->pl_set_item_flags (out_it, 0);
}
uint32_t tagflags = 0;