From fc0d164a9678c7fb53a276c53adf57baac7a778e Mon Sep 17 00:00:00 2001 From: Michael Green <84688932+michael-j-green@users.noreply.github.com> Date: Mon, 6 Jan 2025 22:55:06 +1100 Subject: [PATCH] WIP --- gaseous-server/Classes/DatabaseMigration.cs | 3 +- gaseous-server/Classes/ImportGames.cs | 162 +----------------- gaseous-server/Classes/Metadata/Games.cs | 5 +- gaseous-server/Classes/Metadata/Metadata.cs | 70 ++++++-- gaseous-server/Classes/Metadata/Storage.cs | 33 +++- gaseous-server/Classes/MetadataManagement.cs | 2 +- .../Controllers/V1.0/GamesController.cs | 3 +- .../Controllers/V1.0/SystemController.cs | 30 +--- gaseous-server/ProcessQueue.cs | 35 ++-- gaseous-server/Program.cs | 3 - 10 files changed, 98 insertions(+), 248 deletions(-) diff --git a/gaseous-server/Classes/DatabaseMigration.cs b/gaseous-server/Classes/DatabaseMigration.cs index 87ffd98..be3cf78 100644 --- a/gaseous-server/Classes/DatabaseMigration.cs +++ b/gaseous-server/Classes/DatabaseMigration.cs @@ -394,9 +394,8 @@ namespace gaseous_server.Classes ); HasheousClient.Models.Metadata.IGDB.Platform platform = Platforms.GetPlatform((long)row["PlatformId"]); - Game game = Games.GetGame(HasheousClient.Models.MetadataSources.IGDB, (long)row["GameId"]); - ImportGame.StoreROM(library, hash, game, platform, signature, (string)row["Path"], (long)row["Id"]); + ImportGame.StoreGame(library, hash, signature, platform, (string)row["Path"], (long)row["Id"]); count += 1; } diff --git a/gaseous-server/Classes/ImportGames.cs b/gaseous-server/Classes/ImportGames.cs index a94b8fc..097eb2d 100644 --- a/gaseous-server/Classes/ImportGames.cs +++ b/gaseous-server/Classes/ImportGames.cs @@ -465,83 +465,6 @@ namespace gaseous_server.Classes return SearchCandidates; } - public static long StoreROM(GameLibrary.LibraryItem library, Common.hashObject hash, gaseous_server.Models.Game determinedGame, Platform determinedPlatform, gaseous_server.Models.Signatures_Games discoveredSignature, string GameFileImportPath, long UpdateId = 0, bool SourceIsExternal = false) - { - Database db = new Database(Database.databaseType.MySql, Config.DatabaseConfiguration.ConnectionString); - - string sql = ""; - - Dictionary dbDict = new Dictionary(); - - if (UpdateId == 0) - { - sql = "INSERT INTO Games_Roms (PlatformId, GameId, Name, Size, CRC, MD5, SHA1, DevelopmentStatus, Attributes, RomType, RomTypeMedia, MediaLabel, RelativePath, MetadataSource, MetadataGameName, MetadataVersion, LibraryId, RomDataVersion) VALUES (@platformid, @gameid, @name, @size, @crc, @md5, @sha1, @developmentstatus, @Attributes, @romtype, @romtypemedia, @medialabel, @path, @metadatasource, @metadatagamename, @metadataversion, @libraryid, @romdataversion); SELECT CAST(LAST_INSERT_ID() AS SIGNED);"; - } - else - { - sql = "UPDATE Games_Roms SET PlatformId=@platformid, GameId=@gameid, Name=@name, Size=@size, DevelopmentStatus=@developmentstatus, Attributes=@Attributes, RomType=@romtype, RomTypeMedia=@romtypemedia, MediaLabel=@medialabel, MetadataSource=@metadatasource, MetadataGameName=@metadatagamename, MetadataVersion=@metadataversion, RomDataVersion=@romdataversion WHERE Id=@id;"; - dbDict.Add("id", UpdateId); - } - dbDict.Add("platformid", Common.ReturnValueIfNull(determinedPlatform.Id, 0)); - dbDict.Add("gameid", Common.ReturnValueIfNull(determinedGame.Id, 0)); - dbDict.Add("name", Common.ReturnValueIfNull(discoveredSignature.Rom.Name, 0)); - dbDict.Add("size", Common.ReturnValueIfNull(discoveredSignature.Rom.Size, 0)); - dbDict.Add("md5", hash.md5hash); - dbDict.Add("sha1", hash.sha1hash); - dbDict.Add("crc", Common.ReturnValueIfNull(discoveredSignature.Rom.Crc, "")); - dbDict.Add("developmentstatus", Common.ReturnValueIfNull(discoveredSignature.Rom.DevelopmentStatus, "")); - dbDict.Add("metadatasource", discoveredSignature.Rom.SignatureSource); - dbDict.Add("metadatagamename", discoveredSignature.Game.Name); - dbDict.Add("metadataversion", 2); - dbDict.Add("libraryid", library.Id); - dbDict.Add("romdataversion", 2); - - if (discoveredSignature.Rom.Attributes != null) - { - if (discoveredSignature.Rom.Attributes.Count > 0) - { - dbDict.Add("attributes", Newtonsoft.Json.JsonConvert.SerializeObject(discoveredSignature.Rom.Attributes)); - } - else - { - dbDict.Add("attributes", "[ ]"); - } - } - else - { - dbDict.Add("attributes", "[ ]"); - } - dbDict.Add("romtype", (int)discoveredSignature.Rom.RomType); - dbDict.Add("romtypemedia", Common.ReturnValueIfNull(discoveredSignature.Rom.RomTypeMedia, "")); - dbDict.Add("medialabel", Common.ReturnValueIfNull(discoveredSignature.Rom.MediaLabel, "")); - - string libraryRootPath = library.Path; - if (libraryRootPath.EndsWith(Path.DirectorySeparatorChar.ToString()) == false) - { - libraryRootPath += Path.DirectorySeparatorChar; - } - dbDict.Add("path", GameFileImportPath.Replace(libraryRootPath, "")); - - DataTable romInsert = db.ExecuteCMD(sql, dbDict); - long romId = 0; - if (UpdateId == 0) - { - romId = (long)romInsert.Rows[0][0]; - } - else - { - romId = UpdateId; - } - - // move to destination - if (library.IsDefaultLibrary == true) - { - MoveGameFile(romId, SourceIsExternal); - } - - return romId; - } - public static string ComputeROMPath(long RomId) { Classes.Roms.GameRomItem rom = Classes.Roms.GetRom(RomId); @@ -716,8 +639,7 @@ namespace gaseous_server.Classes 1, new List { - ProcessQueue.QueueItemType.OrganiseLibrary, - ProcessQueue.QueueItemType.Rematcher + ProcessQueue.QueueItemType.OrganiseLibrary }, false, true) @@ -876,7 +798,7 @@ namespace gaseous_server.Classes gaseous_server.Models.Game determinedGame = SearchForGame(sig, PlatformId, true); - StoreROM(library, hash, determinedGame, determinedPlatform, sig, LibraryFile); + StoreGame(library, hash, sig, determinedPlatform, LibraryFile, 0, false); } catch (Exception ex) { @@ -938,86 +860,6 @@ namespace gaseous_server.Classes Logging.Log(Logging.LogType.Information, "Library Scan", "Library scan completed"); } - - public void Rematcher(bool ForceExecute = false) - { - // rescan all titles with an unknown platform or title and see if we can get a match - Logging.Log(Logging.LogType.Information, "Rematch Scan", "Rematch scan starting"); - - Database db = new Database(Database.databaseType.MySql, Config.DatabaseConfiguration.ConnectionString); - - foreach (GameLibrary.LibraryItem library in GameLibrary.GetLibraries) - { - Logging.Log(Logging.LogType.Information, "Rematch Scan", "Rematch on library " + library.Name); - - string sql = ""; - if (ForceExecute == false) - { - sql = "SELECT * FROM view_Games_Roms WHERE (PlatformId = 0 AND GameId <> 0) OR (((PlatformId = 0 OR GameId = 0) AND MetadataSource = 0) OR (PlatformId = 0 AND GameId = 0)) AND (LastMatchAttemptDate IS NULL OR LastMatchAttemptDate < @lastmatchattemptdate) AND LibraryId = @libraryid LIMIT 100;"; - } - else - { - sql = "SELECT * FROM view_Games_Roms WHERE (PlatformId = 0 AND GameId <> 0) OR (((PlatformId = 0 OR GameId = 0) AND MetadataSource = 0) OR (PlatformId = 0 AND GameId = 0)) AND LibraryId = @libraryid;"; - } - Dictionary dbDict = new Dictionary(); - dbDict.Add("lastmatchattemptdate", DateTime.UtcNow.AddDays(-7)); - dbDict.Add("libraryid", library.Id); - DataTable data = db.ExecuteCMD(sql, dbDict); - int StatusCount = -0; - foreach (DataRow row in data.Rows) - { - SetStatus(StatusCount, data.Rows.Count, "Running rematcher"); - - // get rom info - long romId = (long)row["Id"]; - string romPath = (string)row["Path"]; - Common.hashObject hash = new Common.hashObject - { - md5hash = (string)row["MD5"], - sha1hash = (string)row["SHA1"] - }; - FileInfo fi = new FileInfo(romPath); - - Logging.Log(Logging.LogType.Information, "Rematch Scan", "Running rematch against " + romPath); - - // determine rom signature - FileSignature fileSignature = new FileSignature(); - gaseous_server.Models.Signatures_Games sig = fileSignature.GetFileSignature(library, hash, fi, romPath); - - // get discovered platform - long PlatformId; - Platform determinedPlatform; - - if (sig.Flags.PlatformId == null || sig.Flags.PlatformId == 0) - { - // no platform discovered in the signature - PlatformId = library.DefaultPlatformId; - } - else - { - // use the platform discovered in the signature - PlatformId = (long)sig.Flags.PlatformId; - } - determinedPlatform = Platforms.GetPlatform(PlatformId); - - gaseous_server.Models.Game determinedGame = SearchForGame(sig, PlatformId, true); - - StoreROM(library, hash, determinedGame, determinedPlatform, sig, romPath, romId); - - string attemptSql = "UPDATE Games_Roms SET LastMatchAttemptDate=@lastmatchattemptdate WHERE Id=@id;"; - Dictionary dbLastAttemptDict = new Dictionary(); - dbLastAttemptDict.Add("id", romId); - dbLastAttemptDict.Add("lastmatchattemptdate", DateTime.UtcNow); - db.ExecuteCMD(attemptSql, dbLastAttemptDict); - - StatusCount += 1; - } - ClearStatus(); - - Logging.Log(Logging.LogType.Information, "Rematch Scan", "Rematch scan completed"); - ClearStatus(); - } - } } } diff --git a/gaseous-server/Classes/Metadata/Games.cs b/gaseous-server/Classes/Metadata/Games.cs index a59b3fa..7f3b31d 100644 --- a/gaseous-server/Classes/Metadata/Games.cs +++ b/gaseous-server/Classes/Metadata/Games.cs @@ -231,7 +231,7 @@ namespace gaseous_server.Classes.Metadata } } - public static List GetAvailablePlatforms(string UserId, long GameId) + public static List GetAvailablePlatforms(string UserId, HasheousClient.Models.MetadataSources SourceType, long GameId) { Database db = new Database(Database.databaseType.MySql, Config.DatabaseConfiguration.ConnectionString); string sql = @" @@ -273,10 +273,11 @@ FROM LEFT JOIN view_Games_Roms AS GFV ON GFV.Id = User_GameFavouriteRoms.RomId WHERE - view_Games_Roms.MetadataMapId = @gameid + view_Games_Roms.GameIdType = @sourcetype AND view_Games_Roms.GameId = @gameid ORDER BY Platform.`Name`;"; Dictionary dbDict = new Dictionary { + { "sourcetype", (int)SourceType }, { "gameid", GameId }, { "userid", UserId } }; diff --git a/gaseous-server/Classes/Metadata/Metadata.cs b/gaseous-server/Classes/Metadata/Metadata.cs index 544d5ff..0853c47 100644 --- a/gaseous-server/Classes/Metadata/Metadata.cs +++ b/gaseous-server/Classes/Metadata/Metadata.cs @@ -1,3 +1,5 @@ +using System.Data; + namespace gaseous_server.Classes.Metadata { public class Metadata @@ -174,17 +176,43 @@ namespace gaseous_server.Classes.Metadata // get T type as string string type = typeof(T).Name; - // get metadata from the server - Communications comms = new Communications(); - var results = await comms.APIComm(SourceType, (Communications.MetadataEndpoint)Enum.Parse(typeof(Communications.MetadataEndpoint), type, true), Id); - - // check for errors - if (results == null) + if (SourceType == HasheousClient.Models.MetadataSources.None) { - throw new InvalidMetadataId(SourceType, Id); - } + // generate a dummy object + var returnObject = (T)Activator.CreateInstance(typeof(T)); + returnObject.GetType().GetProperty("Id").SetValue(returnObject, Id); - return results.FirstOrDefault(); + // if returnObject has a property called "name", query the metadatamap view for the name + if (returnObject.GetType().GetProperty("Name") != null) + { + Database db = new Database(Database.databaseType.MySql, Config.DatabaseConfiguration.ConnectionString); + string sql = "SELECT SignatureGameName FROM view_MetadataMap WHERE `Id` = @id;"; + DataTable dataTable = db.ExecuteCMD(sql, new Dictionary + { + { "@id", Id } + }); + if (dataTable.Rows.Count > 0) + { + returnObject.GetType().GetProperty("Name").SetValue(returnObject, dataTable.Rows[0]["SignatureGameName"].ToString()); + } + } + + return returnObject; + } + else + { + // get metadata from the server + Communications comms = new Communications(); + var results = await comms.APIComm(SourceType, (Communications.MetadataEndpoint)Enum.Parse(typeof(Communications.MetadataEndpoint), type, true), Id); + + // check for errors + if (results == null) + { + throw new InvalidMetadataId(SourceType, Id); + } + + return results.FirstOrDefault(); + } } private static async Task GetMetadataFromServer(HasheousClient.Models.MetadataSources SourceType, string Id) where T : class @@ -192,17 +220,25 @@ namespace gaseous_server.Classes.Metadata // get T type as string string type = typeof(T).Name; - // get metadata from the server - Communications comms = new Communications(); - var results = await comms.APIComm(SourceType, (Communications.MetadataEndpoint)Enum.Parse(typeof(Communications.MetadataEndpoint), type, true), Id); - - // check for errors - if (results == null) + if (SourceType == HasheousClient.Models.MetadataSources.None) { - throw new InvalidMetadataId(SourceType, Id); + // generate a dummy object + return (T)Activator.CreateInstance(typeof(T)); } + else + { + // get metadata from the server + Communications comms = new Communications(); + var results = await comms.APIComm(SourceType, (Communications.MetadataEndpoint)Enum.Parse(typeof(Communications.MetadataEndpoint), type, true), Id); - return results.FirstOrDefault(); + // check for errors + if (results == null) + { + throw new InvalidMetadataId(SourceType, Id); + } + + return results.FirstOrDefault(); + } } #endregion diff --git a/gaseous-server/Classes/Metadata/Storage.cs b/gaseous-server/Classes/Metadata/Storage.cs index c313a52..2d50907 100644 --- a/gaseous-server/Classes/Metadata/Storage.cs +++ b/gaseous-server/Classes/Metadata/Storage.cs @@ -217,13 +217,13 @@ namespace gaseous_server.Classes.Metadata newObjectValue = Newtonsoft.Json.JsonConvert.SerializeObject(newDict["Ids"]); objectDict[key.Key] = newObjectValue; - StoreRelations(ObjectTypeName, key.Key, (long)objectDict["Id"], newObjectValue); + StoreRelations(SourceType, ObjectTypeName, key.Key, (long)objectDict["Id"], newObjectValue); break; case "list": newObjectValue = Newtonsoft.Json.JsonConvert.SerializeObject(objectValue); objectDict[key.Key] = newObjectValue; - StoreRelations(ObjectTypeName, key.Key, (long)objectDict["Id"], newObjectValue); + StoreRelations(SourceType, ObjectTypeName, key.Key, (long)objectDict["Id"], newObjectValue); break; case "int32[]": @@ -372,7 +372,7 @@ namespace gaseous_server.Classes.Metadata return EndpointType; } - private static void StoreRelations(string PrimaryTable, string SecondaryTable, long ObjectId, string Relations) + private static void StoreRelations(HasheousClient.Models.MetadataSources SourceType, string PrimaryTable, string SecondaryTable, long ObjectId, string Relations) { string TableName = "Relation_" + PrimaryTable + "_" + SecondaryTable; Database db = new Database(Database.databaseType.MySql, Config.DatabaseConfiguration.ConnectionString); @@ -381,7 +381,13 @@ namespace gaseous_server.Classes.Metadata if (data.Rows.Count == 0) { // table doesn't exist, create it - sql = "CREATE TABLE `" + Config.DatabaseConfiguration.DatabaseName + "`.`" + TableName + "` (`" + PrimaryTable + "Id` BIGINT NOT NULL, `" + SecondaryTable + "Id` BIGINT NOT NULL, PRIMARY KEY (`" + PrimaryTable + "Id`, `" + SecondaryTable + "Id`), INDEX `idx_PrimaryColumn` (`" + PrimaryTable + "Id` ASC) VISIBLE);"; + sql = @" + CREATE TABLE + `" + Config.DatabaseConfiguration.DatabaseName + "`.`" + TableName + @"` + (`" + PrimaryTable + @"SourceId` INT NOT NULL, + `" + PrimaryTable + @"Id` BIGINT NOT NULL, + `" + SecondaryTable + @"Id` BIGINT NOT NULL, + PRIMARY KEY (`" + PrimaryTable + "SourceId`, `" + PrimaryTable + "Id`, `" + SecondaryTable + "Id`), INDEX `idx_PrimaryColumn` (`" + PrimaryTable + "Id` ASC) VISIBLE);"; db.ExecuteCMD(sql); } else @@ -397,10 +403,13 @@ namespace gaseous_server.Classes.Metadata long[] RelationValues = Newtonsoft.Json.JsonConvert.DeserializeObject(Relations); foreach (long RelationValue in RelationValues) { - sql = "INSERT INTO " + TableName + " (`" + PrimaryTable + "Id`, `" + SecondaryTable + "Id`) VALUES (@objectid, @relationvalue);"; - Dictionary dbDict = new Dictionary(); - dbDict.Add("objectid", ObjectId); - dbDict.Add("relationvalue", RelationValue); + sql = "INSERT INTO " + TableName + " (`" + PrimaryTable + "SourceId`, `" + PrimaryTable + "Id`, `" + SecondaryTable + "Id`) VALUES (@sourceid, @objectid, @relationvalue);"; + Dictionary dbDict = new Dictionary + { + { "sourceid", SourceType }, + { "objectid", ObjectId }, + { "relationvalue", RelationValue } + }; db.ExecuteCMD(sql, dbDict); } } @@ -422,7 +431,13 @@ namespace gaseous_server.Classes.Metadata if (data.Rows.Count == 0) { // table doesn't exist, create it - sql = "CREATE TABLE `" + Config.DatabaseConfiguration.DatabaseName + "`.`" + TableName + "` (`" + PrimaryTable + "Id` BIGINT NOT NULL, `" + SecondaryTable + "Id` BIGINT NOT NULL, PRIMARY KEY (`" + PrimaryTable + "Id`, `" + SecondaryTable + "Id`), INDEX `idx_PrimaryColumn` (`" + PrimaryTable + "Id` ASC) VISIBLE);"; + sql = @" + CREATE TABLE + `" + Config.DatabaseConfiguration.DatabaseName + "`.`" + TableName + @"` + (`" + PrimaryTable + @"SourceId` INT NOT NULL, + `" + PrimaryTable + @"Id` BIGINT NOT NULL, + `" + SecondaryTable + @"Id` BIGINT NOT NULL, + PRIMARY KEY (`" + PrimaryTable + "SourceId`, `" + PrimaryTable + "Id`, `" + SecondaryTable + "Id`), INDEX `idx_PrimaryColumn` (`" + PrimaryTable + "Id` ASC) VISIBLE);"; db.ExecuteCMD(sql); } } diff --git a/gaseous-server/Classes/MetadataManagement.cs b/gaseous-server/Classes/MetadataManagement.cs index 0a7198d..03a5561 100644 --- a/gaseous-server/Classes/MetadataManagement.cs +++ b/gaseous-server/Classes/MetadataManagement.cs @@ -334,7 +334,7 @@ namespace gaseous_server.Classes else { // when run normally, update all games (since this will honour cache timeouts) - sql = "SELECT MetadataSourceId AS `Id`, MetadataSourceType AS `GameIdType`, SignatureGameName AS `Name` FROM gaseous.view_MetadataMap;"; + sql = "SELECT DISTINCT MetadataSourceId AS `Id`, MetadataSourceType AS `GameIdType`, SignatureGameName AS `Name` FROM gaseous.view_MetadataMap;"; } dt = db.ExecuteCMD(sql); diff --git a/gaseous-server/Controllers/V1.0/GamesController.cs b/gaseous-server/Controllers/V1.0/GamesController.cs index 4194630..b630429 100644 --- a/gaseous-server/Controllers/V1.0/GamesController.cs +++ b/gaseous-server/Controllers/V1.0/GamesController.cs @@ -1060,7 +1060,8 @@ namespace gaseous_server.Controllers if (user != null) { - return Ok(Games.GetAvailablePlatforms(user.Id, MetadataMapId)); + MetadataMap.MetadataMapItem metadataMap = Classes.MetadataManagement.GetMetadataMap(MetadataMapId).PreferredMetadataMapItem; + return Ok(Games.GetAvailablePlatforms(user.Id, metadataMap.SourceType, metadataMap.SourceId)); } else { diff --git a/gaseous-server/Controllers/V1.0/SystemController.cs b/gaseous-server/Controllers/V1.0/SystemController.cs index 6726719..bc7d9d5 100644 --- a/gaseous-server/Controllers/V1.0/SystemController.cs +++ b/gaseous-server/Controllers/V1.0/SystemController.cs @@ -525,8 +525,7 @@ ORDER BY Platform.`Name`; "; this._Blocks = new List{ ProcessQueue.QueueItemType.LibraryScan, ProcessQueue.QueueItemType.LibraryScanWorker, - ProcessQueue.QueueItemType.TitleIngestor, - ProcessQueue.QueueItemType.Rematcher + ProcessQueue.QueueItemType.TitleIngestor }; break; @@ -548,32 +547,7 @@ ORDER BY Platform.`Name`; "; this.DefaultAllowedEndHours = 23; this.DefaultAllowedEndMinutes = 59; this._Blocks = new List{ - ProcessQueue.QueueItemType.OrganiseLibrary, - ProcessQueue.QueueItemType.Rematcher - }; - break; - - case ProcessQueue.QueueItemType.Rematcher: - this._UserManageable = true; - this.DefaultInterval = 1440; - this.MinimumAllowedInterval = 360; - this.DefaultAllowedDays = new List{ - DayOfWeek.Sunday, - DayOfWeek.Monday, - DayOfWeek.Tuesday, - DayOfWeek.Wednesday, - DayOfWeek.Thursday, - DayOfWeek.Friday, - DayOfWeek.Saturday - }; - this.DefaultAllowedStartHours = 0; - this.DefaultAllowedStartMinutes = 0; - this.DefaultAllowedEndHours = 23; - this.DefaultAllowedEndMinutes = 59; - this._Blocks = new List{ - ProcessQueue.QueueItemType.OrganiseLibrary, - ProcessQueue.QueueItemType.LibraryScan, - ProcessQueue.QueueItemType.LibraryScanWorker + ProcessQueue.QueueItemType.OrganiseLibrary }; break; diff --git a/gaseous-server/ProcessQueue.cs b/gaseous-server/ProcessQueue.cs index 07dd941..3e2c506 100644 --- a/gaseous-server/ProcessQueue.cs +++ b/gaseous-server/ProcessQueue.cs @@ -9,8 +9,8 @@ using NuGet.Packaging; namespace gaseous_server { - public static class ProcessQueue - { + public static class ProcessQueue + { public static List QueueItems = new List(); public class QueueItem @@ -115,8 +115,8 @@ namespace gaseous_server }; private List _Blocks = new List(); - public List AllowedDays - { + public List AllowedDays + { get { return _AllowedDays; @@ -124,7 +124,7 @@ namespace gaseous_server set { _AllowedDays = value; - } + } } public int AllowedStartHours { get; set; } = 0; public int AllowedStartMinutes { get; set; } = 0; @@ -135,7 +135,7 @@ namespace gaseous_server public DateTime LastRunTime => _LastRunTime; public DateTime LastFinishTime => _LastFinishTime; public double LastRunDuration => _LastRunDuration; - public DateTime NextRunTime + public DateTime NextRunTime { get { @@ -338,18 +338,6 @@ namespace gaseous_server break; - case QueueItemType.Rematcher: - Logging.Log(Logging.LogType.Debug, "Timered Event", "Starting Rematch"); - Classes.ImportGame importRematch = new ImportGame - { - CallingQueueItem = this - }; - importRematch.Rematcher(_ForceExecute); - - _SaveLastRunTime = true; - - break; - case QueueItemType.CollectionCompiler: Logging.Log(Logging.LogType.Debug, "Timered Event", "Starting Collection Compiler"); Dictionary collectionOptions = (Dictionary)Options; @@ -368,7 +356,8 @@ namespace gaseous_server case QueueItemType.DailyMaintainer: Logging.Log(Logging.LogType.Debug, "Timered Event", "Starting Daily Maintenance"); - Classes.Maintenance maintenance = new Maintenance{ + Classes.Maintenance maintenance = new Maintenance + { CallingQueueItem = this }; maintenance.RunDailyMaintenance(); @@ -379,7 +368,8 @@ namespace gaseous_server case QueueItemType.WeeklyMaintainer: Logging.Log(Logging.LogType.Debug, "Timered Event", "Starting Weekly Maintenance"); - Classes.Maintenance weeklyMaintenance = new Maintenance{ + Classes.Maintenance weeklyMaintenance = new Maintenance + { CallingQueueItem = this }; weeklyMaintenance.RunWeeklyMaintenance(); @@ -572,11 +562,6 @@ namespace gaseous_server /// LibraryScanWorker, - /// - /// Looks for roms in the library that have an unknown platform or game match - /// - Rematcher, - /// /// Builds collections - set the options attribute to the id of the collection to build /// diff --git a/gaseous-server/Program.cs b/gaseous-server/Program.cs index fc32f86..8c7ce5c 100644 --- a/gaseous-server/Program.cs +++ b/gaseous-server/Program.cs @@ -351,9 +351,6 @@ ProcessQueue.QueueItems.Add(new ProcessQueue.QueueItem( ProcessQueue.QueueItems.Add(new ProcessQueue.QueueItem( ProcessQueue.QueueItemType.LibraryScan) ); -ProcessQueue.QueueItems.Add(new ProcessQueue.QueueItem( - ProcessQueue.QueueItemType.Rematcher) - ); // maintenance tasks ProcessQueue.QueueItem dailyMaintenance = new ProcessQueue.QueueItem(