X-Git-Url: https://git.phdru.name/?a=blobdiff_plain;f=m_librarian%2Fdownload.py;h=c0bc1010ca51365b50909fa14b3b7b92b3b387be;hb=f02f8a6f7fd47bb6ab22966d783a017d821c4609;hp=4cbf35b8bdd1f9850ee743db05e9765e8636ee58;hpb=611123d9fc926dfd7803ca12ebbab6511ba4e4c0;p=m_librarian.git diff --git a/m_librarian/download.py b/m_librarian/download.py index 4cbf35b..c0bc101 100755 --- a/m_librarian/download.py +++ b/m_librarian/download.py @@ -47,6 +47,10 @@ def _compile_format(): new_format = u'%(gname)s' elif c == 'g': new_format = u'%(gtitle)s' + elif c == 'J': + new_format = u'%(gname_list)s' + elif c == 'j': + new_format = u'%(gtitle_list)s' elif c == 'l': new_format = u'%(language)s' elif c == 'n': @@ -67,6 +71,8 @@ _library_path = None def download(book, dest_path=None, lib_path=None, a_format=None): + if dest_path is None: + dest_path = get_config().getpath('download', 'path') if lib_path is None: global _library_path if _library_path is None: @@ -88,6 +94,8 @@ def download(book, dest_path=None, lib_path=None, a_format=None): genre = book.genres[0] bdict['gname'] = genre.name bdict['gtitle'] = genre.title + bdict['gname_list'] = book.genre_name_list + bdict['gtitle_list'] = book.genre_title_list bdict['language'] = book.language.name bdict['ser_no'] = book.ser_no or 0 bdict['series'] = book.series