home
products
contribute
download
documentation
forum
Home
Forums
New posts
Search forums
What's new
New posts
All posts
Latest activity
Members
Registered members
Current visitors
Donate
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Search titles only
By:
Menu
Log in
Register
Navigation
Install the app
Install
More options
Contact us
Close Menu
Forums
MediaPortal 1
Support
General Support
Bug in the Util.DownLoadImage method
Contact us
RSS
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="bradype" data-source="post: 402748" data-attributes="member: 82416"><p><strong>MediaPortal Version</strong>: 1.0</p><p></p><p>The Util.DownLoadImage method is unable to cope with file URLs. It throws the following error:</p><p></p><p>[CODE]Utils: DownLoadImage D:\tmp\MyImage.jpg failed:Unable to cast object of type 'System.Net.FileWebRequest' to type 'System.Net.HttpWebRequest'.[/CODE]</p><p></p><p>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.</p><p></p><p>The problem is very easy to reproduce:</p><p>- Modify allocinf_fr.csscript so that movieDetails.ThumbURL = "file://(something on your disk)"</p><p>- Use the "FR: Allocine grabber" in the MediaPortal configuration</p><p>- Grab a movie</p><p>-> No thumbnails generated & error message in Configuration.log</p><p></p><p>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).</p><p>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.</p><p></p><p>Regards,</p><p></p><p>Frédéric.</p></blockquote><p></p>
[QUOTE="bradype, post: 402748, member: 82416"] [b]MediaPortal Version[/b]: 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. [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
MediaPortal 1
Support
General Support
Bug in the Util.DownLoadImage method
Contact us
RSS
Top
Bottom