summaryrefslogtreecommitdiff
path: root/apps/metadata.c
diff options
context:
space:
mode:
Diffstat (limited to 'apps/metadata.c')
-rw-r--r--apps/metadata.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/apps/metadata.c b/apps/metadata.c
index acd8de38e3..d02e81a014 100644
--- a/apps/metadata.c
+++ b/apps/metadata.c
@@ -2012,6 +2012,17 @@ bool get_metadata(struct track_info* track, int fd, const char* trackname,
}
break;
+ case AFMT_NSF:
+ buf = track->id3.path;
+ if ((lseek(fd, 0, SEEK_SET) < 0) || ((read(fd, buf, 8)) < 8))
+ {
+ DEBUGF("lseek or read failed\n");
+ return false;
+ }
+ track->id3.vbr = false;
+ track->id3.filesize = filesize(fd);
+ if (memcmp(buf,"NESM",4) && memcmp(buf,"NSFE",4)) return false;
+ break;
case AFMT_AIFF:
if (!get_aiff_metadata(fd, &(track->id3)))