private IGameScreenshotCache DownloadScreenshots(IGameImagesResult imagesResult, string cacheKey) { IGameScreenshotCache screenshotCache = new GameScreenshotCache(cacheKey); foreach (string screenshotUri in imagesResult.Screenshots) { screenshotCache.AddScreenshot(new Uri(screenshotUri)); } return screenshotCache; }
private IGameMediaCache DownloadResults(IGameImagesResult imagesResult, string cacheKey) { IGameMediaCache mediaCache = new GameMediaCache(cacheKey); if (imagesResult.Boxarts.ContainsKey(ImagesInfoFields.img_boxart_back)) mediaCache.SetBoxartBack(new Uri(imagesResult.Boxarts[ImagesInfoFields.img_boxart_back])); if (imagesResult.Boxarts.ContainsKey(ImagesInfoFields.img_boxart_front)) mediaCache.SetBoxartFront(new Uri(imagesResult.Boxarts[ImagesInfoFields.img_boxart_front])); if (imagesResult.Boxarts.ContainsKey(ImagesInfoFields.img_boxart_full)) mediaCache.SetBoxartFull(new Uri(imagesResult.Boxarts[ImagesInfoFields.img_boxart_full])); if(imagesResult.Fanarts.Count > 0) mediaCache.SetGameFanart(new Uri(imagesResult.Fanarts[0])); return mediaCache; }