Skip to content

Commit

Permalink
Create failed thumbnails
Browse files Browse the repository at this point in the history
  • Loading branch information
kra-mo committed Dec 21, 2023
1 parent 27655d9 commit 33ffb5a
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion hyperplane/logging/logging_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ def logging_config() -> None:
"console_handler": {
"class": "logging.StreamHandler",
"formatter": "console_formatter",
"level": "WARNING",
"level": "DEBUG",
},
},
"root": {
Expand Down
4 changes: 4 additions & 0 deletions hyperplane/utils/thumbnail.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ def generate_thumbnail(
if not error.matches(Gio.io_error_quark(), Gio.IOErrorEnum.NOT_FOUND):
logging.debug("Cannot thumbnail: %s", error)
callback(None, *args)
factory.create_failed_thumbnail(uri, mtime)
return

# If it cannot get a path for the URI, try the target URI
Expand All @@ -75,6 +76,9 @@ def generate_thumbnail(
except GLib.Error as new_error:
logging.debug("Cannot thumbnail: %s", new_error)
callback(None, *args)
if not new_error.matches(Gio.io_error_quark(), Gio.IOErrorEnum.NOT_FOUND):
factory.create_failed_thumbnail(uri, mtime)
factory.create_failed_thumbnail(target_uri, mtime)
return

if not thumbnail:
Expand Down
4 changes: 2 additions & 2 deletions hyperplane/window.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,12 +92,12 @@ def __init__(self, **kwargs: Any) -> None:
self.trash_animation = Adw.SpringAnimation.new(
self.trash_icon, 10, 16, params, target
)
self.trash_animation.props.epsilon = 0.01500
self.trash_animation.props.epsilon = 0.015

self.trash_empty_animation = Adw.SpringAnimation.new(
self.trash_icon, 22, 16, params, target
)
self.trash_empty_animation.props.epsilon = 0.02500
self.trash_empty_animation.props.epsilon = 0.026

# Create actions

Expand Down

0 comments on commit 33ffb5a

Please sign in to comment.