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:
parent
db8ad8e67f
commit
689c8cd610
7
book.php
7
book.php
|
@ -12,15 +12,17 @@ require_once('author.php');
|
||||||
require_once('tag.php');
|
require_once('tag.php');
|
||||||
|
|
||||||
class Book extends Base {
|
class Book extends Base {
|
||||||
|
const ALL_BOOKS_UUID = "urn:uuid";
|
||||||
const ALL_BOOKS_ID = "calibre:books";
|
const ALL_BOOKS_ID = "calibre:books";
|
||||||
const ALL_RECENT_BOOKS_ID = "calibre:recentbooks";
|
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 $id;
|
||||||
public $title;
|
public $title;
|
||||||
public $timestamp;
|
public $timestamp;
|
||||||
public $pubdate;
|
public $pubdate;
|
||||||
public $path;
|
public $path;
|
||||||
|
public $uuid;
|
||||||
public $relativePath;
|
public $relativePath;
|
||||||
public $seriesIndex;
|
public $seriesIndex;
|
||||||
public $comment;
|
public $comment;
|
||||||
|
@ -44,10 +46,11 @@ class Book extends Base {
|
||||||
$this->relativePath = $line->path;
|
$this->relativePath = $line->path;
|
||||||
$this->seriesIndex = $line->series_index;
|
$this->seriesIndex = $line->series_index;
|
||||||
$this->comment = $line->comment;
|
$this->comment = $line->comment;
|
||||||
|
$this->uuid = $line->uuid;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getEntryId () {
|
public function getEntryId () {
|
||||||
return self::ALL_BOOKS_ID.":".$this->id;
|
return self::ALL_BOOKS_UUID.":".$this->uuid;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function getEntryIdByLetter ($startingLetter) {
|
public static function getEntryIdByLetter ($startingLetter) {
|
||||||
|
|
Loading…
Reference in a new issue