Skip to content
Snippets Groups Projects
Commit ba7bf978 authored by Tobias Ullerich's avatar Tobias Ullerich
Browse files

#173 - Add download link to ffmpeg

parent accb7848
No related branches found
No related tags found
No related merge requests found
......@@ -21,3 +21,5 @@ plugin.content.pad.settings.zone.addAll=Alle anw\u00E4hlen
plugin.content.pad.settings.zone.removeAll=Alle abw\u00E4hlen
plugin.content.player.settings.ffmpeg=ffmpeg
plugin.content.player.settings.ffprobe=ffprobe
plugin.content.player.settings.ffmpeg_download=Download
plugin.content.player.settings.ffmpeg_link=https://www.gyan.dev/ffmpeg/builds/
\ No newline at end of file
......@@ -4,6 +4,7 @@
<?import javafx.geometry.Insets?>
<?import javafx.scene.control.Button?>
<?import javafx.scene.control.ComboBox?>
<?import javafx.scene.control.Hyperlink?>
<?import javafx.scene.control.Label?>
<?import javafx.scene.control.ListView?>
<?import javafx.scene.control.Separator?>
......@@ -11,24 +12,30 @@
<?import javafx.scene.layout.HBox?>
<?import javafx.scene.layout.VBox?>
<VBox xmlns="http://javafx.com/javafx/17" xmlns:fx="http://javafx.com/fxml/1">
<VBox spacing="14.0" xmlns="http://javafx.com/javafx/17" xmlns:fx="http://javafx.com/fxml/1">
<children>
<HBox alignment="CENTER_LEFT" maxHeight="50.0" prefHeight="50.0" spacing="14.0">
<HBox alignment="CENTER_LEFT" maxHeight="50.0" spacing="14.0">
<children>
<Label alignment="CENTER_RIGHT" contentDisplay="RIGHT" prefWidth="150.0" text="%plugin.content.player.settings.ffmpeg" />
<TextField fx:id="ffmpegTextField" prefWidth="300.0" HBox.hgrow="ALWAYS" />
<Button fx:id="ffmpegButton" mnemonicParsing="false" onAction="#onFfmpegHandle" />
</children>
</HBox>
<HBox alignment="CENTER_LEFT" maxHeight="50.0" prefHeight="50.0" spacing="14.0">
<HBox alignment="CENTER_LEFT" maxHeight="50.0" spacing="14.0">
<children>
<Label alignment="CENTER_RIGHT" contentDisplay="RIGHT" prefWidth="150.0" text="%plugin.content.player.settings.ffprobe" />
<TextField fx:id="ffprobeTextField" prefWidth="300.0" HBox.hgrow="ALWAYS" />
<Button fx:id="ffprobeButton" mnemonicParsing="false" onAction="#onFfprobeHandle" />
</children>
</HBox>
<HBox alignment="CENTER_LEFT" spacing="14.0">
<children>
<Label alignment="CENTER_RIGHT" contentDisplay="RIGHT" prefWidth="150.0" text="%plugin.content.player.settings.ffmpeg_download" />
<Hyperlink fx:id="ffmpegDownloadLink" onAction="#onFfmpegDownloadLink" />
</children>
</HBox>
<Separator prefWidth="200.0" />
<HBox alignment="CENTER_LEFT" maxHeight="50.0" prefHeight="50.0" spacing="14.0">
<HBox alignment="CENTER_LEFT" maxHeight="50.0" spacing="14.0">
<children>
<Label alignment="CENTER_RIGHT" contentDisplay="RIGHT" prefWidth="150.0" text="%plugin.content.player.settings.screen" />
<ComboBox fx:id="screenComboBox" prefWidth="200.0" />
......
......@@ -15,6 +15,9 @@ import javafx.scene.control._
import javafx.stage.FileChooser
import nativecontentplayerwindows.{ContentPlayerWindow, ContentScreen}
import java.awt.Desktop
import java.net.URI
class ContentPlayerSettingsViewController extends ProfileSettingsTabViewController with IProfileReloadTask {
import javafx.fxml.FXML
......@@ -23,6 +26,7 @@ class ContentPlayerSettingsViewController extends ProfileSettingsTabViewControll
@FXML var ffmpegTextField: TextField = _
@FXML var ffprobeButton: Button = _
@FXML var ffprobeTextField: TextField = _
@FXML var ffmpegDownloadLink: Hyperlink = _
@FXML
var screenComboBox: ComboBox[SelectableContentScreen] = _
......@@ -81,6 +85,8 @@ class ContentPlayerSettingsViewController extends ProfileSettingsTabViewControll
ffmpegButton.setGraphic(new FontIcon(FontAwesomeType.FOLDER))
ffprobeButton.setGraphic(new FontIcon(FontAwesomeType.FOLDER))
ffmpegDownloadLink.setText(Localization.getString("plugin.content.player.settings.ffmpeg_link"))
}
private def saveSettingsToZone(zone: Zone): Unit = {
......@@ -124,6 +130,10 @@ class ContentPlayerSettingsViewController extends ProfileSettingsTabViewControll
}
}
@FXML def onFfmpegDownloadLink(event: ActionEvent): Unit = {
Desktop.getDesktop.browse(URI.create(ffmpegDownloadLink.getText))
}
@FXML
def onAddHandle(): Unit = {
val newConfiguration = new Zone
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment