diff --git a/lib/id4.js b/lib/id4.js index d6eb3a4..bfc1725 100644 --- a/lib/id4.js +++ b/lib/id4.js @@ -108,14 +108,14 @@ function processMetaAtom (data, atomName, atomLength) { case 'uint8': if (atomName === 'gnre') { - var genreInt = strtok.UINT16_BE.get(data, 4); + var genreInt = strtok.UINT8.get(data, 5); return common.GENRES[genreInt - 1]; } if (atomName === 'trkn' || atomName === 'disk') { return data[7] + '/' + data[9]; } - return strtok.UINT16_BE.get(data, 4); + return strtok.UINT8.get(data, 4); case 'jpeg': case 'png': diff --git a/test/test-id4.js b/test/test-id4.js index da59355..1348328 100644 --- a/test/test-id4.js +++ b/test/test-id4.js @@ -82,7 +82,7 @@ test('id4', function (t) { t.strictEqual(result, 'Electronic', 'raw gnre'); }) .on('stik', function (result) { - t.strictEqual(result, 256, 'raw stik'); + t.strictEqual(result, 1, 'raw stik'); }) .on('©alb', function (result) { t.strictEqual(result, 'Voodoo People', 'raw ©alb');