[pitivi] medialibrary: Check only original assets for proxy error
- From: Alexandru Băluț <alexbalut src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [pitivi] medialibrary: Check only original assets for proxy error
- Date: Mon, 23 Sep 2019 11:13:24 +0000 (UTC)
commit a64f163ef55bed195903a05bc64a72f36d2a2b3f
Author: Alexandru Băluț <alexandru balut gmail com>
Date: Thu Sep 5 22:52:31 2019 +0200
medialibrary: Check only original assets for proxy error
It does not make sense to check proxies for a proxy error.
Should fix tests.test_media_library.TestMediaLibrary.test_delete_proxy which
fails sometimes with:
> ...
> File "/root/pitivi/pitivi/medialibrary.py", line 357, in __setState
> elif asset.proxying_error:
> 'UriClipAsset' object has no attribute 'proxying_error'
pitivi/medialibrary.py | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
---
diff --git a/pitivi/medialibrary.py b/pitivi/medialibrary.py
index c90a7d9a..6d519a17 100644
--- a/pitivi/medialibrary.py
+++ b/pitivi/medialibrary.py
@@ -339,11 +339,11 @@ class AssetThumbnail(GObject.Object, Loggable):
def __setState(self):
asset = self.__asset
target = asset.get_proxy_target()
- if self.proxy_manager.is_proxy_asset(asset) and target \
- and not target.get_error():
+ asset_is_proxy = self.proxy_manager.is_proxy_asset(asset)
+ if asset_is_proxy and target and not target.get_error():
# The asset is a proxy.
self.state = self.PROXIED
- elif asset.proxying_error:
+ elif not asset_is_proxy and asset.proxying_error:
self.state = self.ASSET_PROXYING_ERROR
elif self.proxy_manager.is_asset_queued(asset):
self.state = self.IN_PROGRESS
@@ -878,8 +878,8 @@ class MediaLibraryWidget(Gtk.Box, Loggable):
if not asset.ready:
proxying_files.append(asset)
- if row[COL_THUMB_DECORATOR].state != AssetThumbnail.IN_PROGRESS:
- asset_previewer = row[COL_THUMB_DECORATOR]
+ asset_previewer = row[COL_THUMB_DECORATOR]
+ if asset_previewer.state != AssetThumbnail.IN_PROGRESS:
asset_previewer.refresh()
row[COL_ICON_64] = asset_previewer.small_thumb
row[COL_ICON_128] = asset_previewer.large_thumb
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]