[pitivi] proxy: Get rid of force_proxying parameter



commit 2438588f869d8955fdb6fadaa3c74b69f6447f34
Author: Alexandru Băluț <alexandru balut gmail com>
Date:   Tue Dec 20 00:54:37 2016 +0100

    proxy: Get rid of force_proxying parameter
    
    Reviewed-by: Thibault Saunier <tsaunier gnome org>
    Differential Revision: https://phabricator.freedesktop.org/D1566

 pitivi/project.py     |    2 +-
 pitivi/utils/proxy.py |   16 ++++++----------
 2 files changed, 7 insertions(+), 11 deletions(-)
---
diff --git a/pitivi/project.py b/pitivi/project.py
index f93db9e..ad72653 100644
--- a/pitivi/project.py
+++ b/pitivi/project.py
@@ -1093,7 +1093,7 @@ class Project(Loggable, GES.Project):
 
         if self.loaded:
             if not asset.get_proxy_target() in self.list_assets(GES.Extractable):
-                self.app.proxy_manager.add_job(asset, asset.force_proxying)
+                self.app.proxy_manager.add_job(asset)
         else:
             self.debug("Project still loading, not using proxies: %s",
                        asset.props.id)
diff --git a/pitivi/utils/proxy.py b/pitivi/utils/proxy.py
index 0247f70..d5079f1 100644
--- a/pitivi/utils/proxy.py
+++ b/pitivi/utils/proxy.py
@@ -422,24 +422,21 @@ class ProxyManager(GObject.Object, Loggable):
 
         return
 
-    def add_job(self, asset, force_proxying=False):
+    def add_job(self, asset):
         """Adds a transcoding job for the specified asset if needed.
 
         Args:
             asset (GES.Asset): The asset to be transcoded.
         """
+        force_proxying = asset.force_proxying
         self.debug("Maybe create a proxy for %s (strategy: %s, force: %s)",
                    asset.get_id(), self.app.settings.proxyingStrategy,
                    force_proxying)
 
         if not force_proxying and not self.__assetNeedsTranscoding(asset):
-            self.debug("Not proxying asset (settings.proxyingStrategy: %s,"
-                       " proxy support forced: %s disabled: %s)",
-                       self.app.settings.proxyingStrategy,
-                       force_proxying, self.proxyingUnsupported)
-
-            # Make sure to notify we do not need a proxy for
-            # that asset.
+            self.debug("Not proxying asset (disabled: %s)",
+                       self.proxyingUnsupported)
+            # Make sure to notify we do not need a proxy for that asset.
             self.emit("proxy-ready", asset, None)
             return
 
@@ -448,8 +445,7 @@ class ProxyManager(GObject.Object, Loggable):
 
         proxy_uri = self.getProxyUri(asset)
         if Gio.File.new_for_uri(proxy_uri).query_exists(None):
-            self.debug("Using proxy already generated: %s",
-                       proxy_uri)
+            self.debug("Using proxy already generated: %s", proxy_uri)
             GES.Asset.request_async(GES.UriClip,
                                     proxy_uri, None,
                                     self.__assetLoadedCb, asset,


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]