steps to reproduce the issue
In configuration mode, select any Title from Database and go to CoverArt. Set the value of Image URL http://pics.filmaffinity.com/Carmina_o_revienta-570033301-large.jpg and Download Manually. You get the Error
LogError
Now open your Internet Browser and download it. The image is OK.
File Util.cs Routine DownLoadImage
Problem: some webs requires a header "User-Agent" (ex. FilmAffinity), but not all. IMDb don't work if you set the header "User-Agent".
Solution:
a) use a simple flag if (movieDetails.ThumbURL.Contains("filmaffinity")) client .Headers.Add("User-Agent", "Mozilla/"....
b) use (HttpWebRequest)WebRequest instead of WebClient
c) Team Media Portal have a lot of developpers with much more knowledge than me. In spanish Doctores tiene la Iglesia (translation from the Collins Dictionary there are plenty of people well able to pass an opinion (on that))
Greetings from Spain
P.S. This is my first report, i hope post it in the correct place
In configuration mode, select any Title from Database and go to CoverArt. Set the value of Image URL http://pics.filmaffinity.com/Carmina_o_revienta-570033301-large.jpg and Download Manually. You get the Error
LogError
Code:
[2014-08-22 21:37:57,707] [Config ] [IMDBDetails] [INFO ] - Utils: DownLoadImage http://pics.filmaffinity.com/Carmina_o_revienta-570033301-large.jpg failed:The remote server returned an error: (403) Forbidden.
File Util.cs Routine DownLoadImage
Code:
public static void DownLoadImage(string strURL, string strFile, System.Drawing.Imaging.ImageFormat imageFormat)
...
using (WebClient client = new WebClient())
...
client.Proxy.Credentials = CredentialCache.DefaultCredentials;
client.DownloadFile(strURL, strLogo);
Problem: some webs requires a header "User-Agent" (ex. FilmAffinity), but not all. IMDb don't work if you set the header "User-Agent".
Solution:
a) use a simple flag if (movieDetails.ThumbURL.Contains("filmaffinity")) client .Headers.Add("User-Agent", "Mozilla/"....
b) use (HttpWebRequest)WebRequest instead of WebClient
c) Team Media Portal have a lot of developpers with much more knowledge than me. In spanish Doctores tiene la Iglesia (translation from the Collins Dictionary there are plenty of people well able to pass an opinion (on that))
Greetings from Spain
P.S. This is my first report, i hope post it in the correct place
Last edited: