Change id for book to use uuid (avoid name clash with Stanza)

Thanks to ilovejedd for reporting it :
http://www.mobileread.com/forums/showpost.php?p=2119639&postcount=46
This commit is contained in:
Sébastien Lucas 2012-06-20 17:51:53 +02:00
parent db8ad8e67f
commit 689c8cd610
1 changed files with 5 additions and 2 deletions

View File

@ -12,15 +12,17 @@ require_once('author.php');
require_once('tag.php');
class Book extends Base {
const ALL_BOOKS_UUID = "urn:uuid";
const ALL_BOOKS_ID = "calibre:books";
const ALL_RECENT_BOOKS_ID = "calibre:recentbooks";
const BOOK_COLUMNS = "books.id as id, books.title as title, text as comment, path, timestamp, pubdate, series_index";
const BOOK_COLUMNS = "books.id as id, books.title as title, text as comment, path, timestamp, pubdate, series_index, uuid";
public $id;
public $title;
public $timestamp;
public $pubdate;
public $path;
public $uuid;
public $relativePath;
public $seriesIndex;
public $comment;
@ -44,10 +46,11 @@ class Book extends Base {
$this->relativePath = $line->path;
$this->seriesIndex = $line->series_index;
$this->comment = $line->comment;
$this->uuid = $line->uuid;
}
public function getEntryId () {
return self::ALL_BOOKS_ID.":".$this->id;
return self::ALL_BOOKS_UUID.":".$this->uuid;
}
public static function getEntryIdByLetter ($startingLetter) {