From 2468cf63ccd01dacd7ff65d85ee6aebbc9024e46 Mon Sep 17 00:00:00 2001 From: Ozzieisaacs Date: Sun, 17 May 2020 10:07:27 +0200 Subject: [PATCH] Fix for #1397 (changed supported audio files) Changed max gevent version Fix for #1397 (changed supported audio files) --- cps/constants.py | 4 ++-- cps/web.py | 2 +- optional-requirements.txt | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/cps/constants.py b/cps/constants.py index a3bd0da0..1698ef91 100644 --- a/cps/constants.py +++ b/cps/constants.py @@ -110,10 +110,10 @@ except ValueError: del env_CALIBRE_PORT -EXTENSIONS_AUDIO = {'mp3', 'm4a', 'm4b'} +EXTENSIONS_AUDIO = {'mp3', 'mp4', 'ogg', 'opus', 'wav', 'flac'} EXTENSIONS_CONVERT = {'pdf', 'epub', 'mobi', 'azw3', 'docx', 'rtf', 'fb2', 'lit', 'lrf', 'txt', 'htmlz', 'rtf', 'odt'} EXTENSIONS_UPLOAD = {'txt', 'pdf', 'epub', 'mobi', 'azw', 'azw3', 'cbr', 'cbz', 'cbt', 'djvu', 'prc', 'doc', 'docx', - 'fb2', 'html', 'rtf', 'lit', 'odt', 'mp3', 'm4a', 'm4b'} + 'fb2', 'html', 'rtf', 'lit', 'odt', 'mp3', 'mp4', 'ogg', 'opus', 'wav', 'flac'} # EXTENSIONS_READER = set(['txt', 'pdf', 'epub', 'zip', 'cbz', 'tar', 'cbt'] + # (['rar','cbr'] if feature_support['rar'] else [])) diff --git a/cps/web.py b/cps/web.py index 9665c8dc..3da3e799 100644 --- a/cps/web.py +++ b/cps/web.py @@ -1555,7 +1555,7 @@ def read_book(book_id, book_format): log.debug(u"Start txt reader for %d", book_id) return render_title_template('readtxt.html', txtfile=book_id, title=_(u"Read a Book")) else: - for fileExt in ["mp3", "m4b", "m4a"]: + for fileExt in constants.EXTENSIONS_AUDIO: if book_format.lower() == fileExt: entries = db.session.query(db.Books).filter(db.Books.id == book_id).filter(common_filters()).first() log.debug(u"Start mp3 listening for %d", book_id) diff --git a/optional-requirements.txt b/optional-requirements.txt index 43a281ee..ba6e8296 100644 --- a/optional-requirements.txt +++ b/optional-requirements.txt @@ -1,6 +1,6 @@ # GDrive Integration google-api-python-client==1.7.11,<1.8.0 -gevent>=1.2.1,<1.6.0 +gevent>=1.2.1,<20.6.0 greenlet>=0.4.12,<0.5.0 httplib2>=0.9.2,<0.18.0 oauth2client>=4.0.0,<4.14.0