diff options
author | François Schmidts <francois.schmidts@gmail.com> | 2015-08-03 14:36:13 +0200 |
---|---|---|
committer | François Schmidts <francois.schmidts@gmail.com> | 2015-08-03 15:50:41 +0200 |
commit | 0caffceec8b58bc3f78c0d8ea36d2f7e9da668ec (patch) | |
tree | 25ede52ae4b02a2377ae40d2c146c7ed2e9abe2a /pyaggr3g470r/views/feed.py | |
parent | ensuring the icon isn't empty and redoing a bit of logging (diff) | |
download | newspipe-0caffceec8b58bc3f78c0d8ea36d2f7e9da668ec.tar.gz newspipe-0caffceec8b58bc3f78c0d8ea36d2f7e9da668ec.tar.bz2 newspipe-0caffceec8b58bc3f78c0d8ea36d2f7e9da668ec.zip |
sqlalchemy was requesting icons everytime feed where listed
so i choosed to move the icons into their own table
Diffstat (limited to 'pyaggr3g470r/views/feed.py')
-rw-r--r-- | pyaggr3g470r/views/feed.py | 17 |
1 files changed, 0 insertions, 17 deletions
diff --git a/pyaggr3g470r/views/feed.py b/pyaggr3g470r/views/feed.py index 38c7869c..afb51903 100644 --- a/pyaggr3g470r/views/feed.py +++ b/pyaggr3g470r/views/feed.py @@ -200,20 +200,3 @@ def process_form(feed_id=None): flash(gettext("Downloading articles for the new feed..."), 'info') return redirect(url_for('feed.form', feed_id=new_feed.id)) - - -@feed_bp.route('/icon/<int:feed_id>', methods=['GET']) -@login_required -def icon(feed_id): - icon = FeedController(None if g.user.is_admin() else g.user.id)\ - .get(id=feed_id).icon - etag = md5(icon.encode('utf8')).hexdigest() - headers = {'Cache-Control': 'max-age=86400', 'etag': etag} - if request.headers.get('if-none-match') == etag: - return Response(status=304, headers=headers) - if '\n' in icon: - content_type, *_, icon = icon.split() - headers['content-type'] = content_type - else: - headers['content-type'] = 'application/image' - return Response(base64.b64decode(icon), headers=headers) |