Integrate EJS 4.0.10Fixes #284

* Integrate EJS 4.0.10
Fixes #284
This commit is contained in:
Michael Green
2024-02-05 00:39:44 +11:00
committed by GitHub
parent 7754fd5dda
commit 645327bdd1
6 changed files with 204 additions and 7 deletions

View File

@@ -42,6 +42,7 @@ namespace gaseous_server.Models
// exists
if (ResetToDefault == false)
{
WriteAvailableEmulators(mapItem);
Logging.Log(Logging.LogType.Information, "Platform Map", "Skipping import of " + mapItem.IGDBName + " - already in database.");
}
else
@@ -253,6 +254,30 @@ namespace gaseous_server.Models
}
}
public static void WriteAvailableEmulators (PlatformMapItem item)
{
Database db = new Database(Database.databaseType.MySql, Config.DatabaseConfiguration.ConnectionString);
string sql = "";
Dictionary<string, object> dbDict = new Dictionary<string, object>();
sql = "UPDATE PlatformMap SET RetroPieDirectoryName=@RetroPieDirectoryName, WebEmulator_Type=@WebEmulator_Type, WebEmulator_Core=@WebEmulator_Core, AvailableWebEmulators=@AvailableWebEmulators WHERE Id = @Id; ";
dbDict.Add("Id", item.IGDBId);
dbDict.Add("RetroPieDirectoryName", item.RetroPieDirectoryName);
if (item.WebEmulator != null)
{
dbDict.Add("WebEmulator_Type", item.WebEmulator.Type);
dbDict.Add("WebEmulator_Core", item.WebEmulator.Core);
dbDict.Add("AvailableWebEmulators", Newtonsoft.Json.JsonConvert.SerializeObject(item.WebEmulator.AvailableWebEmulators));
}
else
{
dbDict.Add("WebEmulator_Type", "");
dbDict.Add("WebEmulator_Core", "");
dbDict.Add("AvailableWebEmulators", "");
}
db.ExecuteCMD(sql, dbDict);
}
static PlatformMapItem BuildPlatformMapItem(DataRow row)
{
long IGDBId = (long)row["Id"];

View File

@@ -352,6 +352,9 @@
},
{
"core": "fbalpha2012_cps2"
},
{
"core": "mame"
}
]
}
@@ -717,8 +720,11 @@
"availableWebEmulatorCores": [
{
"core": "c64",
"alternateCoreName": "vice_x64",
"alternateCoreName": "vice_x64sc",
"default": true
},
{
"core": "vice_x64"
}
]
}
@@ -747,6 +753,169 @@
}
]
},
{
"igdbId": 90,
"igdbName": "Commodore PET",
"igdbSlug": "cpet",
"alternateNames": [
"cpet",
"PET",
"Commodore PET"
],
"extensions": {
"supportedFileExtensions": [
".CRT",
".D64",
".D80",
".D81",
".G64",
".M3U",
".PRG",
".T64",
".TAP",
".X64",
".ZIP"
],
"uniqueFileExtensions": [
".CRT",
".D64",
".D80",
".D81",
".G64",
".PRG",
".T64",
".X64"
]
},
"retroPieDirectoryName": "c64",
"webEmulator": {
"type": "EmulatorJS",
"core": "vice_xpet",
"availableWebEmulators": [
{
"emulatorType": "EmulatorJS",
"availableWebEmulatorCores": [
{
"core": "pet",
"alternateCoreName": "vice_xpet",
"default": true
}
]
}
]
},
"bios": [
]
},
{
"igdbId": 94,
"igdbName": "Commodore Plus/4",
"igdbSlug": "c-plus-4",
"alternateNames": [
"C+4",
"c-plus-4",
"Plus/4",
"Commodore Plus/4"
],
"extensions": {
"supportedFileExtensions": [
".CRT",
".D64",
".D80",
".D81",
".G64",
".M3U",
".PRG",
".T64",
".TAP",
".X64",
".ZIP"
],
"uniqueFileExtensions": [
".CRT",
".D64",
".D80",
".D81",
".G64",
".PRG",
".T64",
".X64"
]
},
"retroPieDirectoryName": "c64",
"webEmulator": {
"type": "EmulatorJS",
"core": "vice_xplus4",
"availableWebEmulators": [
{
"emulatorType": "EmulatorJS",
"availableWebEmulatorCores": [
{
"core": "plus4",
"alternateCoreName": "vice_xplus4",
"default": true
}
]
}
]
},
"bios": [
]
},
{
"igdbId": 71,
"igdbName": "Commodore VIC-20",
"igdbSlug": "vic-20",
"alternateNames": [
"VIC20",
"VIC-20",
"Commodore VIC-20"
],
"extensions": {
"supportedFileExtensions": [
".CRT",
".D64",
".D80",
".D81",
".G64",
".M3U",
".PRG",
".T64",
".TAP",
".X64",
".ZIP"
],
"uniqueFileExtensions": [
".CRT",
".D64",
".D80",
".D81",
".G64",
".PRG",
".T64",
".X64"
]
},
"retroPieDirectoryName": "c64",
"webEmulator": {
"type": "EmulatorJS",
"core": "vice_xvic",
"availableWebEmulators": [
{
"emulatorType": "EmulatorJS",
"availableWebEmulatorCores": [
{
"core": "vic20",
"alternateCoreName": "vice_xvic",
"default": true
}
]
}
]
},
"bios": [
]
},
{
"igdbId": 158,
"igdbName": "Commodore CDTV",
@@ -1428,8 +1597,11 @@
"availableWebEmulatorCores": [
{
"core": "segaMS",
"alternateCoreName": "genesis_plus_gx",
"alternateCoreName": "picodrive",
"default": true
},
{
"core": "genesis_plus_gx"
}
]
}

View File

@@ -20,7 +20,7 @@ namespace gaseous_server
//_logger.LogInformation("Timed Hosted Service running.");
Logging.Log(Logging.LogType.Debug, "Background", "Starting background task monitor");
_timer = new Timer(DoWork, null, TimeSpan.FromSeconds(30),
_timer = new Timer(DoWork, null, TimeSpan.FromSeconds(10),
TimeSpan.FromSeconds(30));
return Task.CompletedTask;