Add AuthorsSort in book export

這個提交存在於:
Didier Corbière 2013-09-13 11:19:17 +01:00
父節點 fd44d03d9a
當前提交 7bb5144337
共有 3 個檔案被更改,包括 3 行新增3 行删除

檢視檔案

@ -73,6 +73,7 @@ class BookExport
$this->mExport->SetProperty($i++, 'Uri');
$this->mExport->SetProperty($i++, 'Title');
$this->mExport->SetProperty($i++, 'Authors');
$this->mExport->SetProperty($i++, 'AuthorsSort');
$this->mExport->SetProperty($i++, 'Language');
$this->mExport->SetProperty($i++, 'Description');
$this->mExport->SetProperty($i++, 'Subjects');
@ -92,6 +93,7 @@ class BookExport
$this->mExport->SetProperty($i++, $inBookInfo->mUri);
$this->mExport->SetProperty($i++, $inBookInfo->mTitle);
$this->mExport->SetProperty($i++, implode(' - ', $inBookInfo->mAuthors));
$this->mExport->SetProperty($i++, implode(' - ', array_keys($inBookInfo->mAuthors)));
$this->mExport->SetProperty($i++, $inBookInfo->mLanguage);
$this->mExport->SetProperty($i++, $inBookInfo->mDescription);
$this->mExport->SetProperty($i++, implode(' - ', $inBookInfo->mSubjects));

檢視檔案

@ -21,7 +21,6 @@ class BookInfos
public $mUuid = '';
public $mUri = '';
public $mTitle = '';
public $mTitleSort = '';
public $mAuthors = null;
public $mLanguage = '';
public $mDescription = '';
@ -51,7 +50,6 @@ class BookInfos
$this->mUuid = $epub->Uuid();
$this->mUri = $epub->Uri();
$this->mTitle = $epub->Title();
$this->mTitleSort = $this->mTitle; // Use title for now
$this->mAuthors = $epub->Authors();
$this->mLanguage = $epub->Language();
$this->mDescription = $epub->Description();

檢視檔案

@ -144,7 +144,7 @@ class CalibreDbLoader
$sql = 'insert into books(title, sort, uuid, path) values(:title, :sort, :uuid, :path)';
$stmt = $this->mDb->prepare($sql);
$stmt->bindParam(':title', $inBookInfo->mTitle);
$stmt->bindParam(':sort', $inBookInfo->mTitleSort);
$stmt->bindParam(':sort', $inBookInfo->mTitle);
$stmt->bindParam(':uuid', $inBookInfo->mUuid);
$stmt->bindParam(':path', $inBookInfo->mPath);
$stmt->execute();