Ejemplo n.º 1
0
        /// <summary>
        /// Do the Download
        /// </summary>
        /// <returns>
        /// Return if Downloaded or not
        /// </returns>
        protected override bool DoDownload()
        {
            var imageDownloadURL = ThumbImageURL;

            // Set the download Path
            if (ThumbImageURL.Contains("/upload/small/"))
            {
                imageDownloadURL = ThumbImageURL.Replace(@"/upload/small/", @"/upload/big/");
            }
            else if (ThumbImageURL.Contains("/uploads/small/"))
            {
                imageDownloadURL = ThumbImageURL.Replace(@"/uploads/small/", @"/uploads/big/");
            }
            else if (ThumbImageURL.Contains("/img/small/"))
            {
                imageDownloadURL = ThumbImageURL.Replace(@"/img/small/", @"/img/big/");
            }
            else if (ThumbImageURL.Contains("/images/small/"))
            {
                imageDownloadURL = ThumbImageURL.Replace(@"/images/small/", @"/images/big/");
            }

            if (string.IsNullOrEmpty(imageDownloadURL) && this.ImageLinkURL.Contains("images/small"))
            {
                imageDownloadURL = this.ImageLinkURL.Replace(@"/images/small/", @"/images/big/");
            }

            // Set Image Name instead of using random name
            var filePath = this.GetImageName(this.PostTitle, imageDownloadURL, this.ImageNumber);

            // Finally Download the Image
            return(this.DownloadImageAsync(imageDownloadURL, filePath));
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Do the Download
        /// </summary>
        /// <returns>
        /// Returns if the Image was downloaded
        /// </returns>
        protected override bool DoDownload()
        {
            // Set the download Path
            var imageDownloadURL = ThumbImageURL.Replace("/thumb", string.Empty);

            // Set Image Name instead of using random name
            var filePath = this.GetImageName(this.PostTitle, imageDownloadURL, this.ImageNumber);

            // Finally Download the Image
            return(this.DownloadImageAsync(imageDownloadURL, filePath));
        }
Ejemplo n.º 3
0
        /// <summary>
        /// Do the Download
        /// </summary>
        /// <returns>
        /// Returns if the Image was downloaded
        /// </returns>
        protected override bool DoDownload()
        {
            // Set the download Path
            var imageDownloadURL = ThumbImageURL.Replace("_t.", ".");

            // Set Image Name
            var filePath = imageDownloadURL.Substring(imageDownloadURL.IndexOf("_") + 1);

            // Finally Download the Image
            return(this.DownloadImageAsync(imageDownloadURL, filePath));
        }
Ejemplo n.º 4
0
        /// <summary>
        /// Do the Download
        /// </summary>
        /// <returns>
        /// Returns if the Image was downloaded
        /// </returns>
        protected override bool DoDownload()
        {
            // Set the download Path
            var imageDownloadURL = ThumbImageURL.Replace("out.php/t", "out.php/i");

            // Set Image Name instead of using random name
            var filePath = imageDownloadURL.Substring(imageDownloadURL.IndexOf("_") + 1);

            // Finally Download the Image
            return this.DownloadImageAsync(imageDownloadURL, filePath);
        }