forked from 0x2620/pandora
always request info for all files that need it
This commit is contained in:
parent
b8a5ba568d
commit
597fe9d6c6
2 changed files with 4 additions and 3 deletions
|
@ -94,10 +94,11 @@ def update(request):
|
||||||
f.info = info
|
f.info = info
|
||||||
f.save()
|
f.save()
|
||||||
if not upload_only:
|
if not upload_only:
|
||||||
files = models.Instance.objects.filter(volume__user=user, file__available=False)
|
all_files = models.Instance.objects.filter(volume__user=user)
|
||||||
|
files = all_files.filter(file__avalable=False)
|
||||||
if volume:
|
if volume:
|
||||||
files = files.filter(volume=volume)
|
files = files.filter(volume=volume)
|
||||||
response['data']['info'] = [f.file.oshash for f in files.filter(file__info='{}')]
|
response['data']['info'] = [f.file.oshash for f in all_files.filter(file__info='{}')]
|
||||||
response['data']['data'] = [f.file.oshash for f in files.filter(file__is_video=True,
|
response['data']['data'] = [f.file.oshash for f in files.filter(file__is_video=True,
|
||||||
file__available=False,
|
file__available=False,
|
||||||
file__wanted=True)]
|
file__wanted=True)]
|
||||||
|
|
|
@ -780,7 +780,7 @@ class Item(models.Model):
|
||||||
s.resolution = v.width * v.height
|
s.resolution = v.width * v.height
|
||||||
s.width = v.width
|
s.width = v.width
|
||||||
s.height = v.height
|
s.height = v.height
|
||||||
if not s.aspectratio:
|
if not s.aspectratio and v.display_aspect_ratio:
|
||||||
s.aspectratio = float(utils.parse_decimal(v.display_aspect_ratio))
|
s.aspectratio = float(utils.parse_decimal(v.display_aspect_ratio))
|
||||||
s.pixels = sum([v.pixels for v in videos])
|
s.pixels = sum([v.pixels for v in videos])
|
||||||
s.numberoffiles = self.files.all().count()
|
s.numberoffiles = self.files.all().count()
|
||||||
|
|
Loading…
Reference in a new issue