Commit 57b6efe1 authored by Thibault Saunier's avatar Thibault Saunier

previewers: Simply use element URI to handle proxy/target thumbnail cache copying

In the case clips are DND onto the timeline the TrackElement might end
up not being in a clip yet when we start processing it and we fail at
retrieving its URI using its asset.

Simply using the element 'uri' properties simplifies the logic.

Fixes T7698
Reviewed-by: Alexandru Băluț's avatarAlex Băluț <alexandru.balut@gmail.com>
Differential Revision: https://phabricator.freedesktop.org/D1651
parent 879e7eb9
......@@ -687,10 +687,10 @@ class VideoPreviewer(Previewer, Zoomable, Loggable):
self._startThumbnailingWhenIdle()
def _ensure_proxy_thumbnails_cache(self):
"""Ensures that both the target asset and the proxy assets have caches"""
asset_uri = quote_uri(self.ges_elem.get_parent().get_asset().props.id)
if self.uri != asset_uri:
self.thumb_cache.copy(asset_uri)
"""Ensures that both the target asset and the proxy assets have caches."""
uri = self.ges_elem.props.uri
if self.uri != uri:
self.thumb_cache.copy(uri)
def stopGeneration(self):
if self._thumb_cb_id:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment