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 Sunday June 20, 2021 at 18:13
mpg7321
Regular Member
Joined:
Posts:
June 2020
111
So for KODI I am pulling in and displaying cover art, unfortunately KODI has changed a few things, for movie, now 95% of cover art is pulled from "assets.fanart.tv", TV shows and some movies are pulled from "image.tmdb.org". Same code, images come in about 10% larger from fanart.ty, besides that I do not know of any different. Unfortunately I do not get to choose, but when the data comes from fanart.tv it takes 10 to 15 seconds to display, when it pulls from tmdb, its about 2 seconds. Any thoughts..

Here are two sample of two different movies I have,

1https://assets.fanart.tv/fanart/movies/24428/movieposter/marvels-the-avengers-5218f1301e057.jpg

1https://image.tmdb.org/t/p/original/o5jloyTyJMJUSwK4zJYrphTIu1J.jpg



Below are the two functions I am using to pull in the cover art. I am parsing out the data from a different function.

function kodi3(){
var socket = new TCPSocket();
var receivedData = "";
socket.onConnect = function() {
socket.write("GET /t/p/w154/"+coverTV+".jpg HTTP/1.0\r\n");
socket.write("HOST:image.tmdb.org\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").height = 210;
GUI.widget("MOVIE_COVER").width = 139;
GUI.widget("MOVIE_COVER").stretchImage = true;
};
socket.connect("image.tmdb.org",80, 500);
};
////////////////////////////////////////////////////////////////////////////////////////////
function kodi4(){
var socket = new TCPSocket();
var receivedData = "";
socket.onConnect = function() {
socket.write("GET /fanart/movies/"+coverMovie1+"/movieposter/"+coverMovie2+".jpg 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").height = 210;
GUI.widget("MOVIE_COVER").width = 139;
GUI.widget("MOVIE_COVER").stretchImage = true;
};
socket.connect("assets.fanart.tv",80, 500);
};

Last edited by mpg7321 on June 20, 2021 19:31.


Hosting Services by ipHouse