Commit 31a90ae3 authored by Julian Rother's avatar Julian Rother
Browse files

Fix feeds and set locale for better datetime formatting

parent dc83ad55
......@@ -23,13 +23,13 @@ def feed(handle=None):
SELECT lectures.*, videos.file_size, videos.path, videos.id AS video_id, videos.hash,
videos.time_created AS video_created, videos.time_updated AS video_updated,
courses.title AS course_title, courses.handle AS course_handle, courses.semester, courses.organizer AS course_organizer, courses.short as course_short,
formats.description AS format_description, formats.player_prio
formats.description AS format_description, formats.prio
FROM lectures
JOIN courses ON (courses.id = lectures.course_id)
JOIN videos ON (lectures.id = videos.lecture_id)
JOIN formats ON (formats.id = videos.video_format)
WHERE (? IS NULL) OR course_id = ? AND courses.visible AND lectures.visible AND videos.visible
ORDER BY time DESC, player_prio
WHERE ((? IS NULL AND courses.listed) OR course_id = ?) AND courses.visible AND lectures.visible AND videos.visible
ORDER BY video_created DESC, prio ASC
LIMIT 100''',
course['id'], course['id'])
updated = max(course['time_updated'], course['time_created'], key=fixdate)
......
......@@ -5,6 +5,9 @@ from datetime import date, timedelta, datetime, time, MINYEAR
import threading
import os
import hashlib
import locale
locale.setlocale(locale.LC_ALL, 'de_DE')
app = Flask(__name__)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment