moved music_db pull to copyResourcesFromGame func and removed generateLatestMusicDBFile func + fixes
This commit is contained in:
@@ -4,32 +4,14 @@
|
||||
$(document).ready(async function() {
|
||||
let sdvxDir = document.getElementById("sdvx-dir").innerText
|
||||
$( "#updateResources" ).click(async function() {
|
||||
answer = confirm("Clicking OK would mean that you have already updated the datecode in your ea3-config.xml file. Would you like to proceed?");
|
||||
answer = confirm("Clicking OK would mean that you have already updated the datacode in your ea3-config.xml file. Would you like to proceed?");
|
||||
if (answer == true) {
|
||||
document.getElementById("logtextarea").textContent = ''
|
||||
document.getElementById("logtextarea").textContent = 'Updating music_db.json file....\n'
|
||||
await emit("generateLatestMusicDBFile").then(
|
||||
function(response) {
|
||||
$.getJSON( "static/asset/json/music_db.json", function( data ) {
|
||||
document.getElementById("logtextarea").textContent += "New songs found in version " + data['mdb']['version'] + ": \n";
|
||||
$.each( data['mdb']['music'], function( key, val ) {
|
||||
if(parseInt(val.info.distribution_date['#text']) >= parseInt(data['mdb']['version'].substring(0,8))){
|
||||
document.getElementById("logtextarea").textContent += val.info.distribution_date['#text'] + " - " + val.info.title_name + "\n";
|
||||
}
|
||||
});
|
||||
document.getElementById("logtextarea").textContent += '\n\n'
|
||||
});
|
||||
},
|
||||
function(error) {
|
||||
document.getElementById("logtextarea").textContent += error + "\n";
|
||||
document.getElementById("logtextarea").textContent += "Please check if 'Exceed Gear Data Directory' is configured properly." + "\n";
|
||||
}
|
||||
);
|
||||
|
||||
document.getElementById("logtextarea").textContent = 'Running....\n'
|
||||
await emit("copyResourcesFromGame").then(
|
||||
function(response){
|
||||
$.getJSON( "static/asset/logs/copyResourcesFromGame.json", function( data ) {
|
||||
if(data['nemsys']) {
|
||||
if(data['nemsys'].length > 0) {
|
||||
document.getElementById("logtextarea").textContent += 'New nemsys: \n'
|
||||
$.each(data['nemsys'], function(key, val) {
|
||||
document.getElementById("logtextarea").textContent += "- " + val + '\n'
|
||||
@@ -37,7 +19,7 @@ $(document).ready(async function() {
|
||||
document.getElementById("logtextarea").textContent += '\n\n'
|
||||
}
|
||||
|
||||
if(data['apCard']) {
|
||||
if(data['apCard'].length > 0) {
|
||||
document.getElementById("logtextarea").textContent += 'New appeal cards: \n'
|
||||
$.each(data['apCard'], function(key, val) {
|
||||
document.getElementById("logtextarea").textContent += "- " + val + '\n'
|
||||
@@ -45,7 +27,7 @@ $(document).ready(async function() {
|
||||
document.getElementById("logtextarea").textContent += '\n\n'
|
||||
}
|
||||
|
||||
if(data['subbg']) {
|
||||
if(data['subbg'].length > 0) {
|
||||
document.getElementById("logtextarea").textContent += 'New submonitor backgrounds: \n'
|
||||
$.each(data['subbg'], function(key, val) {
|
||||
document.getElementById("logtextarea").textContent += "- " + val + '\n'
|
||||
@@ -53,13 +35,29 @@ $(document).ready(async function() {
|
||||
document.getElementById("logtextarea").textContent += '\n\n'
|
||||
}
|
||||
|
||||
if(data['bgm']) {
|
||||
if(data['bgm'].length > 0) {
|
||||
document.getElementById("logtextarea").textContent += 'New bgm: \n'
|
||||
$.each(data['bgm'], function(key, val) {
|
||||
document.getElementById("logtextarea").textContent += "- " + val + '\n'
|
||||
})
|
||||
document.getElementById("logtextarea").textContent += '\n\n'
|
||||
}
|
||||
|
||||
if(data['versionSongs'].length > 0) {
|
||||
document.getElementById("logtextarea").textContent += 'New songs in latest data: \n'
|
||||
$.each(data['versionSongs'], function(key, val) {
|
||||
document.getElementById("logtextarea").textContent += "- " + val + '\n'
|
||||
})
|
||||
document.getElementById("logtextarea").textContent += '\n\n'
|
||||
}
|
||||
|
||||
if(data['jsonSongs'].length > 0) {
|
||||
document.getElementById("logtextarea").textContent += 'New songs added to mdb asset: \n'
|
||||
$.each(data['jsonSongs'], function(key, val) {
|
||||
document.getElementById("logtextarea").textContent += "- " + val + '\n'
|
||||
})
|
||||
document.getElementById("logtextarea").textContent += '\n\n'
|
||||
}
|
||||
})
|
||||
},
|
||||
function(error){
|
||||
|
||||
Reference in New Issue
Block a user