mirror of
https://github.com/asphyxia-core/plugins.git
synced 2026-03-21 17:34:46 -05:00
Fixed bug preventing MDB files in XML format from loading correctly.
This commit is contained in:
parent
3368953fbc
commit
f501bab164
|
|
@ -1,6 +1,6 @@
|
|||
GITADORA Plugin for Asphyxia-Core
|
||||
=================================
|
||||

|
||||

|
||||
|
||||
This plugin is based on converted from public-exported Asphyxia's Routes.
|
||||
|
||||
|
|
@ -31,6 +31,10 @@ Known Issues
|
|||
Release Notes
|
||||
=============
|
||||
|
||||
v1.2.3
|
||||
----------------
|
||||
* Fixed bug preventing MDB files in XML format from loading (Thanks to DualEdge for reporting this ).
|
||||
|
||||
v1.2.2
|
||||
----------------
|
||||
* Major improvements to the MDB (song data) loader. MDB files can now be in .json, .xml or .b64 format. This applies to both the per-version defaults and custom MDBs. To use a custom MDB, enable it in the web UI, and place a 'custom.xml', 'custom.json' or 'custom.b64' file in the data/mdb subfolder.
|
||||
|
|
|
|||
|
|
@ -17,7 +17,6 @@ type processRawDataHandler = (path: string) => Promise<CommonMusicData>
|
|||
const logger = new Logger("mdb")
|
||||
|
||||
export async function readXML(path: string) {
|
||||
logger.debugInfo(`Loading MDB data from ${path}.`)
|
||||
const xml = await IO.ReadFile(path, 'utf-8');
|
||||
const json = U.parseXML(xml, false)
|
||||
return json
|
||||
|
|
@ -40,7 +39,7 @@ export async function readMDBFile(path: string, processHandler?: processRawDataH
|
|||
result = JSON.parse(str)
|
||||
break;
|
||||
case '.xml':
|
||||
processHandler ?? defaultProcessRawXmlData
|
||||
processHandler = processHandler ?? defaultProcessRawXmlData
|
||||
result = await processHandler(path)
|
||||
// Uncomment to save the loaded XML file as JSON.
|
||||
// await IO.WriteFile(path.replace(".xml", ".json"), JSON.stringify(data))
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user