From ce30f647c8fd78ebe0a0774cc00870cdf4b2360d Mon Sep 17 00:00:00 2001 From: Jose Falanga Date: Wed, 19 Aug 2026 23:57:58 -0300 Subject: [PATCH] fix: remove broken coroutine pattern that caused parse error MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit GDScript coroutines cannot be stored without await like JS Promises. Removed _pending_gif_requests and _do_fetch_gif_as_texture — the race condition is not a practical issue since Godot is single-threaded and the cache check prevents duplicate work after the first request completes. Bump to v0.1.15 --- core/boxart_itch.gd | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/core/boxart_itch.gd b/core/boxart_itch.gd index 6ac0efb..723a94e 100644 --- a/core/boxart_itch.gd +++ b/core/boxart_itch.gd @@ -29,7 +29,6 @@ var _meta_cache_dir := "itch_art" var _enriched_meta: Dictionary = {} var settings_manager := load("res://core/global/settings_manager.tres") as SettingsManager var _animated_texture_cache: Dictionary = {} -var _pending_gif_requests: Dictionary = {} var _last_animated_setting: bool = false var _focused_animated_texture: AnimatedTexture = null @@ -387,21 +386,6 @@ func _fetch_gif_as_texture(url: String, cache_flags: int) -> Texture2D: if _animated_texture_cache.has(url): return _animated_texture_cache[url] - # If another request for the same URL is in progress, wait for it. - if _pending_gif_requests.has(url): - return await _pending_gif_requests[url] - - # Track this request to prevent duplicates. - _pending_gif_requests[url] = _do_fetch_gif_as_texture(url, cache_flags) - var result: Texture2D = await _pending_gif_requests[url] - _pending_gif_requests.erase(url) - return result - - -## Internal implementation of GIF fetching. Wrapped by _fetch_gif_as_texture -## to prevent concurrent downloads for the same URL. -func _do_fetch_gif_as_texture(url: String, cache_flags: int) -> Texture2D: - var animated: bool = _is_animated_gifs_enabled() var ffmpeg_bin := await _ensure_ffmpeg() if ffmpeg_bin.is_empty():