Fix the ids in OPDS feed to produce a valid feed. fix #104

This commit is contained in:
Sébastien Lucas 2013-10-25 07:59:27 +02:00
parent 23282ed1e8
commit fa5ec6cb58
7 changed files with 10 additions and 10 deletions

View File

@ -9,7 +9,7 @@
require_once('base.php');
class Author extends Base {
const ALL_AUTHORS_ID = "calibre:authors";
const ALL_AUTHORS_ID = "cops:authors";
const AUTHOR_COLUMNS = "authors.id as id, authors.name as name, authors.sort as sort, count(*) as count";
const SQL_AUTHORS_BY_FIRST_LETTER = "select {0} from authors, books_authors_link where author = authors.id and upper (authors.sort) like ? group by authors.id, authors.name, authors.sort order by sort";

View File

@ -276,8 +276,8 @@ class Entry
Tag::ALL_TAGS_ID => 'images/tag.png',
Language::ALL_LANGUAGES_ID => 'images/language.png',
CustomColumn::ALL_CUSTOMS_ID => 'images/tag.png',
"calibre:books$" => 'images/allbook.png',
"calibre:books:letter" => 'images/allbook.png'
"cops:books$" => 'images/allbook.png',
"cops:books:letter" => 'images/allbook.png'
);
public function getUpdatedTime () {
@ -322,7 +322,7 @@ class Entry
}
}
if (!is_null (GetUrlParam (DB))) $this->id = GetUrlParam (DB) . ":" . $this->id;
if (!is_null (GetUrlParam (DB))) $this->id = str_replace ("cops:", "cops:" . GetUrlParam (DB) . ":", $this->id);
}
}

View File

@ -42,8 +42,8 @@ define ('SQL_BOOKS_RECENT', "select {0} from books " . SQL_BOOKS_LEFT_JOIN . "
class Book extends Base {
const ALL_BOOKS_UUID = "urn:uuid";
const ALL_BOOKS_ID = "calibre:books";
const ALL_RECENT_BOOKS_ID = "calibre:recentbooks";
const ALL_BOOKS_ID = "cops:books";
const ALL_RECENT_BOOKS_ID = "cops:recentbooks";
const BOOK_COLUMNS = "books.id as id, books.title as title, text as comment, path, timestamp, pubdate, series_index, uuid, has_cover, ratings.rating";
const SQL_BOOKS_LEFT_JOIN = SQL_BOOKS_LEFT_JOIN;

View File

@ -9,7 +9,7 @@
require_once('base.php');
class CustomColumn extends Base {
const ALL_CUSTOMS_ID = "calibre:custom";
const ALL_CUSTOMS_ID = "cops:custom";
public $id;
public $name;

View File

@ -9,7 +9,7 @@
require_once('base.php');
class language extends Base {
const ALL_LANGUAGES_ID = "calibre:languages";
const ALL_LANGUAGES_ID = "cops:languages";
public $id;
public $lang_code;

View File

@ -9,7 +9,7 @@
require_once('base.php');
class Serie extends Base {
const ALL_SERIES_ID = "calibre:series";
const ALL_SERIES_ID = "cops:series";
public $id;
public $name;

View File

@ -9,7 +9,7 @@
require_once('base.php');
class tag extends Base {
const ALL_TAGS_ID = "calibre:tags";
const ALL_TAGS_ID = "cops:tags";
public $id;
public $name;