Misc. bugfixes
This commit is contained in:
@@ -304,6 +304,16 @@ public class ScoreDB {
|
||||
* @return all scores for the beatmap, or null if any error occurred
|
||||
*/
|
||||
public static ScoreData[] getMapScores(Beatmap beatmap) {
|
||||
return getMapScores(beatmap, null);
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieves the game scores for a beatmap while excluding a score.
|
||||
* @param beatmap the beatmap
|
||||
* @param exclude the filename of the score to exclude
|
||||
* @return all scores for the beatmap except for exclude, or null if any error occurred
|
||||
*/
|
||||
public static ScoreData[] getMapScores(Beatmap beatmap, String exclude) {
|
||||
if (connection == null)
|
||||
return null;
|
||||
|
||||
@@ -317,7 +327,11 @@ public class ScoreDB {
|
||||
ResultSet rs = selectMapStmt.executeQuery();
|
||||
while (rs.next()) {
|
||||
ScoreData s = new ScoreData(rs);
|
||||
list.add(s);
|
||||
if (s.replayString != null && s.replayString.equals(exclude)) {
|
||||
// dont return this score
|
||||
} else {
|
||||
list.add(s);
|
||||
}
|
||||
}
|
||||
rs.close();
|
||||
} catch (SQLException e) {
|
||||
@@ -326,7 +340,6 @@ public class ScoreDB {
|
||||
}
|
||||
return getSortedArray(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieves the game scores for a beatmap set.
|
||||
* @param beatmap the beatmap
|
||||
|
||||
Reference in New Issue
Block a user