Skip to content

Commit

Permalink
added filtering to down-prioritize alternate files for curseforge addons
Browse files Browse the repository at this point in the history
  • Loading branch information
erikabp123 committed Oct 15, 2019
1 parent 5bb7b36 commit f9890e9
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 8 deletions.
2 changes: 1 addition & 1 deletion build.gradle
Expand Up @@ -6,7 +6,7 @@ plugins {
}

group 'ClassicAddonManager'
version '0.76'
version '0.77'
sourceCompatibility = 12

repositories {
Expand Down
Expand Up @@ -59,6 +59,11 @@ private CurseFile determineLatestFileByFlavor(String flavor){
Date curFileDate = DateConverter.convertFromCurseAPI(latestFile.fileDate);
Date fileDate = DateConverter.convertFromCurseAPI(file.fileDate);
if(DateConverter.isNewerDate(fileDate, curFileDate)){
if(!latestFile.isAlternate && file.isAlternate){
continue;
}
latestFile = file;
} else if(latestFile.isAlternate && !file.isAlternate){
latestFile = file;
}
}
Expand Down
10 changes: 4 additions & 6 deletions src/main/java/com/CAM/GUI/Controller.java
Expand Up @@ -384,12 +384,10 @@ private void curseSearch(String userQuery) throws ScrapeException {
}
}

ObservableList<CurseAddonResponse> observableList = null;
if(checkboxClassicSearch.isSelected()){
FXCollections.observableList(classicResults);
} else {
FXCollections.observableList(results);
}
ObservableList<CurseAddonResponse> observableList;
observableList = checkboxClassicSearch.isSelected()
? FXCollections.observableList(classicResults)
: FXCollections.observableList(results);
Platform.runLater(() -> {
comboBoxSearch.show();
comboBoxSearch.setItems(observableList);
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/com/CAM/Updating/VersionInfo.java
Expand Up @@ -5,7 +5,7 @@
import java.io.*;

public class VersionInfo {
public static final double CAM_VERSION = 0.76;
public static final double CAM_VERSION = 0.77;
public static final double EXE_VERSION = 0.1;
public static final double AUTOUPDATER_VERSION = 0.2;

Expand Down
4 changes: 4 additions & 0 deletions system/CHANGELOG.txt
@@ -1,3 +1,7 @@
v0.77
- Added option for classic only filtering for curseforge searches
- Will now down-prioritize 'alternate' versions of addon when updating

v0.76
- Bug fix (added conversion for old Tukui addons)

Expand Down

0 comments on commit f9890e9

Please sign in to comment.