linuxgaming

This is my own Linux gaming aggregate web app I built for personal use.
git clone git://git.beardyjay.co.uk/linuxgaming
Log | Files | Refs | README

commit 106f6eea59d36d8e7b8b36eb2927e45ba85b6e34
parent 49a859934681ea4b98298c5e5bff9a673b2befbe
Author: Jay Scott <jay@beardyjay.co.uk>
Date:   Wed, 18 Jul 2018 12:42:50 +0100

fixing issue with youtube search order

Diffstat:
Mlinuxgaming/__init__.py | 3++-
Mlinuxgaming/database.py | 1-
Mlinuxgaming/templates/pages/details.html | 2+-
Mlinuxgaming/update.py | 3++-
4 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/linuxgaming/__init__.py b/linuxgaming/__init__.py @@ -35,7 +35,8 @@ def create_app(): @app.route("/") def home(): - result = database.db_search({"date": {'$gte': datetime.now() - timedelta(hours=24)}}) + result = database.db_search( + {"date": {'$gte': datetime.now() - timedelta(hours=24)}}) return render_template('pages/home.html', entries=result) @app.errorhandler(500) diff --git a/linuxgaming/database.py b/linuxgaming/database.py @@ -1,5 +1,4 @@ from flask import current_app -from pprint import pprint def db_search(query={}): diff --git a/linuxgaming/templates/pages/details.html b/linuxgaming/templates/pages/details.html @@ -17,7 +17,7 @@ <div class="extra"> {% if data.twitch %} <a href="{{ data.twitch.website }}" class="ui purple small label" target="_blank"> - <i class="icon twitch"></i> Streams + <i class="icon twitch"></i> Stream </a> {% endif %} {% if data.rss %} diff --git a/linuxgaming/update.py b/linuxgaming/update.py @@ -137,7 +137,8 @@ def youtube_update(): q="", channelId=youtube_channelID, part='id,snippet', - maxResults=40 + order='date', + maxResults=5 ).execute() for search_result in search_response.get('items', []):