From 35a1096da310e1a15758e8b8dcdabb3d7057d86c Mon Sep 17 00:00:00 2001 From: Matchu Date: Thu, 24 Jun 2021 18:54:48 -0700 Subject: [PATCH] Fix movie bugs with Dandan, Electric Dress, etc MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Huh, so it turns out sometimes the manifest will include old broken conversion attempts! This fixed the "MiniMME18-S2c: Holomorphic Foliage and Dandan Set", the "Electric Dress" on various species (incl. Aisha), and yeah! What an interesting discovery 😂 --- src/server/types/AppearanceLayer.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/server/types/AppearanceLayer.js b/src/server/types/AppearanceLayer.js index de4a92a..f899361 100644 --- a/src/server/types/AppearanceLayer.js +++ b/src/server/types/AppearanceLayer.js @@ -417,6 +417,14 @@ async function loadAndCacheAssetDataFromManifest(db, layer) { (ad) => new URL(ad.path, "http://images.neopets.com") ); + // Now, we search the asset URLs for the *last* asset matching each filetype. + // (This is because sometimes there will be older and newer animations in the + // same file, and the newer one comes second, I guess!) + // + // NOTE: I'm not sure how reliable this actually is. I wonder if the more + // correct behavior is to like... play all of them? 😳 + assetUrls.reverse(); + const jsAssetUrl = assetUrls.find( // NOTE: Sometimes the path ends with a ?v= query string, so we need // to use `extname` to find the real extension!