File tree Expand file tree Collapse file tree 1 file changed +23
-1
lines changed
CollapseLauncher/Classes/Helper/LauncherApiLoader/HoYoPlay Expand file tree Collapse file tree 1 file changed +23
-1
lines changed Original file line number Diff line number Diff line change 11using Hi3Helper . Plugin . Core . Management ;
22using Hi3Helper . Plugin . Core . Utility . Json . Converters ;
3+ using System ;
34using System . Collections . Generic ;
5+ using System . IO ;
46using System . Text . Json . Serialization ;
57#pragma warning disable IDE0130
68
@@ -25,8 +27,28 @@ public class HypResourcePluginData : HypApiIdentifiable
2527 public List < HypPluginPackageInfo > Plugins
2628 {
2729 get ;
28- init ;
30+ init => field = RemoveExcludedPackages ( value ) ;
2931 } = [ ] ;
32+
33+ private static List < HypPluginPackageInfo > RemoveExcludedPackages ( List < HypPluginPackageInfo > package )
34+ {
35+ List < HypPluginPackageInfo > returnList = [ ] ;
36+ // ReSharper disable once LoopCanBeConvertedToQuery
37+ foreach ( HypPluginPackageInfo plugin in package )
38+ {
39+ string packageUrl = plugin . PluginPackage ? . Url ?? "" ;
40+ string packageFileNameNoExt = Path . GetFileNameWithoutExtension ( packageUrl ) ;
41+
42+ if ( packageFileNameNoExt . Contains ( "DXSetup" , StringComparison . OrdinalIgnoreCase ) )
43+ {
44+ continue ;
45+ }
46+
47+ returnList . Add ( plugin ) ;
48+ }
49+
50+ return returnList ;
51+ }
3052}
3153
3254public class HypPluginPackageInfo
You can’t perform that action at this time.
0 commit comments