Lowercase album and track names

This commit is contained in:
Lynn Smeria 2018-08-27 17:01:18 +02:00
parent 1d463642a5
commit dac6772e8d
2 changed files with 5 additions and 5 deletions

View file

@ -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 <ae@cephea.de>",

View file

@ -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;