diff options
author | waker <wakeroid@gmail.com> | 2011-05-01 13:00:08 +0200 |
---|---|---|
committer | waker <wakeroid@gmail.com> | 2011-05-01 13:00:08 +0200 |
commit | 9cd88b754f57118dcdf7945a39c463f36a036984 (patch) | |
tree | c19b80ef795dffe8088f7c83b13d87cd5e40da5b /junklib.c | |
parent | 12eda6d1866e3c461e8e608ee1f7b2136b4c6e6f (diff) |
fixed updating Tags field in track properties after rewriting tags
Diffstat (limited to 'junklib.c')
-rw-r--r-- | junklib.c | 24 |
1 files changed, 24 insertions, 0 deletions
@@ -3381,6 +3381,8 @@ junk_rewrite_tags (playItem_t *it, uint32_t junk_flags, int id3v2_version, const DB_FILE *fp = NULL; FILE *out = NULL; + uint32_t item_flags = pl_get_item_flags (it); + // get options int strip_id3v2 = junk_flags & JUNK_STRIP_ID3V2; int strip_id3v1 = junk_flags & JUNK_STRIP_ID3V1; @@ -3713,6 +3715,28 @@ junk_rewrite_tags (playItem_t *it, uint32_t junk_flags, int id3v2_version, const } } + if (strip_id3v1 && !write_id3v1) { + item_flags &= ~DDB_TAG_ID3V1; + } + if (strip_id3v2 && !write_id3v2) { + item_flags &= ~(DDB_TAG_ID3V22|DDB_TAG_ID3V23|DDB_TAG_ID3V24); + } + if (strip_apev2 && !write_apev2) { + item_flags &= ~DDB_TAG_APEV2; + } + + if (write_id3v1) { + item_flags |= DDB_TAG_ID3V1; + } + if (write_id3v2) { + item_flags &= ~(DDB_TAG_ID3V22|DDB_TAG_ID3V23|DDB_TAG_ID3V24); + item_flags |= id3v2_version == 3 ? DDB_TAG_ID3V23 : DDB_TAG_ID3V24; + } + if (write_apev2) { + item_flags |= DDB_TAG_APEV2; + } + + pl_set_item_flags (it, item_flags); err = 0; error: if (fp) { |