mirror of
https://github.com/zkldi/Tachi.git
synced 2026-10-11 00:38:28 +03:00
refactor: typo in songIDGenerator
This commit is contained in:
@@ -4,7 +4,7 @@ const { Command } = require("commander");
|
||||
const {
|
||||
CreateChartID,
|
||||
ReadCollection,
|
||||
GetFreshScoreIDGenerator,
|
||||
GetFreshSongIDGenerator: GetFreshScoreIDGenerator,
|
||||
WriteCollection,
|
||||
} = require("../../util");
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@ const {
|
||||
CreateChartID,
|
||||
ReadCollection,
|
||||
WriteCollection,
|
||||
GetFreshScoreIDGenerator,
|
||||
GetFreshSongIDGenerator,
|
||||
} = require("../../util");
|
||||
|
||||
const program = new Command();
|
||||
@@ -29,7 +29,7 @@ const folderIdToSongId = {};
|
||||
let newSongs = 0;
|
||||
let newCharts = 0;
|
||||
|
||||
const getFreshSongID = GetFreshScoreIDGenerator("usc");
|
||||
const getFreshSongID = GetFreshSongIDGenerator("usc");
|
||||
|
||||
// if debug is true, console log. Else, do nothing.
|
||||
const log = DEBUG ? console.log : () => undefined;
|
||||
|
||||
@@ -80,7 +80,7 @@ function EfficientInPlaceDeepmerge(ref, apply) {
|
||||
*
|
||||
* Not thread safe.
|
||||
*/
|
||||
function GetFreshScoreIDGenerator(game) {
|
||||
function GetFreshSongIDGenerator(game) {
|
||||
let maxSongID = ReadCollection(`songs-${game}.json`).sort((a, b) => b.id - a.id)[0].id;
|
||||
|
||||
return () => ++maxSongID;
|
||||
@@ -94,6 +94,6 @@ module.exports = {
|
||||
ReadCollection,
|
||||
WriteCollection,
|
||||
EfficientInPlaceDeepmerge,
|
||||
GetFreshScoreIDGenerator,
|
||||
GetFreshSongIDGenerator,
|
||||
CreateFolderIDFromFolder,
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user