Kodi Community Forum

Full Version: XBMC HTTP-R, Remote Control Web App for PDA, PPC, or Smartphone (developers wanted)
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
i now think thetvdb has changed their site and the program cant find the images. have you been using media managers or xbmc to import movies or tv shows?

i think that might be screwing this up
maybe try to update your tv series...

copy the http address from the indexing errors and see if the image loads.
tamago_quin Wrote:i now think thetvdb has changed their site and the program cant find the images. have you been using media managers or xbmc to import movies or tv shows?
I'm using MediaInfoPlus (MIP) to download pics - and they show up just fine in XBMC. Not sure if they're downloaded from tvdb or elsewhere.

Quote:i think that might be screwing this up maybe try to update your tv series...
You mean cleaning my library from within XBMC?

Quote:copy the http address from the indexing errors and see if the image loads.
Not sure what you mean. There's no address in the errors. They look exactly like the one below:
Code:
Warning: getimagesize() [function.getimagesize]: Filename cannot be empty in C:\XAMPP\xampplite\htdocs\xbmc\includes\classes\modules\image.php on line 18
, with the function.getimagesize linking to "http://192.168.1.101/xbmc/function.getimagesize" (in practice a 404 error).

So in practice the films and tv series parts look like this:
Code:
Warning: getimagesize() [function.getimagesize]: Filename cannot be empty in C:\XAMPP\xampplite\htdocs\xbmc\includes\classes\modules\image.php on line 18
.
Warning: getimagesize() [function.getimagesize]: Filename cannot be empty in C:\XAMPP\xampplite\htdocs\xbmc\includes\classes\modules\image.php on line 18
.
Warning: getimagesize() [function.getimagesize]: Filename cannot be empty in C:\XAMPP\xampplite\htdocs\xbmc\includes\classes\modules\image.php on line 18
.
Warning: getimagesize() [function.getimagesize]: Filename cannot be empty in C:\XAMPP\xampplite\htdocs\xbmc\includes\classes\modules\image.php on line 18
.
Warning: getimagesize() [function.getimagesize]: Filename cannot be empty in C:\XAMPP\xampplite\htdocs\xbmc\includes\classes\modules\image.php on line 18
..
Warning: getimagesize() [function.getimagesize]: Filename cannot be empty in C:\XAMPP\xampplite\htdocs\xbmc\includes\classes\modules\image.php on line 18
.
Warning: getimagesize() [function.getimagesize]: Filename cannot be empty in C:\XAMPP\xampplite\htdocs\xbmc\includes\classes\modules\image.php on line 18
.
Warning: getimagesize() [function.getimagesize]: Filename cannot be empty in C:\XAMPP\xampplite\htdocs\xbmc\includes\classes\modules\image.php on line 18
.
And so on.

Image

Interestingly, the episode pics for my episodes seem to load up just fine.
Image
open tvshow.nfo in your series folder
after

<plot>...</plot> should be <thumb>http://..</thumb>

this is where xbmc is getting information for the database. try opening the links and see if it loads the images. my guess is that you will get 404 error

i can confirm the <thumb> tag is empty in the .nfo for movies. i honestly cant find the link between xbmc and the image. its stored in appdata folder but in the db its just not there.

we need someone who knows how the media managers and xbmc work.

ask the author of the media manager to pass through the thumb url?

i successfully got banners to work by changing this line to <thumb>e:\tv series\american dad\folder.jp</thumb>


first try the web links.im almost certain the banners have changed location on thetvdb.com
tamago_quin Wrote:open tvshow.nfo in your series folder
after

<plot>...</plot> should be <thumb>http://..</thumb>

this is where xbmc is getting information for the database. try opening the links and see if it loads the images. my guess is that you will get 404 error

i can confirm the <thumb> tag is empty in the .nfo for movies. i honestly cant find the link between xbmc and the image. its stored in appdata folder but in the db its just not there.

we need someone who knows how the media managers and xbmc work.

ask the author of the media manager to pass through the thumb url?

i successfully got banners to work by changing this line to <thumb>e:\tv series\american dad\folder.jp</thumb>


first try the web links.im almost certain the banners have changed location on thetvdb.com
You're a genius my friend and you should know it. Indeed my .nfo files were apparently broken as there was nothing within the "thumb" field (namely <thumb />). Yet when I point the file to a manually-saved wide-icon or a recently-checked link and rescan the media, nothing really changes. I get more dots between the errors, but that's it, no graphics in the remote. I think we're nearing the solution though, thanks again for your help Smile

Anyway, later this day (it's 4 AM here, FGS) I'll play a little more with the .nfo files and check where will it lead me to.

BTW, where does the scanning process save its' info to? Is there some file I could edit to sort it out? Because apparently it is scanning it in order not to use the same db as XBMC. Or am I getting something wrong here?
Cheers
Image ImageImageImage

here is what mine is looking like now!
the tv show banners are coming from local files on my pc... as well as movie icon. i need to find a way to automate this though... it is very impractical as is.

-update-
i know how to solve this

select strpath, c00 left join + ".tbn"
tonight i will try to learn sqlite and see if i can solve this
tamago_quin Wrote:here is what mine is looking like now!
the tv show banners are coming from local files on my pc... as well as movie icon. i need to find a way to automate this though... it is very impractical as is.
Will have to test that more this evening. Restarts and reinstalls, just in case.

Quote:-update-
i know how to solve this
Great!

Quote:select strpath, c00 left join + ".tbn"
Abracadabra..? Smile
Cheers
Code:
public function get_thumb()
    {
        global $MODULE;
        $MODULE->load("image");
        
        list($thumb) = $this->parent->db->sql_fetchrow($this->parent->db->sql_query("SELECT strPath, strFileName FROM movieview LEFT JOIN files AS f ON (f.idFile = m.idFile)
        LEFT JOIN path AS p ON (f.idPath = p.idPath) WHERE idMovie = '".$this->id."'"));
        preg_match_all("|<thumb.*>(.*)</thumb>|U",str_replace("mkv", "tbn", $thumb), $matches);
        
        return image::get("movie", $matches[1][0]);
    }

here is the part i need to change. im close...but i dont understand php... Sad
honestly rather than mkv; removing the right 3 characters and then adding "tbn" is best.

preg_match_all is probably not needed anymore... i dunno

im trying to get the tbn filepath from the media drive

if anyone could help with this it would be appreciated
to find the thumbnail created and display by xbmc you need to use the CRC on the path of the real picture (e.g: "smb://media/tvshow/weeds" is the path used to find the weeds tvshow thumbnail, with the crc of the path, y'ou have the Thumbnail name, and first caracter is the directory where the tbn is in tbn\video folder)
ppic Wrote:to find the thumbnail created and display by xbmc you need to use the CRC on the path of the real picture (e.g: "smb://media/tvshow/weeds" is the path used to find the weeds tvshow thumbnail, with the crc of the path, y'ou have the Thumbnail name, and first caracter is the directory where the tbn is in tbn\video folder)
Do you mean that, if my TV series are grouped in a share named SERIALE, I should point XBMC to, say, smb://SERIALE/Firefly/Season 1/wideicon.jpg and put that in, say, F:\SERIALE\Firefly\tvshow.nfo?
Cheers
I wrote a javascript function to generate the CRC of a thumbnail from the path/filename of the media file here

Javascript thumbnail CRC generator
Fiasco Wrote:I wrote a javascript function to generate the CRC of a thumbnail from the path/filename of the media file here

Javascript thumbnail CRC generator
Thanks!

Now... what do I do with it?
Cheers
Halibutt Wrote:Thanks!

Now... what do I do with it?
Cheers

If your thumbnails directories are exposed via webserver you can load them into a webpage or AJAX iphone interface.
It's been a little while since I messed w/ it but here is my XBMC javascript file

Code:
var MyMovies = new Array();

function updateXBMC() {
}


function loadShare(type, func) {
         url = baseurl + xbmcurl + "xbmcCmds/xbmcHttp?command=" + type;
         console.log(url);
         var request = new XMLHttpRequest();
         request.onreadystatechange = function() {
                 setTimeout(processShare(request,type), 500);
         }
         request.open("GET", url);
         request.send("");
}

function processShare(request, type) {
         if (request.readyState != 4 || request.status != 200) return;
         var text = request.responseText;
         text = text.replace(/\n/g, "");
         text = text.replace(/\<html\>/g,"");
         text = text.replace(/\<\/html\>/g,"");
         text = text.replace(/\<li\>/g,"");
         text = text.replace(/\<\/li\>/g,"");
         var textarray = text.split("1");
         remotescreen = eval('document.getElementById("XBMC-REMOTE3")');
         remotescreen.innerHTML = '<li class="group">Video</li>';
         for ( var i = 0; i < textarray.length; i++ ) {
             var args = textarray[i].split(";");
             var label = args[0];
             var location = args[1];
             if ( !label || !location ) continue;
             location = location.replace(/\\/g, '\\\\');
             var url = '<li class="XBMCBUTTON"><a href="#_NONE" onclick="drawMovies(' +"'" + location + "'"+ ');">' + label + '</a></li>';
             remotescreen.innerHTML += url;
         }
         showPage('XBMC-REMOTE3');
}



//////////////////
// MOVIE OBJECT //
//////////////////
function loadMovies() {
         var url = baseurl + xbmcurl + "xbmcCmds/xbmcHttp?command=queryVideoDatabase(select movie.idFile, c00, c01, c05, c07, c15, strPath, strFileName from movie, files, path where movie.idFile = files.idFile AND files.idPath = path.idPath  order by c00 DESC)";
         var request = new XMLHttpRequest();
         request.open("GET", url);
         request.onreadystatechange = function() {
                 setTimeout(processMoviesHTTP(request), 500);
         }
         request.send("");
}


function xbmcShowMovies() {
         loadShare('GetShares(Video;appendone)', 'type');
         loadMovies();
}

function drawMovies(location) {
         var i = MyMovies.length;
         remotescreen = eval('document.getElementById("XBMC-REMOTE4")');
         remotescreen.innerHTML = '';
         var i = MyMovies.length;
         while (i--) {
               remotescreen.innerHTML += MyMovies[i].html;
         }
         showPage('XBMC-REMOTE4');
}

function MovieFile (movieid,title,plot,rating,year,director,file,path,thumbnail) {
         this.movieid;
         this.title;
         this.plot;
         this.rating;
         this.year;
         this.director;
         this.file;
         this.path;
         this.thumbnail = thumbnail;
         this.html = '<li class="group">' + title + '</li>';
         this.html += "<A HREF='#_NONE' onclick=";
         filepath = path + file;
         filepath = filepath.replace(/\\/g, "\\\\");
         this.html += '"playMovie(' + "'" + filepath + "');" + '">';
         this.html += "<TABLE><TR><TD CLASS='poster'><img height='85' src='" + thumbnail + "'><TD CLASS='plot'>";
         this.html += plot + "</TABLE></A>";
}

function playMovie( movie ) {
         var request =new XMLHttpRequest();
         var url = xbmcurl + "xbmcCmds/xbmcHttp?command=PlayFile(" + movie + ")";
         request.open("GET",url,true);
         request.send(null);
}

function processMoviesHTTP(request) {
         if (request.readyState != 4 || request.status != 200) return;
         var text = request.responseText;

         text = text.replace(/\<HTML\>/i, '');
         text = text.replace(/\<\/HTML\>\n/i, '');
         text = text.split('</field><field>');
         text[0] = text[0].replace(/\<FIELD\>/i, '');
         text[text.length - 1] = text[text.length-1].replace(/\<\/FIELD\>/i, '');
         for ( var i=0; i < text.length; ) {
               var movieid  = text[i++];
               var title    = text[i++];
               var plot     = text[i++];
               var rating   = text[i++];
               var year     = text[i++];
               var director = text[i++];
               var path     = text[i++];
               var file     = text[i++];
               var crc      = FindCRC(path+file);
               var thumbnail = baseurl + 'thumbnails/Video/' + crc.charAt(0) + "/" + crc + ".tbn";
               var movie = new MovieFile( movieid, title, plot, rating, year, director, file, path, thumbnail);
               MyMovies.push(movie);
         }
}


function xbmcButton( command ) {
         sendEvent('index.html?' + command,updateXBMC);
         //startRefreshTimer();
}

function showXBMC( page ) {
//         if ( page.indexOf('HOME') > -1 )
//            stopOnkyoRefreshTimer();
//         else {
//            updateOnkyo();
//            startOnkyoRefreshTimer();
//         }
         showPage(page);
}
/////////////////////////////
// THUMBNAIL CRC GENERATOR //
/////////////////////////////
Number.prototype.unsign = function(bytes) {
         return this >= 0 ? this : Math.pow(256, bytes || 4) + this;
};

function FindCRC(data) {
         var CRC=0xffffffff;
         data = data.toLowerCase();
//console.log(data);
         for (var j=0; j < data.length; j++) {
             var c = data.charCodeAt(j);
             CRC ^= c << 24;
             for(var i = 0; i<8; i++) {
                 if(CRC.unsign(8) & 0x80000000)
                    CRC = (CRC << 1) ^ 0x04C11DB7;
                 else
                    CRC <<= 1;
             }
         }
         if ( CRC < 0 ) CRC = CRC>>>0;
         return CRC.toString(16);
}
ho yes forget that you'll find!

there a python lib (file_item.py) in my plugin which will show you how i get ride of thumbnails too Wink
Fiasco, ppic thanks for the help.
unfortnatly i'm only trying to modify someone elses code and outside of html and SQL i'm helpless. ill take a look at your script Fiasco and see if i can grasp what's happening and see if i can use this.

the part that has me confused the most is why did the original author make a db call? was there a time when this information was stored in the db?
Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21