Commit f26ff31b authored by Mohana Datta Yelugoti's avatar Mohana Datta Yelugoti Committed by Alexandru Băluț

medialibrary: Disable force-proxy option for image assets.

Disables force-proxy option for image assets, also if multiple
assets were selected and proxied together, then the proxying is
done only for non-image files, if any.

Fixes #2181
parent 0f954abf
Pipeline #45720 passed with stages
in 72 minutes and 12 seconds
......@@ -1199,6 +1199,12 @@ class MediaLibraryWidget(Gtk.Box, Loggable):
text = _("Open containing folder")
menu_model.append(text, "assets.%s" % action.get_name().replace(" ", "."))
image_assets = [asset for asset in assets
if asset.is_image()]
if len(assets) == len(image_assets):
return menu_model, action_group
proxies = [asset.get_proxy_target() for asset in assets
if self.app.proxy_manager.is_proxy_asset(asset)]
in_progress = [asset.creation_progress for asset in assets
......@@ -1255,7 +1261,7 @@ class MediaLibraryWidget(Gtk.Box, Loggable):
selection.select_path(path)
model, action_group = self.__createMenuModel()
if not model:
if not model or not model.get_n_items():
return True
popover = Gtk.Popover.new_from_model(view, model)
......
......@@ -1516,8 +1516,10 @@ class Project(Loggable, GES.Project):
" its recreation")
target.unproxy(asset)
# The asset is not a proxy.
originals.append(asset)
if not asset.is_image():
# The asset is not a proxy and not an image.
originals.append(asset)
if originals:
with self.app.action_log.started("Proxying assets"):
for asset in originals:
......
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