X-Git-Url: https://git.phdru.name/?a=blobdiff_plain;f=m_librarian%2Fdownload.py;h=4cbf35b8bdd1f9850ee743db05e9765e8636ee58;hb=611123d9fc926dfd7803ca12ebbab6511ba4e4c0;hp=f1a41c76d40243908f8f975557696d246f902b1a;hpb=0b2332ea91caea2de3115b873762e71637ab2932;p=m_librarian.git diff --git a/m_librarian/download.py b/m_librarian/download.py index f1a41c7..4cbf35b 100755 --- a/m_librarian/download.py +++ b/m_librarian/download.py @@ -36,7 +36,9 @@ def _compile_format(): if got_percent: got_percent = False if c == 'a': - new_format = u'%(author)s' + new_format = u'%(author1)s' + elif c == 'A': + new_format = u'%(authors)s' elif c == 'e': new_format = u'%(extension)s' elif c == 'f': @@ -79,7 +81,8 @@ def download(book, dest_path=None, lib_path=None, a_format=None): 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['authors'] = book.author_list bdict['extension'] = book.extension.name bdict['file'] = book.file genre = book.genres[0]