[pitivi/1.0] medialibrary: Disable force-proxy option for image assets.
- From: Alexandru Băluț <alexbalut src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [pitivi/1.0] medialibrary: Disable force-proxy option for image assets.
- Date: Wed, 12 Dec 2018 02:22:30 +0000 (UTC)
commit f644e7c1d572be8cc3993fa07c3bdecab7c972cb
Author: ymdatta <ymdatta protonmail com>
Date: Mon Dec 10 21:38:48 2018 +0530
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
pitivi/medialibrary.py | 8 +++++++-
pitivi/project.py | 6 ++++--
2 files changed, 11 insertions(+), 3 deletions(-)
---
diff --git a/pitivi/medialibrary.py b/pitivi/medialibrary.py
index 9af5968c..21c2aabd 100644
--- a/pitivi/medialibrary.py
+++ b/pitivi/medialibrary.py
@@ -1191,6 +1191,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
@@ -1247,7 +1253,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)
diff --git a/pitivi/project.py b/pitivi/project.py
index 5ced5166..7b458379 100644
--- a/pitivi/project.py
+++ b/pitivi/project.py
@@ -1391,8 +1391,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:
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]