refactoring of calibre binary detection

This commit is contained in:
Thore Schillmann
2022-06-21 17:04:44 +00:00
parent 8c781ad4a4
commit 3c4330ba51
5 changed files with 60 additions and 13 deletions
+3
View File
@@ -152,6 +152,9 @@ EXTENSIONS_UPLOAD = {'txt', 'pdf', 'epub', 'kepub', 'mobi', 'azw', 'azw3', 'cbr'
'opus', 'wav', 'flac', 'm4a', 'm4b'}
SUPPORTED_CALIBRE_BINARIES = ["ebook-convert", "calibredb"]
def has_flag(value, bit_flag):
return bit_flag == (bit_flag & (value or 0))