@@ -189,25 +189,37 @@ public static void PatchAPK(ApkZip apkArchive, string appLocation, bool forcePat
189189 public static bool AttemptDownloadUnstrippedUnity ( string version )
190190 {
191191 Logger . Log ( "Checking index for unstrippedUnity" ) ;
192- WebClient c = new WebClient ( ) ;
193- string libUnityIndexString = c . DownloadString ( "https://raw.githubusercontent.com/Lauriethefish/QuestUnstrippedUnity/main/index.json" ) ;
194- Dictionary < string , Dictionary < string , string > > index = JsonSerializer . Deserialize < Dictionary < string , Dictionary < string , string > > > ( libUnityIndexString ) ;
195- string appId = CoreService . coreVars . currentApp ;
196- if ( index . ContainsKey ( appId ) )
192+ try
197193 {
198- if ( index [ appId ] . ContainsKey ( version ) )
194+ WebClient c = new WebClient ( ) ;
195+ string libUnityIndexString =
196+ c . DownloadString (
197+ "https://raw.githubusercontent.com/Lauriethefish/QuestUnstrippedUnity/main/index.json" ) ;
198+ Dictionary < string , Dictionary < string , string > > index =
199+ JsonSerializer . Deserialize < Dictionary < string , Dictionary < string , string > > > ( libUnityIndexString ) ;
200+ string appId = CoreService . coreVars . currentApp ;
201+ if ( index . ContainsKey ( appId ) )
199202 {
200- c . DownloadFile ( "https://raw.githubusercontent.com/Lauriethefish/QuestUnstrippedUnity/main/versions/" + index [ appId ] [ version ] + ".so" , CoreService . coreVars . QAVSTmpPatchingDir + "libunity.so" ) ;
201- return true ;
203+ if ( index [ appId ] . ContainsKey ( version ) )
204+ {
205+ c . DownloadFile (
206+ "https://raw.githubusercontent.com/Lauriethefish/QuestUnstrippedUnity/main/versions/" +
207+ index [ appId ] [ version ] + ".so" , CoreService . coreVars . QAVSTmpPatchingDir + "libunity.so" ) ;
208+ return true ;
209+ }
210+ else
211+ {
212+ Logger . Log ( "No unstripped libunity found. It does exist for another version of the app" ) ;
213+ }
202214 }
203215 else
204216 {
205- Logger . Log ( "No unstripped libunity found. It does exist for another version of the app" ) ;
217+ Logger . Log ( "No unstripped libunity found." , LoggingType . Warning ) ;
206218 }
207219 }
208- else
220+ catch ( Exception e )
209221 {
210- Logger . Log ( "No unstripped libunity found." , LoggingType . Warning ) ;
222+ Logger . Log ( "Failed to check index for unstripped libunity: " + e , LoggingType . Warning ) ;
211223 }
212224 return false ;
213225 }
0 commit comments