fix: remove broken coroutine pattern that caused parse error
All checks were successful
Build plugin / build (push) Successful in 1m9s
All checks were successful
Build plugin / build (push) Successful in 1m9s
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
This commit is contained in:
parent
75a6244fd4
commit
ce30f647c8
1 changed files with 0 additions and 16 deletions
|
|
@ -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():
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue