From dac6772e8d2544a03664b056f293948df0cb2762 Mon Sep 17 00:00:00 2001 From: Lynn Smeria Date: Mon, 27 Aug 2018 17:01:18 +0200 Subject: [PATCH] Lowercase album and track names --- package.json | 2 +- src/organise.js | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index 6072dd8..2b5dbb8 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "publikator", - "version": "0.10.0", + "version": "0.11.0", "main": "index.js", "repository": "https://github.com/aengl/publikator.git", "author": "Lynn Smeria ", diff --git a/src/organise.js b/src/organise.js index 35da24e..f4f0792 100644 --- a/src/organise.js +++ b/src/organise.js @@ -9,15 +9,15 @@ const tags = require('./tags'); /** * Given a track file, return the album name. */ -const getAlbumName = file => file.common.album.replace(/ /g, '-'); +const getAlbumName = file => file.common.album.replace(/ /g, '-').toLowerCase(); /** * Given a track file, return the new file name. */ const getFileName = file => - `${file.common.track.no}-${file.common.title}${path.extname( - file.path - )}`.replace(/ /g, '-'); + `${file.common.track.no}-${file.common.title}${path.extname(file.path)}` + .replace(/ /g, '-') + .toLowerCase(); /** * Strips the extension from a file name;