From 8992b4a04de12a2575a722bfd48e4256114bb01b Mon Sep 17 00:00:00 2001 From: Martin Kralik Date: Wed, 21 Nov 2012 16:53:04 +0100 Subject: [PATCH] Obmedzenia na datum uz funguju. --- server.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/server.py b/server.py index 94c99bb..1febd6e 100644 --- a/server.py +++ b/server.py @@ -3,6 +3,7 @@ import re import logging import infoboard +from datetime import date from infoboard.video import Video from infoboard.videoplayer import VideoPlayer from infoboard.watcher import Watcher @@ -46,7 +47,9 @@ def process_schedule(self, schedule): pass def get_playlist(self): - return [video.filename for video in self.videos] + today = date.today() + return [video.filename for video in self.videos + if video.start_date <= today and video.end_date >= today] if __name__ == "__main__":