summaryrefslogtreecommitdiff
path: root/backend
diff options
context:
space:
mode:
authorroot <root@lalalizard.com>2012-11-26 12:05:10 -0500
committerroot <root@lalalizard.com>2012-11-26 12:05:10 -0500
commitddc5b25b4a47ef8175aced9c06fc1767d004e826 (patch)
treefb411a446acb541724239568c9a835ee411fe6c6 /backend
parent1b14bc06f91ef1d4835f34cc2f1c9703e61498a5 (diff)
Old changes before moving
Diffstat (limited to 'backend')
-rw-r--r--backend/views.py19
1 files changed, 19 insertions, 0 deletions
diff --git a/backend/views.py b/backend/views.py
index d96fabf..e610bbd 100644
--- a/backend/views.py
+++ b/backend/views.py
@@ -149,6 +149,25 @@ def videos_response_str(videos):
]))
return strio.getvalue()
+def videos_response_list(videos):
+ """ Return list of videos
+ """
+ retval = []
+ for v in videos:
+ s = v.settings
+ if s.get('removed', 0):
+ continue
+ l = [
+ v.id,
+ datetime_to_timestamp(v.datetime),
+ v.user.id,
+ v.user.username,
+ s['url'],
+ s['title'],
+ ]
+ retval.append(l)
+ return retval
+
def settings_response_str(label, settings):
""" Return string of settings
"""