From 689c8cd610ae52b9934ecc30ad7f6dd7db4db671 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Lucas?= Date: Wed, 20 Jun 2012 17:51:53 +0200 Subject: [PATCH] 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 --- book.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/book.php b/book.php index 5923093..78f7020 100644 --- a/book.php +++ b/book.php @@ -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) {