Normal
MediaPortal Version: 1.0The Util.DownLoadImage method is unable to cope with file URLs. It throws the following error:[CODE]Utils: DownLoadImage D:\tmp\MyImage.jpg failed:Unable to cast object of type 'System.Net.FileWebRequest' to type 'System.Net.HttpWebRequest'.[/CODE]The reason why I would like this method to be able to "download" local files is that I have written a MovieInfo grabber that retrieves ThumbURL (i.e. movie covers) from my local disk rather than from the web.The problem is very easy to reproduce:- Modify allocinf_fr.csscript so that movieDetails.ThumbURL = "file://(something on your disk)"- Use the "FR: Allocine grabber" in the MediaPortal configuration- Grab a movie-> No thumbnails generated & error message in Configuration.logOne might also wonder why MediaPortal is trying to "download" a file that is already present on the local disk. So fixing this might actually hide a problem located elsewhere (if local file then use it, else download).I suspect that the root cause is located in MediaPortal.Video.Database.IMDBFetcher.DownloadCoverArt() where a temporary file is created to contain the downloaded image. If the image is on a local disk (i.e. URL with the "file" scheme), no temporary file should be required.Regards,Frédéric.
MediaPortal Version: 1.0
The Util.DownLoadImage method is unable to cope with file URLs. It throws the following error:
[CODE]Utils: DownLoadImage D:\tmp\MyImage.jpg failed:Unable to cast object of type 'System.Net.FileWebRequest' to type 'System.Net.HttpWebRequest'.[/CODE]
The reason why I would like this method to be able to "download" local files is that I have written a MovieInfo grabber that retrieves ThumbURL (i.e. movie covers) from my local disk rather than from the web.
The problem is very easy to reproduce:
- Modify allocinf_fr.csscript so that movieDetails.ThumbURL = "file://(something on your disk)"
- Use the "FR: Allocine grabber" in the MediaPortal configuration
- Grab a movie
-> No thumbnails generated & error message in Configuration.log
One might also wonder why MediaPortal is trying to "download" a file that is already present on the local disk. So fixing this might actually hide a problem located elsewhere (if local file then use it, else download).
I suspect that the root cause is located in MediaPortal.Video.Database.IMDBFetcher.DownloadCoverArt() where a temporary file is created to contain the downloaded image. If the image is on a local disk (i.e. URL with the "file" scheme), no temporary file should be required.
Regards,
Frédéric.