Example #1
0
        private async Task <bool> ProcessPoster(IPosterImageOwner imageOwner)
        {
            if (string.IsNullOrEmpty(imageOwner.PosterPath) || !string.IsNullOrEmpty(imageOwner.PosterBlurHash))
            {
                return(false);
            }

            var tempFile   = _tempFileService.GetFilename("download", ".jpg");
            var downloaded = await _detailsApi.DownloadImage(342, imageOwner.PosterPath, tempFile);

            if (!downloaded)
            {
                return(false);
            }
            await _dispatcher.Dispatch(new SetImageCommand <IPosterImageOwner>(imageOwner, tempFile, $"{Guid.NewGuid()}.jpg"));

            return(true);
        }