From c72b7b2964eeb0ff44e80234ade3ec03c7a2d3c2 Mon Sep 17 00:00:00 2001 From: Oleg Broytman Date: Mon, 11 Jun 2018 16:31:43 +0300 Subject: [PATCH] Feat(db): Add book.lang/ext properties --- m_librarian.conf.sample | 2 +- m_librarian/db.py | 8 ++++++++ m_librarian/translations/ru.mo | Bin 1946 -> 2017 bytes m_librarian/translations/ru.po | 6 ++++++ 4 files changed, 15 insertions(+), 1 deletion(-) diff --git a/m_librarian.conf.sample b/m_librarian.conf.sample index 4b68519..95fcb82 100644 --- a/m_librarian.conf.sample +++ b/m_librarian.conf.sample @@ -32,7 +32,7 @@ use_in_books_list = 1 author = fullname count # Full list of book columns: # book = title series ser_no archive file size lib_id deleted date -# author1 author_list +# author1 author_list ext lang # genre1name genre1title genre_name_list genre_title_list # author1 is just one author from the list if there are more than 1 # author_list is a comma-separated list of full names diff --git a/m_librarian/db.py b/m_librarian/db.py index 88b0b11..d910688 100755 --- a/m_librarian/db.py +++ b/m_librarian/db.py @@ -96,6 +96,14 @@ class Book(SQLObject): def genre_title_list(self): return u', '.join([g.title for g in self.genres]) + @property + def ext(self): + return self.extension.name + + @property + def lang(self): + return self.language.name + class BookGenre(SQLObject): class sqlmeta: diff --git a/m_librarian/translations/ru.mo b/m_librarian/translations/ru.mo index 5794760e7ef0daf1131438c8addd748e7d9c085b..a61fb0b1b951c543f48fd2d827701f16551fb3e3 100644 GIT binary patch delta 848 zcmYk)KWI}?6vy#vUjDUe{8ZAnITtiWm_bLYBfy zmqMWhmpJH9G2l?>)Z+BIIJK4x4jrUL+(h*IOHaT{PCoCP_wGIS{aH%3lhtpT@SDb7 zY#eo`m#u!q>etPiR=SOIDx80qS=!g%xC~t6>%wP#bTeZs;Sb@doPpAjb3OiMca`F31zwkiI=$S7)*s z>%%-tXq+STxYf8j2018n6Fm9fu{NUjtsBueO=Jjt3!N_K{oPP0H%c->3=?UhJBt1V pZ^gS`dFpR@lV17J>{=q+4EYC?}i#{%l zQNMFFn8Z3vV*oQ&pS5}xtEn&8e9rPEtfgKsS1?Gvf%GZ5t=}8Bjaq2e+{b$ILsa8q z^TaHpHgbk~?!xjb)PmO-!aG!-XN=$*HsL1*S>HwIqBmr74u{NPtB;`;N})D1 ziL0E}G-{zUiebD&ZQ$1OM{Fg3L-qA@(R>KQtnXU5X~2X{jG!8(te!#Ea9OL*n>m{= zpc<~3o7h6WWBDO!V@>nw~+&KJ%r}fTPLBv7N@Ug^FNKcNO}p4K7y0_H#*7sD=Li@_u8Pot6oGyf8r>i oZ>}-mefY*=3GU*=Akj?x4R6kW