Introduction
Introduction Statistics Contact Development Disclaimer Help
fixing issue with youtube search order - linuxgaming - Linux gaming aggregate t…
Log
Files
Refs
README
---
commit bcd750407cb02ea658cae5cb7d67d04f41faa3d6
parent dde7fb2ab099810b66f392a2df8b4b96dc952d98
Author: Jay Scott <[email protected]>
Date: Wed, 18 Jul 2018 12:42:50 +0100
fixing issue with youtube search order
Diffstat:
M linuxgaming/__init__.py | 3 ++-
M linuxgaming/database.py | 1 -
M linuxgaming/templates/pages/detail… | 2 +-
M linuxgaming/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() - timedel…
+ 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/p…
@@ -17,7 +17,7 @@
<div class="extra">
{% if data.twitch %}
<a href="{{ data.twitch.website }}" class="ui purple small label" ta…
- <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', []):
You are viewing proxied material from jay.scot. The copyright of proxied material belongs to its original authors. Any comments or complaints in relation to proxied material should be directed to the original authors of the content concerned. Please see the disclaimer for more details.