VideoLib is failing to retrieve poster art
Here is a sample log.
18089:164118.006 [ Timer-4] INFO TVDB Request URL: http://thetvdb.com/banners/episodes/260315/4880309.jpg 18089:164118.023 [ Timer-4] ERROR TVDB Error making HTTP request: image == null! java.lang.IllegalArgumentException: image == null! at javax.imageio.ImageTypeSpecifier.createFromRenderedImage(ImageTypeSpecifier.java:925) at javax.imageio.ImageIO.getWriter(ImageIO.java:1592) at javax.imageio.ImageIO.write(ImageIO.java:1520) at com.ximba.videolib.TVDB.requestImage(TVDB.java:504) at com.ximba.videolib.TVDB.updateEntry(TVDB.java:547) at com.ximba.videolib.TVDB.queryDB(TVDB.java:572) at com.ximba.videolib.UI$ScanTV.run(UI.java:299) at java.util.TimerThread.mainLoop(Timer.java:555) at java.util.TimerThread.run(Timer.java:505)
Which appears to be this bit of code:
URL url = new URL(urlStr); BufferedImage image = ImageIO.read(url); if ( ImageIO.write(image, "png", new File( fileName ) ) ) return; else log.error("Failed write - no image appropriate write available.");
So either the "new URL" fails to generate a proper URL for ImageIO or ImageIO.read() has change syntax or something.
Updated by Hammel about 5 years ago
- Status changed from New to Closed
- % Done changed from 0 to 100
Their API returns a link that is "http" but that redirects to "https" and ImageIO doesn't handle that. The solution, since I know https works with both TheMovieDB.org and TheTVDB.com, is to simply replace any leading "http:" with "https:" before retrieving the image. Problem solved.
Tested, committed and pushed.