diff --git a/js/components/PlaylistWindow/Track.js b/js/components/PlaylistWindow/Track.js
index 03141548..9bc0693e 100644
--- a/js/components/PlaylistWindow/Track.js
+++ b/js/components/PlaylistWindow/Track.js
@@ -17,8 +17,8 @@ const Track = props => {
ctrlClickTrack
} = props;
const style = {
- backgroundColor: selected ? skinPlaylistStyle.SelectedBG : null,
- color: current ? skinPlaylistStyle.Current : null
+ backgroundColor: selected ? skinPlaylistStyle.selectedbg : null,
+ color: current ? skinPlaylistStyle.current : null
};
return (
{
} = props;
const style = {
- color: skinPlaylistStyle.Normal,
- backgroundColor: skinPlaylistStyle.NormalBG,
- fontFamily: `${skinPlaylistStyle.Font}, Arial, sans-serif`,
+ color: skinPlaylistStyle.normal,
+ backgroundColor: skinPlaylistStyle.normalbg,
+ fontFamily: `${skinPlaylistStyle.font}, Arial, sans-serif`,
height: `${MIN_WINDOW_HEIGHT +
playlistSize[1] * PLAYLIST_RESIZE_SEGMENT_HEIGHT}px`,
width: `${MIN_WINDOW_WIDTH +
diff --git a/js/skinParser.js b/js/skinParser.js
index adaf9423..329f6b54 100644
--- a/js/skinParser.js
+++ b/js/skinParser.js
@@ -148,7 +148,7 @@ const defaultPlaylistStyle = {
async function genPlaylistStyle(zip) {
const pleditContent = await genFileFromZip(zip, "PLEDIT", "txt", "text");
- return pleditContent ? parseIni(pleditContent).Text : defaultPlaylistStyle;
+ return pleditContent ? parseIni(pleditContent).text : defaultPlaylistStyle;
}
async function genColors(zip) {
diff --git a/js/utils.js b/js/utils.js
index 2a2fa0d2..377d08a2 100644
--- a/js/utils.js
+++ b/js/utils.js
@@ -46,9 +46,9 @@ export const parseIni = text => {
let section, match;
return text.split(/[\r\n]+/g).reduce((data, line) => {
if ((match = line.match(PROPERTY_REGEX)) && section != null) {
- data[section][match[1]] = match[2];
+ data[section][match[1].toLowerCase()] = match[2];
} else if ((match = line.match(SECTION_REGEX))) {
- section = match[1];
+ section = match[1].toLowerCase();
data[section] = {};
}
return data;
diff --git a/js/utils.test.js b/js/utils.test.js
index 338821c2..fc1e595e 100644
--- a/js/utils.test.js
+++ b/js/utils.test.js
@@ -102,12 +102,12 @@ describe("parseIni", () => {
const pledit = fixture("PLEDIT.TXT");
const actual = parseIni(pledit);
const expected = {
- Text: {
- Normal: "#00FF00",
- Current: "#FFFFFF",
- NormalBG: "#000000",
- SelectedBG: "#0000FF",
- Font: "Arial"
+ text: {
+ normal: "#00FF00",
+ current: "#FFFFFF",
+ normalbg: "#000000",
+ selectedbg: "#0000FF",
+ font: "Arial"
}
};
expect(actual).toEqual(expected);
@@ -117,14 +117,14 @@ describe("parseIni", () => {
const pledit = fixture("PLEDIT_TOPAZ.TXT");
const actual = parseIni(pledit);
const expected = {
- Text: {
- Normal: "#319593",
- Current: "#89D8D1",
- NormalBG: "#000000",
- SelectedBG: "#2B4242",
- Font: "Arial",
- mbBG: "#000000",
- mbFG: "#89D8D1"
+ text: {
+ normal: "#319593",
+ current: "#89D8D1",
+ normalbg: "#000000",
+ selectedbg: "#2B4242",
+ font: "Arial",
+ mbbg: "#000000",
+ mbfg: "#89D8D1"
}
};
expect(actual).toEqual(expected);