speed up stream lookup
This commit is contained in:
parent
61dd667a71
commit
d7f087125e
3 changed files with 24 additions and 5 deletions
|
|
@ -734,6 +734,9 @@ class Stream(models.Model):
|
|||
|
||||
class Meta:
|
||||
unique_together = ("file", "resolution", "format")
|
||||
indexes = [
|
||||
models.Index(fields=['file', 'source', 'available'])
|
||||
]
|
||||
|
||||
file = models.ForeignKey(File, related_name='streams', on_delete=models.CASCADE)
|
||||
resolution = models.IntegerField(default=96)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue