Utilize ea3-ident instead of ea3-config for datecodes (#1)

* Utilize ea3-ident instead of ea3-config for datecodes

* added checks for ea3-config and ea3-ident in resource update

---------

Co-authored-by: vvo <>
This commit is contained in:
Burrito
2023-03-10 17:43:02 +08:00
committed by GitHub
co-authored by vvo
parent 4290dbf356
commit afb17f09c7
+12 -2
View File
@@ -177,9 +177,19 @@ export const copyResourcesFromGame = async (data: {}) => {
// Get new music data from music_db.xml
console.log('Getting new music_db info')
if(IO.Exists(U.GetConfig('sdvx_eg_root_dir') + "/data/others/music_db.xml")) {
let ea3Config = []
let version = ''
let mdb = U.parseXML(U.DecodeString(await IO.ReadFile(U.GetConfig('sdvx_eg_root_dir') + "/data/others/music_db.xml"), "shift_jis"), false)
let ea3Config = U.parseXML(U.DecodeString(await IO.ReadFile(U.GetConfig('sdvx_eg_root_dir') + "/prop/ea3-config.xml"), "shift_jis"), false)
let version = ea3Config['ea3']['soft']['ext']['@content'];
if(IO.Exists(U.GetConfig('sdvx_eg_root_dir') + "/prop/ea3-config.xml")) {
console.log("Reading ea3-config.xml")
ea3Config = U.parseXML(U.DecodeString(await IO.ReadFile(U.GetConfig('sdvx_eg_root_dir') + "/prop/ea3-config.xml"), "shift_jis"), false)
version = ea3Config['ea3']['soft']['ext']['@content'];
} else if(IO.Exists(U.GetConfig('sdvx_eg_root_dir') + "/prop/ea3-ident.xml")) {
console.log("Reading ea3-ident.xml")
ea3Config = U.parseXML(U.DecodeString(await IO.ReadFile(U.GetConfig('sdvx_eg_root_dir') + "/prop/ea3-ident.xml"), "shift_jis"), false)
version = ea3Config['ea3_conf']['soft']['ext']['@content'];
}
let prevAssetMdb = []
if(IO.Exists('webui/asset/json/music_db.json')) {
prevAssetMdb = JSON.parse(U.DecodeString(await IO.ReadFile('webui/asset/json/music_db.json'), 'utf8'))