release 0.8.0 #12
|
@ -137,17 +137,16 @@ public class MainWindowController {
|
||||||
@FXML private TableColumn<SourceDataType, String> sourceColumn;
|
@FXML private TableColumn<SourceDataType, String> sourceColumn;
|
||||||
@FXML private TableColumn<SourceDataType, String> modeColumn;
|
@FXML private TableColumn<SourceDataType, String> modeColumn;
|
||||||
|
|
||||||
@FXML private TreeTableColumn<FilmTabelDataType, String> columnStreamUrl;
|
|
||||||
@FXML private TreeTableColumn<FilmTabelDataType, String> columnTitle;
|
|
||||||
@FXML private TreeTableColumn<FilmTabelDataType, ImageView> columnFavorite;
|
|
||||||
@FXML private TreeTableColumn<FilmTabelDataType, String> columnSeason;
|
|
||||||
@FXML private TreeTableColumn<FilmTabelDataType, String> columnEpisode;
|
|
||||||
|
|
||||||
// table-mode
|
// table-mode
|
||||||
@FXML private AnchorPane tableModeAnchorPane;
|
@FXML private AnchorPane tableModeAnchorPane;
|
||||||
@FXML private JFXTextField searchTextField;
|
@FXML private JFXTextField searchTextField;
|
||||||
|
|
||||||
@FXML private TreeTableView<FilmTabelDataType> filmsTreeTable;
|
@FXML private TreeTableView<FilmTabelDataType> filmsTreeTable;
|
||||||
|
@FXML private TreeTableColumn<FilmTabelDataType, String> columnStreamUrl;
|
||||||
|
@FXML private TreeTableColumn<FilmTabelDataType, String> columnTitle;
|
||||||
|
@FXML private TreeTableColumn<FilmTabelDataType, ImageView> columnFavorite;
|
||||||
|
@FXML private TreeTableColumn<FilmTabelDataType, String> columnSeason;
|
||||||
|
@FXML private TreeTableColumn<FilmTabelDataType, String> columnEpisode;
|
||||||
@FXML private TreeItem<FilmTabelDataType> filmRoot = new TreeItem<>(new FilmTabelDataType("", "", "", "", false, null, null));
|
@FXML private TreeItem<FilmTabelDataType> filmRoot = new TreeItem<>(new FilmTabelDataType("", "", "", "", false, null, null));
|
||||||
|
|
||||||
|
|
||||||
|
@ -161,7 +160,8 @@ public class MainWindowController {
|
||||||
@FXML private JFXButton forwardBtn;
|
@FXML private JFXButton forwardBtn;
|
||||||
|
|
||||||
// poster-mode
|
// poster-mode
|
||||||
// @FXML private AnchorPane posterModeAnchorPane;
|
@FXML private AnchorPane posterModeAnchorPane;
|
||||||
|
@FXML private ScrollPane posterModeScrollPane;
|
||||||
|
|
||||||
private DBController dbController;
|
private DBController dbController;
|
||||||
private UpdateController updateController;
|
private UpdateController updateController;
|
||||||
|
@ -464,51 +464,53 @@ public class MainWindowController {
|
||||||
// Table-Mode fxml actions
|
// Table-Mode fxml actions
|
||||||
@FXML
|
@FXML
|
||||||
private void playbtnclicked() {
|
private void playbtnclicked() {
|
||||||
if (currentTableFilm.getStreamUrl().contains("_rootNode")) {
|
if (currentTableFilm.getStreamUrl().length() > 0) {
|
||||||
LOGGER.info("rootNode found, getting last watched episode");
|
if (currentTableFilm.getStreamUrl().contains("_rootNode")) {
|
||||||
currentTableFilm = dbController.getLastWatchedEpisode(currentTableFilm.getTitle());
|
LOGGER.info("rootNode found, getting last watched episode");
|
||||||
}
|
currentTableFilm = dbController.getLastWatchedEpisode(currentTableFilm.getTitle());
|
||||||
|
}
|
||||||
|
|
||||||
if (isSupportedFormat(currentTableFilm)) {
|
if (isSupportedFormat(currentTableFilm)) {
|
||||||
new Player(getCurrentTableFilm());
|
new Player(getCurrentTableFilm());
|
||||||
} else {
|
} else {
|
||||||
LOGGER.error("using fallback player!");
|
LOGGER.error("using fallback player!");
|
||||||
if (System.getProperty("os.name").contains("Linux")) {
|
if (System.getProperty("os.name").contains("Linux")) {
|
||||||
String line;
|
String line;
|
||||||
String output = "";
|
String output = "";
|
||||||
Process p;
|
Process p;
|
||||||
try {
|
|
||||||
p = Runtime.getRuntime().exec("which vlc");
|
|
||||||
BufferedReader input = new BufferedReader(new InputStreamReader(p.getInputStream()));
|
|
||||||
while ((line = input.readLine()) != null) {
|
|
||||||
output = line;
|
|
||||||
}
|
|
||||||
LOGGER.info("which vlc: " + output);
|
|
||||||
input.close();
|
|
||||||
} catch (IOException e1) {
|
|
||||||
e1.printStackTrace();
|
|
||||||
}
|
|
||||||
if (output.contains("which: no vlc") || output == "") {
|
|
||||||
JFXInfoAlert vlcInfoAlert = new JFXInfoAlert("Info",
|
|
||||||
XMLController.getLocalBundle().getString("vlcNotInstalled"),
|
|
||||||
btnStyle, primaryStage);
|
|
||||||
vlcInfoAlert.showAndWait();
|
|
||||||
} else {
|
|
||||||
try {
|
try {
|
||||||
new ProcessBuilder("vlc", getCurrentStreamUrl()).start();
|
p = Runtime.getRuntime().exec("which vlc");
|
||||||
|
BufferedReader input = new BufferedReader(new InputStreamReader(p.getInputStream()));
|
||||||
|
while ((line = input.readLine()) != null) {
|
||||||
|
output = line;
|
||||||
|
}
|
||||||
|
LOGGER.info("which vlc: " + output);
|
||||||
|
input.close();
|
||||||
|
} catch (IOException e1) {
|
||||||
|
e1.printStackTrace();
|
||||||
|
}
|
||||||
|
if (output.contains("which: no vlc") || output == "") {
|
||||||
|
JFXInfoAlert vlcInfoAlert = new JFXInfoAlert("Info",
|
||||||
|
XMLController.getLocalBundle().getString("vlcNotInstalled"),
|
||||||
|
btnStyle, primaryStage);
|
||||||
|
vlcInfoAlert.showAndWait();
|
||||||
|
} else {
|
||||||
|
try {
|
||||||
|
new ProcessBuilder("vlc", getCurrentStreamUrl()).start();
|
||||||
|
} catch (IOException e) {
|
||||||
|
LOGGER.warn("An error has occurred while opening the file!", e);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
} else if (System.getProperty("os.name").contains("Windows") || System.getProperty("os.name").contains("Mac OS X")) {
|
||||||
|
try {
|
||||||
|
Desktop.getDesktop().open(new File(getCurrentStreamUrl()));
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
LOGGER.warn("An error has occurred while opening the file!", e);
|
LOGGER.warn("An error has occurred while opening the file!", e);
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
LOGGER.error(System.getProperty("os.name") + ", OS is not supported, please contact a developer! ");
|
||||||
}
|
}
|
||||||
|
|
||||||
} else if (System.getProperty("os.name").contains("Windows") || System.getProperty("os.name").contains("Mac OS X")) {
|
|
||||||
try {
|
|
||||||
Desktop.getDesktop().open(new File(getCurrentStreamUrl()));
|
|
||||||
} catch (IOException e) {
|
|
||||||
LOGGER.warn("An error has occurred while opening the file!", e);
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
LOGGER.error(System.getProperty("os.name") + ", OS is not supported, please contact a developer! ");
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -894,6 +896,10 @@ public class MainWindowController {
|
||||||
return mimeType != null && (mimeType.contains("mp4") || mimeType.contains("vp6"));
|
return mimeType != null && (mimeType.contains("mp4") || mimeType.contains("vp6"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Poser Mode WIP
|
||||||
|
*/
|
||||||
|
|
||||||
private void posterModeStartup() {
|
private void posterModeStartup() {
|
||||||
checkAllPosters();
|
checkAllPosters();
|
||||||
}
|
}
|
||||||
|
|
|
@ -64,6 +64,15 @@
|
||||||
<JFXButton fx:id="forwardBtn" contentDisplay="CENTER" onAction="#forwardBtnclicked" prefHeight="25.0" prefWidth="90.0" AnchorPane.bottomAnchor="132.0" AnchorPane.rightAnchor="12.0" />
|
<JFXButton fx:id="forwardBtn" contentDisplay="CENTER" onAction="#forwardBtnclicked" prefHeight="25.0" prefWidth="90.0" AnchorPane.bottomAnchor="132.0" AnchorPane.rightAnchor="12.0" />
|
||||||
</children>
|
</children>
|
||||||
</AnchorPane>
|
</AnchorPane>
|
||||||
|
<ScrollPane fx:id="posterModeScrollPane" visible="false" AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="32.0">
|
||||||
|
<content>
|
||||||
|
<AnchorPane fx:id="posterModeAnchorPane">
|
||||||
|
<padding>
|
||||||
|
<Insets bottom="17.0" />
|
||||||
|
</padding>
|
||||||
|
</AnchorPane>
|
||||||
|
</content>
|
||||||
|
</ScrollPane>
|
||||||
<ScrollPane fx:id="settingsScrollPane" prefHeight="568.0" prefWidth="800.0" style="-fx-background: white;" visible="false" AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="150.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="32.0">
|
<ScrollPane fx:id="settingsScrollPane" prefHeight="568.0" prefWidth="800.0" style="-fx-background: white;" visible="false" AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="150.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="32.0">
|
||||||
<content>
|
<content>
|
||||||
<AnchorPane fx:id="settingsAnchorPane" prefWidth="832.0" style="-fx-background-color: white;">
|
<AnchorPane fx:id="settingsAnchorPane" prefWidth="832.0" style="-fx-background-color: white;">
|
||||||
|
|
Loading…
Reference in New Issue