summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
Diffstat (limited to 'plugins')
-rw-r--r--plugins/wma/asfheader.c4
-rw-r--r--plugins/wma/wma_plugin.c9
2 files changed, 13 insertions, 0 deletions
diff --git a/plugins/wma/asfheader.c b/plugins/wma/asfheader.c
index c6e84e89..97c37256 100644
--- a/plugins/wma/asfheader.c
+++ b/plugins/wma/asfheader.c
@@ -653,6 +653,10 @@ static int asf_parse_header(DB_FILE *fd, asf_waveformatex_t* wfx, DB_playItem_t
unsigned char *s = id3buf;
asf_utf16LEdecode(fd, length, &id3buf, &id3buf_remaining);
deadbeef->pl_append_meta (it, "composer", s);
+ } else if ((!strcasecmp("foobar2000/cuesheet", utf8buf)) && (type == 0)) {
+ unsigned char *s = id3buf;
+ asf_utf16LEdecode(fd, length, &id3buf, &id3buf_remaining);
+ deadbeef->pl_append_meta (it, "cuesheet", s);
} else if (!strcmp("WM/Year", utf8buf)) {
if (type == 0) {
unsigned char *s = id3buf;
diff --git a/plugins/wma/wma_plugin.c b/plugins/wma/wma_plugin.c
index c41f113b..f997d0a4 100644
--- a/plugins/wma/wma_plugin.c
+++ b/plugins/wma/wma_plugin.c
@@ -357,6 +357,15 @@ wmaplug_seek (DB_fileinfo_t *_info, float t) {
static int
wmaplug_read_metadata (DB_playItem_t *it) {
+ deadbeef->pl_delete_all_meta (it);
+ DB_FILE *fp = deadbeef->fopen (deadbeef->pl_find_meta (it, ":URI"));
+ if (!fp) {
+ return -1;
+ }
+ asf_waveformatex_t wfx;
+ int64_t first_frame_offset;
+ get_asf_metadata (fp, it, &wfx, &first_frame_offset);
+ deadbeef->fclose (fp);
return 0;
}