do not play same video at the gap
This commit is contained in:
parent
000ad14083
commit
500de93b53
1 changed files with 2 additions and 0 deletions
|
@ -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:
|
||||
|
|
Loading…
Reference in a new issue