do not play same video at the gap

This commit is contained in:
j 2011-12-20 03:29:38 +05:30
parent 000ad14083
commit 500de93b53

View file

@ -37,6 +37,8 @@ class Channel(models.Model):
self.run += 1
self.save()
not_played = items
if not_played.count() > 1:
not_played = not_played.exclude(id=program[0].id)
not_played_count = not_played.count()
item = not_played[randint(0, not_played_count-1)]
if program.count() > 0: