speed up get api call for items with many files
This commit is contained in:
parent
d3b9d87c43
commit
a2c2e32bfe
1 changed files with 1 additions and 1 deletions
|
@ -1401,7 +1401,7 @@ class Item(models.Model):
|
||||||
source=None, available=True, file__item=self, file__selected=True
|
source=None, available=True, file__item=self, file__selected=True
|
||||||
).filter(
|
).filter(
|
||||||
Q(file__is_audio=True) | Q(file__is_video=True)
|
Q(file__is_audio=True) | Q(file__is_video=True)
|
||||||
)
|
).select_related()
|
||||||
if not track:
|
if not track:
|
||||||
tracks = self.audio_tracks()
|
tracks = self.audio_tracks()
|
||||||
if len(tracks) > 1:
|
if len(tracks) > 1:
|
||||||
|
|
Loading…
Reference in a new issue