add fallback in case of missing animation without prefix

This commit is contained in:
cidoku 2025-06-12 16:50:34 -04:00
parent 868117d880
commit 9dd0e4f8ff

View File

@ -333,22 +333,27 @@ class AOCharMovie(QtGui.QLabel):
original_path = test_path(
AOpath+"characters/"+p_char+"/"+emote_prefix+p_emote+".gif",
AOpath+"characters/"+p_char+"/"+emote_prefix+p_emote+".gif",
AOpath+"characters/"+p_char+"/"+p_emote+".gif"
AOpath+"characters/"+p_char+"/"+p_emote+".gif",
AOpath+"characters/"+p_char+"/(a)"+p_emote+".gif"
)
alt_path = AOpath+"characters/"+p_char+"/"+p_emote+".png"
apng_path = test_path(
AOpath+"characters/"+p_char+"/"+emote_prefix+p_emote+".apng",
AOpath+"characters/"+p_char+"/"+emote_prefix+"/"+p_emote+".apng",
AOpath+"characters/"+p_char+"/"+p_emote+".apng"
AOpath+"characters/"+p_char+"/"+p_emote+".apng",
AOpath+"characters/"+p_char+"/(a)"+p_emote+".apng"
)
webp_path = test_path(
AOpath+"characters/"+p_char+"/"+emote_prefix+p_emote+".webp",
AOpath+"characters/"+p_char+"/"+emote_prefix+"/"+p_emote+".webp",
AOpath+"characters/"+p_char+"/"+p_emote+".webp"
AOpath+"characters/"+p_char+"/"+p_emote+".webp",
AOpath+"characters/"+p_char+"/(a)"+p_emote+".webp"
)
placeholder_path = AO2XPpath+"themes/default/placeholder.gif"
gif_path = ""
print apng_path, emote_prefix+p_emote
if apng_path:
gif_path = apng_path
self.use_pillow = 1