public async Task ScanForRoms(string systemName, string rlPath) { if (!Directory.Exists(rlPath)) { return; } IRomScan romScan = new RomScanner(); await romScan.ScanRlRomPathsAsync(CurrentSystemsGames.Select(x => x.Game), rlPath, systemName); }
public async Task AuditMedia(string systemName) { _auditer = new HyperspinAudit(_hyperspinFrontEnd, new MediaHelperHs(_hyperspinFrontEnd.Path, systemName)); if (systemName.ToLower().Contains("main menu")) { await _auditer.ScanMainMenuMediaAsync(CurrentSystemsGames.Select(x => x.Game)); } else { await _auditer.ScanForMediaAsync(CurrentSystemsGames.Select(x => x.Game)); } }
/// <summary> /// Saves the current games list to XML asynchronous. /// </summary> /// <param name="systemName"></param> /// <param name="dbName">Name of the database.</param> /// <returns></returns> public async Task <bool> SaveCurrentGamesListToXmlAsync(string systemName, string dbName) { return(await Task.Run(async() => { try { _hsSerializer = new HyperspinSerializer(_hyperspinFrontEnd.Path, systemName, dbName); var games = CurrentSystemsGames.Select(x => x.Game); await _hsSerializer.SerializeAsync(games, false); return true; } catch (System.Exception) { return false; } })); }
public async Task <bool> SaveFavorites(string system) { _hsSerializer = new HyperspinSerializer(_hyperspinFrontEnd.Path, system); return(await _hsSerializer.SerializeFavoritesAsync(CurrentSystemsGames.Select(x => x.Game))); }