Skip to content

Commit

Permalink
Fixed bug #62
Browse files Browse the repository at this point in the history
  • Loading branch information
LMH01 committed May 23, 2021
1 parent ced052f commit efae3b7
Showing 1 changed file with 16 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,24 @@ public String getOptionPaneMessage(Map<String, String> map) {
ArrayList<Integer> badGenreIds = new ArrayList<>();
ArrayList<Integer> goodGenreIds = new ArrayList<>();
for(String string : badGenreNames){
badGenreIds.add(ModManager.genreMod.getAnalyzer().getContentIdByName(string));
try{
badGenreIds.add(Integer.parseInt(string));
}catch(NumberFormatException e){
int numberToAdd = ModManager.genreMod.getAnalyzer().getContentIdByName(string);
if(numberToAdd != -1){
badGenreIds.add(numberToAdd);
}
}
}
for(String string : goodGenreNames){
goodGenreIds.add(ModManager.genreMod.getAnalyzer().getContentIdByName(string));
try{
goodGenreIds.add(Integer.parseInt(string));
}catch(NumberFormatException e){
int numberToAdd = ModManager.genreMod.getAnalyzer().getContentIdByName(string);
if(numberToAdd != -1){
goodGenreIds.add(numberToAdd);
}
}
}
map.remove("BAD");
map.remove("GOOD");
Expand Down

0 comments on commit efae3b7

Please sign in to comment.