diff --git a/PlayWallPlugins/PlayWallPluginContentPlayer/src/main/resources/lang/base_de.properties b/PlayWallPlugins/PlayWallPluginContentPlayer/src/main/resources/lang/base_de.properties index a73bac8949510e7078f404ae28b1f10f46271e1a..bebc781bdfaa2f289e6839ca78379be5e32377ca 100644 --- a/PlayWallPlugins/PlayWallPluginContentPlayer/src/main/resources/lang/base_de.properties +++ b/PlayWallPlugins/PlayWallPluginContentPlayer/src/main/resources/lang/base_de.properties @@ -20,4 +20,6 @@ plugin.content.pad.settings.zone=Zonen 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 \ No newline at end of file +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 diff --git a/PlayWallPlugins/PlayWallPluginContentPlayer/src/main/resources/view/ContentPlayerSettingsTab.fxml b/PlayWallPlugins/PlayWallPluginContentPlayer/src/main/resources/view/ContentPlayerSettingsTab.fxml index 1fda86c37da7292a454c75d3d906126c5afb7483..05125907bc9dee967605253aff7f87a931c5171e 100644 --- a/PlayWallPlugins/PlayWallPluginContentPlayer/src/main/resources/view/ContentPlayerSettingsTab.fxml +++ b/PlayWallPlugins/PlayWallPluginContentPlayer/src/main/resources/view/ContentPlayerSettingsTab.fxml @@ -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" /> diff --git a/PlayWallPlugins/PlayWallPluginContentPlayer/src/main/scala/de/tobias/playpad/plugin/content/settings/ContentPlayerSettingsViewController.scala b/PlayWallPlugins/PlayWallPluginContentPlayer/src/main/scala/de/tobias/playpad/plugin/content/settings/ContentPlayerSettingsViewController.scala index 0fe294fe0693816f04a4b55026c59f504858fac4..69b9e0e578697684b8fa232161843ffe3fb5334b 100644 --- a/PlayWallPlugins/PlayWallPluginContentPlayer/src/main/scala/de/tobias/playpad/plugin/content/settings/ContentPlayerSettingsViewController.scala +++ b/PlayWallPlugins/PlayWallPluginContentPlayer/src/main/scala/de/tobias/playpad/plugin/content/settings/ContentPlayerSettingsViewController.scala @@ -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