Skip to content

Commit 134c255

Browse files
committed
Only get id3 data if mp3
1 parent 15940f9 commit 134c255

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "fileutils-cli",
3-
"version": "1.0.0",
3+
"version": "1.0.1",
44
"description": "A collection of powerful command line file utilities",
55
"main": "src/bin.js",
66
"preferGlobal": true,

src/common/FileData.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ module.exports.FileData = class FileData {
2424
async get() {
2525
let exifData = getExifData(this.parsedPath.dir + '/' + this.parsedPath.base);
2626
let tags = {};
27-
if (!this.stats.isDirectory()) {
27+
if (!this.stats.isDirectory() && this.parsedPath.ext.toLowerCase() === '.mp3') {
2828
const buffer = await fs.readFile(this.parsedPath.dir + '/' + this.parsedPath.base);
2929
const mp3tag = new MP3Tag(buffer, false);
3030
await mp3tag.read();

0 commit comments

Comments
 (0)