Your Universal Remote Control Center
RemoteCentral.com
Philips Pronto Professional Forum - View Post
Up level
Up level
The following page was printed from RemoteCentral.com:

Login:
Pass:
 
 

Original thread:
Post 1 made on Friday February 18, 2022 at 18:39
mpg7321
Regular Member
Joined:
Posts:
June 2020
111
Been using this script for KODI for a while, worked great for retrieving the cover art for movies. Checked to make sure KODI did not change some thing, it did not. Have varied that the script is parsing out the correct data for "CoverMovie1 and 2", this script worked great until the other day, if I use manually assign data into the variables, just to make sure its not a parsing issue, still no go.

var coverMovie1 = "9767";
var coverMovie2 = "the-break-up-57f3a9b480b06";

No IOError being displayed


function kodi4(){
var socket = new TCPSocket();
var receivedData = "";
var coverMovie2 = "the-break-up-57f3a9b480b06";
socket.onConnect = function() {
socket.write("GET /thumb.php?src=/fanart/movies/"+coverMovie1+"/movieposter/"+coverMovie2+".jpg&a=t&h=210&w=139 HTTP/1.0\r\n");
socket.write("HOST:assets.fanart.tv\r\n");
socket.write("CONNECTION: close\r\n");
socket.write("\r\n");
};
socket.onData = function() {
receivedData += socket.read();
};
socket.onIOError = function (e) {
GUI.widget("data").label = "IOError " + e;
};
socket.onClose = function () {
var imageStartIndex, bitmapData, myImage;
imageStartIndex = receivedData.indexOf("\r\n\r\n");
bitmapData = receivedData.substring(imageStartIndex+4);
myImage = new Image(bitmapData);
GUI.widget("MOVIE_COVER").setImage(myImage);
GUI.widget("MOVIE_COVER").stretchImage = true;
};
socket.connect("assets.fanart.tv",80, 500);
};

Last edited by mpg7321 on February 18, 2022 18:51.


Hosting Services by ipHouse