author1 is just one author from the list if there are more than 1.
author = fullname count
# Full list of book columns:
# book = title series ser_no archive file size lib_id deleted date
+# author1
+# author1 is just one author from the list if there are more than 1
# Default column is just title
book = ser_no title
[download]
# Download formats:
-# %a - author (one of)
+# %a - author1 (one of)
# %e - file extension
# %f - file name in archive
# %G - genre (one of), name
date_idx = DatabaseIndex(date)
language_idx = DatabaseIndex(language)
+ @property
+ def author1(self):
+ return self.authors[0].fullname
+
class BookGenre(SQLObject):
class sqlmeta:
if got_percent:
got_percent = False
if c == 'a':
- new_format = u'%(author)s'
+ new_format = u'%(author1)s'
elif c == 'e':
new_format = u'%(extension)s'
elif c == 'f':
if compiled_format[-1] in ('\0', '\\', '/'):
raise ValueError('Bad format: "%s"' % compiled_format)
bdict = {}
- bdict['author'] = book.authors[0].fullname
+ bdict['author1'] = book.author1
bdict['extension'] = book.extension.name
bdict['file'] = book.file
genre = book.genres[0]
msgid "date"
msgstr "Дата"
+msgid "author1"
+msgstr "Автор"
orderBy=('title',), use_filters=use_filters)
books_by_authors = {}
for book in books:
- author = book.authors[0].fullname
+ author = book.author1
if author in books_by_authors:
books_by_author = books_by_authors[author]
else:
ml_conf.set('download', 'format', '%a/%s/%n %t')
download._compile_format()
assert download.compiled_format == \
- u'%(author)s/%(series)s/%(ser_no)d %(title)s'
+ u'%(author1)s/%(series)s/%(ser_no)d %(title)s'