public static void LinkGameOnPcToGameOnSd(GameOnPc gameOnPc, GameOnSd gameOnSd)
 {
     gameOnPc.IsInSdCard      = true;
     gameOnPc.MustBeOnSd      = true;
     gameOnPc.SdFolder        = gameOnSd.Path;
     gameOnPc.SdSize          = FileManager.GetDirectorySize(gameOnSd.FullPath);
     gameOnPc.SdFormattedSize = FileManager.GetDirectoryFormattedSize(gameOnSd.FullPath);
 }
        /// <summary>
        /// Extract game information from a folder
        /// </summary>
        /// <param name="folderPath"></param>
        /// <returns></returns>
        private static BaseGame ExtractGameData(string folderPath)
        {
            BaseGame game = null;

            string imagePath = FileManager.GetImageFilesPathInFolder(folderPath).FirstOrDefault();

            if (!string.IsNullOrEmpty(imagePath) && imagePath.EndsWith(".gdi"))
            {
                var gdiReader = new GdiReader();
                game = gdiReader.ExtractGameData(imagePath);
            }
            else if (!string.IsNullOrEmpty(imagePath) && imagePath.EndsWith(".cdi"))
            {
                using (var fs = File.OpenRead(imagePath))
                {
                    var cdiReader = new CdiReader();
                    game = cdiReader.ExtractGameData(imagePath);
                }
            }
            else
            {
                game = new BaseGame
                {
                    FullPath      = folderPath,
                    Path          = folderPath.Split(Path.DirectorySeparatorChar).Last(),
                    Size          = FileManager.GetDirectorySize(folderPath),
                    FormattedSize = FileManager.GetDirectoryFormattedSize(folderPath)
                };
            }

            if (game.GameName == "GDMENU")
            {
                return(null);
            }

            return(game);
        }