Add AuthorsSort in book export

This commit is contained in:
Didier Corbière 2013-09-13 11:19:17 +01:00
parent fd44d03d9a
commit 7bb5144337
3 changed files with 3 additions and 3 deletions

View file

@ -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));

View file

@ -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();

View file

@ -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();