Page 1 of 1

thumbnail URLs with spaces in the file names

PostPosted: Tue Oct 09, 2012 8:03 am
by ttguy
Serviio fails to load a thumbnail URL like this
http://videocdn.sbs.com.au/u/video/SBS_ ... 180/S2137M farewell.jpg

But if I paste it into my browser it does work

as I paste it into the browser chrome automatically replaces the space in the file name with the %20

http://videocdn.sbs.com.au/u/video/SBS_ ... rewell.jpg

So who's job is it to encode spaces in URL file names? My plugin or serviio when it trys to resolve the filenames? It would be better if it was the later because I would think this would be the same issue with all plugins.

  Code:
2,122 DEBUG [OnlineLibraryManager] Thumbnail http://videocdn.sbs.com.au/u/video/SBS_Production/125/180/S2137M farewell.jpg not in cache yet, loading it
2012-10-09 18:32:22,529 WARN  [FeedUpdaterThread] An error occured while retrieving thumbnail, will remove it from the item the and will continue
org.serviio.library.online.CannotRetrieveThumbnailException: Failed to download thumbnail http://videocdn.sbs.com.au/u/video/SBS_Production/125/180/S2137M farewell.jpg.
   at org.serviio.library.online.OnlineLibraryManager.findThumbnail(OnlineLibraryManager.java:266)
   at org.serviio.library.online.metadata.FeedUpdaterThread.run(FeedUpdaterThread.java:107)
Caused by: java.io.FileNotFoundException: http://videocdn.sbs.com.au/u/video/SBS_Production/125/180/S2137M farewell.jpg
   at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1401)
   at org.serviio.util.HttpClient.retrieveBinaryFileFromURL(HttpClient.java:72)
   at org.serviio.library.online.OnlineLibraryManager.findThumbnail(OnlineLibraryManager.java:258)
   ... 1 more

Re: thumbnail URLs with spaces in the file names

PostPosted: Tue Oct 09, 2012 8:43 pm
by zip
Space is not valid in URL, therefore the plugin should provide a valid URL. I want to leave it up to the plugin dev to provide a complete URL, so that they can test it and build the plugin to the required spec and Serviio doesn't screw that up further down the line.

Re: thumbnail URLs with spaces in the file names

PostPosted: Tue Oct 09, 2012 8:53 pm
by ttguy
Fair enough.