[pitivi] proxy: Avoid passing parameter which forces a return value
- From: Alexandru Băluț <alexbalut src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [pitivi] proxy: Avoid passing parameter which forces a return value
- Date: Wed, 4 Jan 2017 15:44:54 +0000 (UTC)
commit 2d33c5d4248e6fd0281b7a4861067535ed888b15
Author: Alexandru Băluț <alexandru balut gmail com>
Date: Tue Dec 20 00:41:06 2016 +0100
proxy: Avoid passing parameter which forces a return value
Reviewed-by: Thibault Saunier <tsaunier gnome org>
Differential Revision: https://phabricator.freedesktop.org/D1565
pitivi/utils/proxy.py | 13 +++++--------
1 files changed, 5 insertions(+), 8 deletions(-)
---
diff --git a/pitivi/utils/proxy.py b/pitivi/utils/proxy.py
index accc26d..0247f70 100644
--- a/pitivi/utils/proxy.py
+++ b/pitivi/utils/proxy.py
@@ -226,7 +226,7 @@ class ProxyManager(GObject.Object, Loggable):
return False
- def __assetNeedsTranscoding(self, asset, force_proxying=False):
+ def __assetNeedsTranscoding(self, asset):
if self.proxyingUnsupported:
self.info("No proxying supported")
return False
@@ -234,10 +234,6 @@ class ProxyManager(GObject.Object, Loggable):
if asset.is_image():
return False
- if force_proxying:
- self.info("Forcing proxy creation")
- return True
-
if self.app.settings.proxyingStrategy == ProxyingStrategy.NOTHING:
self.debug("Not proxying anything. %s",
self.app.settings.proxyingStrategy)
@@ -432,10 +428,11 @@ class ProxyManager(GObject.Object, Loggable):
Args:
asset (GES.Asset): The asset to be transcoded.
"""
- self.debug("Maybe create a proxy for %s (strategy: %s)",
- asset.get_id(), self.app.settings.proxyingStrategy)
+ self.debug("Maybe create a proxy for %s (strategy: %s, force: %s)",
+ asset.get_id(), self.app.settings.proxyingStrategy,
+ force_proxying)
- if not self.__assetNeedsTranscoding(asset, 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,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]