From f4724ba1a23da3e1cffb5df23418d4ea9c0a2af4 Mon Sep 17 00:00:00 2001 From: Michel Roux Date: Wed, 29 Jan 2020 20:35:42 +0100 Subject: [PATCH] Fix SQLAlchemy version + fix ygg page again + fix env creation --- .env.dist | 6 +++--- connectors.py | 2 +- requirements.txt | 1 + 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/.env.dist b/.env.dist index aa86d5c..5e679fa 100644 --- a/.env.dist +++ b/.env.dist @@ -1,9 +1,9 @@ FLASK_APP=app.py FLASK_ENV=development FLASK_PORT=5000 -MYSQL_USER=root -MYSQL_PASSWORD=root -MYSQL_DATABASE=www +MYSQL_USER=nyaa +MYSQL_PASSWORD=nyaa +MYSQL_DATABASE=nyaa MYSQL_SERVER=db ADMIN_USERNAME=admin ADMIN_PASSWORD=secret diff --git a/connectors.py b/connectors.py index 93aa784..06f20f7 100644 --- a/connectors.py +++ b/connectors.py @@ -371,7 +371,7 @@ class YggTorrent(Connector): sort_type = 'size' if self.return_type is ConnectorReturn.HISTORY: sort_type = 'publish_date' - sort_page = '&page=%s' % self.page * 50 if self.page > 1 else '' + sort_page = '&page=%s' % (self.page * 50) if self.page > 1 else '' return '%s/engine/search?name=%s&category=2145&sub_category=%s&do=search&order=desc&sort=%s%s' % ( self.base_url, self.query, self.category, sort_type, sort_page diff --git a/requirements.txt b/requirements.txt index 580e6df..5620061 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,5 +1,6 @@ Flask==1.0.2 Flask-SQLAlchemy==2.1 +SQLAlchemy==1.2.18 Flask-HTTPAuth==3.2.4 Flask-WTF===0.14.2 PyMySQL==0.9.3