From 5e1a2234ee81bd8fdb1b84ca901b56eb30b85abc Mon Sep 17 00:00:00 2001 From: j <0x006A@0x2620.org> Date: Fri, 23 Dec 2011 10:18:07 +0000 Subject: [PATCH] same films for all --- pandora/tv/models.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/pandora/tv/models.py b/pandora/tv/models.py index b8bd69c78..62a2c9417 100644 --- a/pandora/tv/models.py +++ b/pandora/tv/models.py @@ -6,6 +6,7 @@ from random import randint from django.db import models from django.db.models import Max +from django.conf import settings from item.models import Item @@ -22,10 +23,11 @@ class Channel(models.Model): def json(self, user): now = datetime.now() + cansee = settings.CONFIG['capabilities']['canSeeItem']['guest'] if self.list: - items = self.list.get_items().filter(rendered=True) + items = self.list.get_items(self.list.user).filter(rendered=True, level__lte=cansee) else: - items = Item.objects.filter(rendered=True) + items = Item.objects.filter(rendered=True, level__lte=cansee) if items.count() == 0: return {}