예제 #1
0
        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);
        }
예제 #2
0
        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));
            }
        }
예제 #3
0
        /// <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;
                }
            }));
        }
예제 #4
0
 public async Task <bool> SaveFavorites(string system)
 {
     _hsSerializer = new HyperspinSerializer(_hyperspinFrontEnd.Path, system);
     return(await _hsSerializer.SerializeFavoritesAsync(CurrentSystemsGames.Select(x => x.Game)));
 }