Added feature to build collections of ROM's based on a filter (#76)
* fix: added visual feed back for mass rom matching * chore(deps): EmulatorJS version bump * chore(deps): nuget package version bump * feat: added cover art to the emulator * ci: updated .gitignore * ci: remove .DS_Store files * feat: updated the about box, and labeled the IGDB user score * chore(deps): EmulatorJS version bump * feat: start of collections build, and styling changes * fix: updated PlatformMap.json file with more platforms and fixed SNES extensions * feat: more progress on romsets * doc: updated readme to include new screenshots and discord link * fix: repairs an issue where the author column in signatures was too narrow * chore(deps): EmulatorJS version bump * feat: Collection build code mostly complete * fix: renamed collection classes to avoid conflicts in Swagger * Re-wrote collection builder to correct major bugs and performance * Completed collection builder and zipper * API changes completed * Fixed some last minute Collections API bugs * Collections mostly complete. Todo: delete button * Completed collections build
This commit is contained in:
@@ -6,12 +6,19 @@ namespace gaseous_server.Classes
|
||||
{
|
||||
public class Roms
|
||||
{
|
||||
public static List<GameRomItem> GetRoms(long GameId)
|
||||
public static List<GameRomItem> GetRoms(long GameId, long PlatformId = -1)
|
||||
{
|
||||
Database db = new gaseous_tools.Database(Database.databaseType.MySql, Config.DatabaseConfiguration.ConnectionString);
|
||||
string sql = "SELECT * FROM Games_Roms WHERE GameId = @id ORDER BY `Name`";
|
||||
Dictionary<string, object> dbDict = new Dictionary<string, object>();
|
||||
string sql = "";
|
||||
Dictionary<string, object> dbDict = new Dictionary<string, object>();
|
||||
dbDict.Add("id", GameId);
|
||||
|
||||
if (PlatformId == -1) {
|
||||
sql = "SELECT * FROM Games_Roms WHERE GameId = @id ORDER BY `Name`";
|
||||
} else {
|
||||
sql = "SELECT * FROM Games_Roms WHERE GameId = @id AND PlatformId = @platformid ORDER BY `Name`";
|
||||
dbDict.Add("platformid", PlatformId);
|
||||
}
|
||||
DataTable romDT = db.ExecuteCMD(sql, dbDict);
|
||||
|
||||
if (romDT.Rows.Count > 0)
|
||||
|
Reference in New Issue
Block a user