View Single Post
Old 08-24-2009, 11:48 AM   #110
ghyatt
Junior Member
ghyatt began at the beginning.
 
Posts: 2
Karma: 10
Join Date: Aug 2009
Device: iPhone
Till it is fixed

When will the next version be?

Till it is fixed I hack a fast PHP script that works:

<?php
$host = 'mistress';
$port = 8080;
$script = 'stanza.php';

// START
$calibre = "sed 's/ href=\"/ href=\"http:\/\/{$host}:{$port}/'";
$here = "sed 's/ href=\"\// href=\"http:\/\/{$host}\/{$script}/'";

if (empty($_GET['authorid']))
{ $str = makecmd('sortby=byauthor', $here); }
else { $str = makecmd("authorid={$_GET['authorid']}", $calibre); }

passthru($str);
exit;

function makecmd($cmd, $sed) {
return <<<CMD
calibre-debug -c "from calibre import browser; br = browser(); print br.open('http://localhost:8080/stanza/?$cmd').read()" | $sed
CMD;
}

Quote:
Originally Posted by kovidgoyal View Post
Ah, that explains it. Stanza rather stupidly doesn't send the correct headers when you ad a catalog manually. I will add a workaround for this in the next release.
ghyatt is offline   Reply With Quote