Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
import java.nio.charset.StandardCharsets;
import java.util.Arrays;
import java.util.Optional;

Expand Down Expand Up @@ -70,7 +71,7 @@ public static void countDownloads() {
// ---------------------- COUNT TOTAL GITHUB DOWNLOADS ----------------------
final String text2 = "GitHub: [ " + Arrays
.stream(IOUtils
.toString(new URL("https://api.github.com/repos/goxr3plus/XR3Player/releases"), "UTF-8")
.toString(new URL("https://api.github.com/repos/goxr3plus/XR3Player/releases"), StandardCharsets.UTF_8)
.split("\"download_count\":"))
.skip(1).mapToInt(l -> Integer.parseInt(l.split(",")[0])).sum() + " ]";
Platform.runLater(() -> Main.loginMode.getGitHubDownloadsLabel().setText(text2));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,8 @@ private enum TimeMode {
/** The normal. */
NORMAL,
/** The reversed. */
REVERSED;
}
REVERSED
}

/** The angle. */
private int angle;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ public void reCalculateCanvasSize() {
*
* @param args
*/
public static void main(String args[]) {
public static void main(String[] args) {
launch(args);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@
public class DJFilter extends StackPane {

public enum DJFilterCategory {
EQUALIZER_FILTER, VOLUME_FILTER;
}
EQUALIZER_FILTER, VOLUME_FILTER
}

/** The listeners. */
private final ArrayList<DJFilterListener> listeners = new ArrayList<>();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ public void flipToFront() {
flipToFront.setOnFinished(event -> {
front.setCache(false);
back.setCache(false);
fireEvent(new FlipEvent(FlipPanel.this, FlipPanel.this, FlipEvent.FLIP_TO_FRONT_FINISHED));
fireEvent(new FlipEvent(this, this, FlipEvent.FLIP_TO_FRONT_FINISHED));
});
flipToFront.play();
}
Expand All @@ -114,7 +114,7 @@ public void flipToBack() {
flipToBack.setOnFinished(event -> {
front.setCache(false);
back.setCache(false);
fireEvent(new FlipEvent(FlipPanel.this, FlipPanel.this, FlipEvent.FLIP_TO_BACK_FINISHED));
fireEvent(new FlipEvent(this, this, FlipEvent.FLIP_TO_BACK_FINISHED));
});
flipToBack.play();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,8 @@ public enum Monitor {
/**
* Monitor the RAM
*/
RAM;
}
RAM
}

/** The monitor. */
private Monitor monitor;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,6 @@ public long getTotalSize() {
}

public interface Listener {
public void progress(long completed, long totalSize);
void progress(long completed, long totalSize);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@ public class OnlineMusicBoxController extends StackPane {

// Online-Music-Categories
public enum OnlineMusicCategory {
RECOMMENDED, GENRES, ACTIVITIES, MOOD, EDITORSPICK, CHARTS;
}
RECOMMENDED, GENRES, ACTIVITIES, MOOD, EDITORSPICK, CHARTS
}

private final OnlineMusicCategory category;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,8 @@ public class SearchBox extends HBox {

public enum SearchBoxType {

LIBRARYSEARCHBOX, USERSSEARCHBOX;
}
LIBRARYSEARCHBOX, USERSSEARCHBOX
}

private final SearchBoxType searchBoxType;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,9 +78,9 @@ public enum WindowMode {
/**
* The window is on movie mode
*/
MOVIEMODE;
MOVIEMODE

}
}

/**
* Constructor.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ else if (key.getCode() == KeyCode.BACK_SPACE)
searchWord.set("");
else if (key.getCode() == KeyCode.A && key.isControlDown()) {
if (libraryMode != null)
if (getItemsObservableList().size() == 0)
if (getItemsObservableList().isEmpty())
getItemsObservableList().forEach(library -> ((Library) library).setSelected(true));
else {
boolean select = !((Library) getItemsObservableList().get(0)).isSelected();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ public enum SaveMode {
/**
* Songs have been copied into the database.
*/
DATABASE_PATH;
DATABASE_PATH
}

/**
Expand Down Expand Up @@ -486,7 +486,7 @@ private void initialize() {
nameLabel.getTooltip().setText(libraryName);
nameLabel.setOnMouseReleased(m -> {
if (m.getButton() == MouseButton.PRIMARY && m.getClickCount() == 2
&& Main.libraryMode.viewer.centerItemProperty().get() == Library.this)// Main.libraryMode.teamViewer.getTimeline().getStatus()
&& Main.libraryMode.viewer.centerItemProperty().get() == this)// Main.libraryMode.teamViewer.getTimeline().getStatus()
// != Status.RUNNING)
renameLibrary(nameLabel);
});
Expand All @@ -497,13 +497,13 @@ private void initialize() {
ratingLabel.textProperty().bind(starsProperty().asString());
ratingLabel.setOnMouseReleased(m -> {
if (m.getButton() == MouseButton.PRIMARY
&& Main.libraryMode.viewer.centerItemProperty().get() == Library.this)
&& Main.libraryMode.viewer.centerItemProperty().get() == this)
updateLibraryStars(ratingLabel);
});

// ----InformationLabel
informationLabel.setOnMouseReleased(m -> {
if (Main.libraryMode.viewer.centerItemProperty().get() == Library.this)
if (Main.libraryMode.viewer.centerItemProperty().get() == this)
Main.libraryMode.libraryInformation.showWindow(this);
});

Expand Down Expand Up @@ -597,7 +597,7 @@ public void updateStars(final double stars) {
if (setStars(stars)) {
// Try
try (PreparedStatement libUStars = Main.dbManager.getConnection()
.prepareStatement("UPDATE LIBRARIES SET STARS=? WHERE NAME=?;");) {
.prepareStatement("UPDATE LIBRARIES SET STARS=? WHERE NAME=?;")) {

// SQLITE COMMIT
libUStars.setDouble(1, stars);
Expand Down Expand Up @@ -933,7 +933,7 @@ public void finalizeLibraryDelete(final List<Node> list) {
}

public enum LibraryStatus {
OPENED, CLOSED;
OPENED, CLOSED
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@ private void initialize() {
nameField.getTooltip().setText(getName());
nameField.setOnMouseReleased(m -> {
if (m.getButton() == MouseButton.PRIMARY && m.getClickCount() == 2
&& Main.loginMode.viewer.centerItemProperty().get() == User.this)// Main.loginMode.teamViewer.getTimeline().getStatus()
&& Main.loginMode.viewer.centerItemProperty().get() == this)// Main.loginMode.teamViewer.getTimeline().getStatus()
// != Status.RUNNING)
renameUser(nameField);
});
Expand All @@ -251,7 +251,7 @@ private void initialize() {
* Open display information stack pane for this user
*/
public void displayInformation() {
if (Main.loginMode.viewer.centerItemProperty().get() == User.this)
if (Main.loginMode.viewer.centerItemProperty().get() == this)
Main.loginMode.userInformation.displayForUser(this);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ public class ApplicationSettingsController extends BorderPane {
*
*/
public enum SettingsTab {
GENERERAL, LIBRARIES, PLAYLISTS, SHORTCUTS, XPLAYERS, ANYONE;
}
GENERERAL, LIBRARIES, PLAYLISTS, SHORTCUTS, XPLAYERS, ANYONE
}

@FXML
private Button restoreAllSettings;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -247,8 +247,8 @@ public class SmartController extends StackPane {
// ---------Security---------------------------

public enum WorkOnProgress {
NONE, INSERTING_FILES, DELETE_FILES, RENAMING_LIBRARY, UPDATING_PLAYLIST, SEARCHING_FILES, EXPORTING_FILES;
}
NONE, INSERTING_FILES, DELETE_FILES, RENAMING_LIBRARY, UPDATING_PLAYLIST, SEARCHING_FILES, EXPORTING_FILES
}

public volatile WorkOnProgress workOnProgress = WorkOnProgress.NONE;

Expand Down Expand Up @@ -886,7 +886,7 @@ public void unbind() {
* Goes on the Previous List.
*/
public void goPrevious() {
if (SmartController.this.genre != Genre.SEARCHWINDOW && isFree(false) && !searchService.isActive()
if (this.genre != Genre.SEARCHWINDOW && isFree(false) && !searchService.isActive()
&& totalInDataBase.get() != 0 && currentPage.get() > 0) {
currentPage.set(currentPage.get() - 1);
loadService.startService(false, true, false);
Expand All @@ -897,7 +897,7 @@ public void goPrevious() {
* Goes on the Next List.
*/
public void goNext() {
if (SmartController.this.genre != Genre.SEARCHWINDOW && isFree(false) && !searchService.isActive()
if (this.genre != Genre.SEARCHWINDOW && isFree(false) && !searchService.isActive()
&& totalInDataBase.get() != 0 && currentPage.get() < getMaximumList()) {
currentPage.set(currentPage.get() + 1);
loadService.startService(false, true, false);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@
*/
public enum SmartControllerMode {

MEDIA, ASSOCIATED_FOLDERS, FILTERS_MODE;
MEDIA, ASSOCIATED_FOLDERS, FILTERS_MODE
}
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,8 @@ public class ConsoleWindowController extends StackPane {
*
*/
public enum ConsoleTab {
CONSOLE, SPEECH_RECOGNITION;
}
CONSOLE, SPEECH_RECOGNITION
}

/**
* Constructor
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,9 @@ public class StarWindow extends GridPane {
// -------------------------------------

/** The window. */
private final Stage window = new Stage();;
private final Stage window = new Stage();

/** The gc. */
/** The gc. */
private GraphicsContext gc;

/** The stars position. */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -366,7 +366,7 @@ protected Void call() throws Exception {
try (ResultSet resultSet = getConnection().createStatement()
.executeQuery("SELECT* FROM LIBRARIES;");
ResultSet dbCounter = getConnection().createStatement()
.executeQuery("SELECT COUNT(NAME) FROM LIBRARIES;");) {
.executeQuery("SELECT COUNT(NAME) FROM LIBRARIES;")) {

totalLibraries = dbCounter.getInt(1);

Expand Down
2 changes: 1 addition & 1 deletion src/main/java/com/goxr3plus/xr3player/enums/AudioType.java
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,5 @@ public enum AudioType {
/**
* Audio is UNKOWN
*/
UNKNOWN;
UNKNOWN
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
package com.goxr3plus.xr3player.enums;

public enum DropBoxOperation {
REFRESH, SEARCH, CREATE_FOLDER, DELETE, PERMANENTLY_DELETE, RENAME, STOPPED;
REFRESH, SEARCH, CREATE_FOLDER, DELETE, PERMANENTLY_DELETE, RENAME, STOPPED
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@

public enum FileCategory {

DIRECTORY, FILE;
DIRECTORY, FILE

}
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@
*/
public enum FileLinkType {

SYMBOLIC_LINK, HARD_LINK, SHORTCUT, ORIGINAL_FILE, UNKNOWN;
SYMBOLIC_LINK, HARD_LINK, SHORTCUT, ORIGINAL_FILE, UNKNOWN
}
2 changes: 1 addition & 1 deletion src/main/java/com/goxr3plus/xr3player/enums/FileType.java
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@
*
*/
public enum FileType {
DIRECTORY, FILE, ZIP;
DIRECTORY, FILE, ZIP
}
2 changes: 1 addition & 1 deletion src/main/java/com/goxr3plus/xr3player/enums/FilesMode.java
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,6 @@ public enum FilesMode {

SELECTED_MEDIA,

EVERYTHING_ON_PLAYLIST;
EVERYTHING_ON_PLAYLIST

}
2 changes: 1 addition & 1 deletion src/main/java/com/goxr3plus/xr3player/enums/Genre.java
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,6 @@ public enum Genre {
// /** The radiostation. */
// RADIOSTATION,
/** The unknown. */
BUYBUTTON, UNKNOWN;
BUYBUTTON, UNKNOWN

}
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,6 @@ public enum NotificationType {
ERROR,

/** The success. */
SUCCESS;
SUCCESS

}
2 changes: 1 addition & 1 deletion src/main/java/com/goxr3plus/xr3player/enums/Operation.java
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,6 @@ public enum Operation {
/** The refresh. */
REFRESH,
/** The update */
UPDATE_TABLE_VIEW, UNKNOWN;
UPDATE_TABLE_VIEW, UNKNOWN

}
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@

public enum TagTabCategory {

ARTWORK, BASICINFO, CURRENT, ID3V1, ID3V2;
ARTWORK, BASICINFO, CURRENT, ID3V1, ID3V2

}
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
package com.goxr3plus.xr3player.enums;

public enum UserCategory {
LOGGED_IN, NO_LOGGED_IN;
LOGGED_IN, NO_LOGGED_IN
}
Original file line number Diff line number Diff line change
Expand Up @@ -1045,11 +1045,11 @@ private void internalDataBaseUpdateStars(final SmartController smartController)
preparedUStars.setString(2, getFilePath());
if (preparedUStars.executeUpdate() > 0) {// && controller1 != controller) //Check
smartController.getItemsObservableList().forEach(media -> {
if (media.getFilePath().equals(Media.this.getFilePath()))
if (media.getFilePath().equals(this.getFilePath()))
media.starsProperty().set(stars.get());
});
smartController.getFiltersMode().getMediaTableViewer().getTableView().getItems().forEach(media -> {
if (media.getFilePath().equals(Media.this.getFilePath()))
if (media.getFilePath().equals(this.getFilePath()))
media.starsProperty().set(stars.get());
});
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,9 @@ public class XPlayerModel {
* Constructor.
*/
public XPlayerModel() {
songObject = new SimpleObjectProperty<>(XPlayerModel.this, "songObject", null);
songExtension = new SimpleStringProperty(XPlayerModel.this, "songExtension", null);
songPath = new SimpleStringProperty(XPlayerModel.this, "songPath", null);
songObject = new SimpleObjectProperty<>(this, "songObject", null);
songExtension = new SimpleStringProperty(this, "songExtension", null);
songPath = new SimpleStringProperty(this, "songPath", null);
equalizerArray = new float[32];
}

Expand Down
Loading