1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/calibreweb_ynh.git synced 2024-09-03 18:16:20 +02:00

Upgrade patch to V1.0

This commit is contained in:
Krakinou 2019-02-02 12:42:34 +01:00
parent 9622dc0892
commit f32b3e0d84
2 changed files with 9 additions and 31 deletions

View file

@ -15,7 +15,7 @@ Calibre-Web is a web app providing a clean interface for browsing, reading and d
Alternatively, you may use [COPS](https://github.com/YunoHost-Apps/cops_ynh) which also allows access to your Calibre Library, but in read-only mode. Alternatively, you may use [COPS](https://github.com/YunoHost-Apps/cops_ynh) which also allows access to your Calibre Library, but in read-only mode.
**Shipped version:** To be 1.0, let's say 0.9 :) **Shipped version:** 1.0
Library will be placed in `/home/yunohost.multimedia/share/eBook` folder except if both : Library will be placed in `/home/yunohost.multimedia/share/eBook` folder except if both :

View file

@ -1,38 +1,16 @@
--- a/cps/web.py 2019-01-16 17:50:51.000000000 +0100 --- a/cps/web.py 2019-01-27 08:32:26.000000000 +0100
+++ b/cps/web.py 2019-01-19 10:55:51.728967203 +0100 +++ b/cps/web.py 2019-02-02 12:38:12.364323004 +0100
@@ -58,6 +58,11 @@ @@ -78,6 +78,9 @@
import server import server
from reverseproxy import ReverseProxied from reverseproxy import ReverseProxied
from updater import updater_thread
+#Yunohost LDAP integration - 1 +#Yunohost LDAP integration - 1
+vlogout = 0 +vlogout = 0
+#END Yunohost LDAP integration -1 +#END Yunohost LDAP integration -1
+
+
try: try:
from googleapiclient.errors import HttpError from googleapiclient.errors import HttpError
except ImportError: @@ -2256,10 +2259,36 @@
@@ -1072,7 +1077,7 @@
json_dumps = json.dumps([dict(name=r.name.replace('|',',')) for r in entries])
return json_dumps
-
+
@app.route("/get_tags_json", methods=['GET', 'POST'])
@login_required_if_no_ano
def get_tags_json():
@@ -1192,8 +1197,8 @@
r = requests.get(repository_url + '/git/commits/' + commit['object']['sha'])
r.raise_for_status()
update_data = r.json()
- except requests.exceptions.HTTPError as e:
- status['error'] = _(u'HTTP Error') + ' ' + str(e)
+ except requests.exceptions.HTTPError as ex:
+ status['error'] = _(u'HTTP Error') + ' ' + str(ex)
except requests.exceptions.ConnectionError:
status['error'] = _(u'Connection error')
except requests.exceptions.Timeout:
@@ -2360,10 +2365,36 @@
return redirect(url_for('basic_configuration')) return redirect(url_for('basic_configuration'))
if current_user is not None and current_user.is_authenticated: if current_user is not None and current_user.is_authenticated:
return redirect(url_for('index')) return redirect(url_for('index'))
@ -70,7 +48,7 @@
login_user(user, remember=True) login_user(user, remember=True)
flash(_(u"you are now logged in as: '%(nickname)s'", nickname=user.nickname), category="success") flash(_(u"you are now logged in as: '%(nickname)s'", nickname=user.nickname), category="success")
return redirect_back(url_for("index")) return redirect_back(url_for("index"))
@@ -2384,6 +2415,10 @@ @@ -2280,6 +2309,10 @@
@login_required @login_required
def logout(): def logout():
if current_user is not None and current_user.is_authenticated: if current_user is not None and current_user.is_authenticated:
@ -81,7 +59,7 @@
logout_user() logout_user()
return redirect(url_for('login')) return redirect(url_for('login'))
@@ -3088,6 +3123,23 @@ @@ -2987,6 +3020,23 @@
if "config_ebookconverter" in to_save: if "config_ebookconverter" in to_save:
content.config_ebookconverter = int(to_save["config_ebookconverter"]) content.config_ebookconverter = int(to_save["config_ebookconverter"])