@@ -816,7 +816,10 @@ func (a AppService) SyncAppListFromRemote() (err error) {
816816 }
817817 settingService := NewISettingService ()
818818 _ = settingService .Update ("AppStoreSyncStatus" , constant .Syncing )
819-
819+ setting , err := settingService .GetSettingInfo ()
820+ if err != nil {
821+ return err
822+ }
820823 var (
821824 tags []* model.Tag
822825 appTags []* model.AppTag
@@ -868,7 +871,13 @@ func (a AppService) SyncAppListFromRemote() (err error) {
868871 version := v .Name
869872 detail := detailsMap [version ]
870873 versionUrl := fmt .Sprintf ("%s/%s/%s" , baseRemoteUrl , app .Key , version )
871-
874+ paramByte , _ := json .Marshal (v .AppForm )
875+ var appForm dto.AppForm
876+ _ = json .Unmarshal (paramByte , & appForm )
877+ if appForm .SupportVersion > 0 && common .CompareVersion (strconv .FormatFloat (appForm .SupportVersion , 'f' , - 1 , 64 ), setting .SystemVersion ) {
878+ delete (detailsMap , version )
879+ continue
880+ }
872881 if _ , ok := InitTypes [app .Type ]; ok {
873882 dockerComposeUrl := fmt .Sprintf ("%s/%s" , versionUrl , "docker-compose.yml" )
874883 _ , composeRes , err := httpUtil .HandleGetWithTransport (dockerComposeUrl , http .MethodGet , transport , constant .TimeOut20s )
@@ -880,7 +889,6 @@ func (a AppService) SyncAppListFromRemote() (err error) {
880889 detail .DockerCompose = ""
881890 }
882891
883- paramByte , _ := json .Marshal (v .AppForm )
884892 detail .Params = string (paramByte )
885893 detail .DownloadUrl = fmt .Sprintf ("%s/%s" , versionUrl , app .Key + "-" + version + ".tar.gz" )
886894 detail .DownloadCallBackUrl = v .DownloadCallBackUrl
0 commit comments