forked from 0x2620/pandora
dont get color for clips outside item duration
This commit is contained in:
parent
ad03e67365
commit
9c173ba0a3
1 changed files with 3 additions and 1 deletions
|
@ -11,7 +11,9 @@ import managers
|
||||||
|
|
||||||
class MetaClip:
|
class MetaClip:
|
||||||
def update_calculated_values(self):
|
def update_calculated_values(self):
|
||||||
self.duration = self.end - self.start
|
start = min(self.start, self.item.sort.duration)
|
||||||
|
end = min(self.end, self.item.sort.duration)
|
||||||
|
self.duration = end - start
|
||||||
if self.duration > 0:
|
if self.duration > 0:
|
||||||
self.hue, self.saturation, self.lightness = extract.average_color(
|
self.hue, self.saturation, self.lightness = extract.average_color(
|
||||||
self.item.timeline_prefix, self.start, self.end)
|
self.item.timeline_prefix, self.start, self.end)
|
||||||
|
|
Loading…
Reference in a new issue