use 0 padded 3 digit floats in qids for clips
This commit is contained in:
parent
e9d26d4c3d
commit
480d6c8cf2
1 changed files with 2 additions and 2 deletions
|
@ -26,7 +26,7 @@ class MetaClip:
|
||||||
self.volume = 0
|
self.volume = 0
|
||||||
|
|
||||||
def save(self, *args, **kwargs):
|
def save(self, *args, **kwargs):
|
||||||
self.public_id = u"%s/%s-%s" %(self.item.itemId, float(self.start), float(self.end))
|
self.public_id = u"%s/%0.03f-%0.03f" %(self.item.itemId, float(self.start), float(self.end))
|
||||||
if self.duration != self.end - self.start:
|
if self.duration != self.end - self.start:
|
||||||
self.update_calculated_values()
|
self.update_calculated_values()
|
||||||
if not self.aspect_ratio and self.item:
|
if not self.aspect_ratio and self.item:
|
||||||
|
@ -89,7 +89,7 @@ class MetaClip:
|
||||||
def get_or_create(cls, item, start, end):
|
def get_or_create(cls, item, start, end):
|
||||||
start = float(start)
|
start = float(start)
|
||||||
end = float(end)
|
end = float(end)
|
||||||
public_id = u"%s/%s-%s" %(item.itemId, start, end)
|
public_id = u"%s/%0.03f-%0.03f" %(item.itemId, start, end)
|
||||||
qs = cls.objects.filter(public_id=public_id)
|
qs = cls.objects.filter(public_id=public_id)
|
||||||
if qs.count() == 0:
|
if qs.count() == 0:
|
||||||
clip = Clip(item=item, start=start, end=end, public_id=public_id)
|
clip = Clip(item=item, start=start, end=end, public_id=public_id)
|
||||||
|
|
Loading…
Reference in a new issue