From e5910c55f2efef00cb6e76f6289cdf1abcbbed68 Mon Sep 17 00:00:00 2001 From: Ethan Dalool Date: Fri, 4 Sep 2020 15:55:48 -0700 Subject: [PATCH] Rename database column `download` to `state`. --- .../backend/endpoints/channel_endpoints.py | 10 +++++----- frontends/ycdl_flask/templates/channel.html | 14 ++++++------- utilities/database_upgrader.py | 14 +++++++++++++ ycdl/constants.py | 10 +++++----- ycdl/jsonify.py | 2 +- ycdl/objects.py | 8 ++++---- ycdl/ycdldb.py | 20 +++++++++---------- 7 files changed, 46 insertions(+), 32 deletions(-) diff --git a/frontends/ycdl_flask/backend/endpoints/channel_endpoints.py b/frontends/ycdl_flask/backend/endpoints/channel_endpoints.py index 34933ad..4b5ebc5 100644 --- a/frontends/ycdl_flask/backend/endpoints/channel_endpoints.py +++ b/frontends/ycdl_flask/backend/endpoints/channel_endpoints.py @@ -17,10 +17,10 @@ def get_channels(): @site.route('/videos') @site.route('/watch') -@site.route('/videos/') +@site.route('/videos/') @site.route('/channel/') -@site.route('/channel//') -def get_channel(channel_id=None, download_filter=None): +@site.route('/channel//') +def get_channel(channel_id=None, state=None): if channel_id is not None: try: common.ycdldb.add_channel(channel_id) @@ -42,7 +42,7 @@ def get_channel(channel_id=None, download_filter=None): else: videos = common.ycdldb.get_videos( channel_id=channel_id, - download_filter=download_filter, + state=state, orderby=orderby, ) @@ -72,7 +72,7 @@ def get_channel(channel_id=None, download_filter=None): 'channel.html', all_states=all_states, channel=channel, - download_filter=download_filter, + state=state, query_string='?' + request.query_string.decode('utf-8'), videos=videos, ) diff --git a/frontends/ycdl_flask/templates/channel.html b/frontends/ycdl_flask/templates/channel.html index 23f4cc1..3d00c59 100644 --- a/frontends/ycdl_flask/templates/channel.html +++ b/frontends/ycdl_flask/templates/channel.html @@ -208,7 +208,7 @@ https://stackoverflow.com/a/35153397
@@ -222,7 +222,7 @@ https://stackoverflow.com/a/35153397