diff --git a/gameyfin/build.gradle.kts b/gameyfin/build.gradle.kts index 373957b..f271060 100644 --- a/gameyfin/build.gradle.kts +++ b/gameyfin/build.gradle.kts @@ -53,8 +53,8 @@ dependencies { // Persistence & I/O implementation("org.springframework.boot:spring-boot-starter-data-jpa") - implementation("com.github.paulcwarren:spring-content-fs-boot-starter:3.0.17") K - implementation("commons-io:commons-io:2.18.0") + implementation("com.github.paulcwarren:spring-content-fs-boot-starter:3.0.17") + implementation("commons-io:commons-io:2.18.0") // SSO implementation("org.springframework.boot:spring-boot-starter-oauth2-client") diff --git a/gameyfin/src/main/frontend/components/administration/PluginManagement.tsx b/gameyfin/src/main/frontend/components/administration/PluginManagement.tsx index 0dad18f..4e3439e 100644 --- a/gameyfin/src/main/frontend/components/administration/PluginManagement.tsx +++ b/gameyfin/src/main/frontend/components/administration/PluginManagement.tsx @@ -1,5 +1,5 @@ import React, {useEffect} from "react"; -import {PluginManagementSection} from "Frontend/components/general/PluginManagementSection"; +import {PluginManagementSection} from "Frontend/components/general/plugin/PluginManagementSection"; import {initializePluginState, pluginState} from "Frontend/state/PluginState"; import {useSnapshot} from "valtio/react"; diff --git a/gameyfin/src/main/frontend/components/general/cards/PluginManagementCard.tsx b/gameyfin/src/main/frontend/components/general/cards/PluginManagementCard.tsx index d94dad8..dbdafa2 100644 --- a/gameyfin/src/main/frontend/components/general/cards/PluginManagementCard.tsx +++ b/gameyfin/src/main/frontend/components/general/cards/PluginManagementCard.tsx @@ -18,7 +18,7 @@ import { import PluginState from "Frontend/generated/org/pf4j/PluginState"; import React, {ReactNode} from "react"; import PluginDetailsModal from "Frontend/components/general/modals/PluginDetailsModal"; -import PluginLogo from "Frontend/components/general/PluginLogo"; +import PluginLogo from "Frontend/components/general/plugin/PluginLogo"; import PluginTrustLevel from "Frontend/generated/de/grimsi/gameyfin/core/plugins/management/PluginTrustLevel"; import {PluginEndpoint} from "Frontend/generated/endpoints"; import PluginDto from "Frontend/generated/de/grimsi/gameyfin/core/plugins/dto/PluginDto"; diff --git a/gameyfin/src/main/frontend/components/general/LibraryManagementDetails.tsx b/gameyfin/src/main/frontend/components/general/library/LibraryManagementDetails.tsx similarity index 100% rename from gameyfin/src/main/frontend/components/general/LibraryManagementDetails.tsx rename to gameyfin/src/main/frontend/components/general/library/LibraryManagementDetails.tsx diff --git a/gameyfin/src/main/frontend/components/general/library/LibraryManagementGames.tsx b/gameyfin/src/main/frontend/components/general/library/LibraryManagementGames.tsx new file mode 100644 index 0000000..1a90020 --- /dev/null +++ b/gameyfin/src/main/frontend/components/general/library/LibraryManagementGames.tsx @@ -0,0 +1,52 @@ +import LibraryDto from "Frontend/generated/de/grimsi/gameyfin/libraries/dto/LibraryDto"; +import {useEffect, useState} from "react"; +import {LibraryEndpoint} from "Frontend/generated/endpoints"; +import GameDto from "Frontend/generated/de/grimsi/gameyfin/games/dto/GameDto"; +import {Button, Table, TableBody, TableCell, TableColumn, TableHeader, TableRow} from "@heroui/react"; +import {CheckCircle, Pencil, Trash} from "@phosphor-icons/react"; + +interface LibraryManagementGamesProps { + library: LibraryDto; +} + +export default function LibraryManagementGames({library}: LibraryManagementGamesProps) { + const [games, setGames] = useState([]); + + useEffect(() => { + LibraryEndpoint.getGamesInLibrary(library.id).then((games) => { + setGames(games); + }) + }, []); + + return
+

Manage games in library

+ + + Game + Added to library + Path + Actions + + + {(item) => ( + + + {item.title} ({item.release !== undefined ? new Date(item.release).getFullYear() : "unknown"}) + + + {new Date(item.createdAt).toLocaleString()} + + + {item.path} + + + + + + + + )} + +
+
; +} \ No newline at end of file diff --git a/gameyfin/src/main/frontend/components/general/modals/PluginDetailsModal.tsx b/gameyfin/src/main/frontend/components/general/modals/PluginDetailsModal.tsx index 3be684f..9b6cf24 100644 --- a/gameyfin/src/main/frontend/components/general/modals/PluginDetailsModal.tsx +++ b/gameyfin/src/main/frontend/components/general/modals/PluginDetailsModal.tsx @@ -3,7 +3,7 @@ import {addToast, Button, Link, Modal, ModalBody, ModalContent, ModalFooter, Mod import {Form, Formik} from "formik"; import PluginConfigElement from "Frontend/generated/de/grimsi/gameyfin/pluginapi/core/PluginConfigElement"; import Input from "Frontend/components/general/input/Input"; -import PluginLogo from "Frontend/components/general/PluginLogo"; +import PluginLogo from "Frontend/components/general/plugin/PluginLogo"; import Markdown from "react-markdown"; import remarkBreaks from "remark-breaks"; import {PluginEndpoint} from "Frontend/generated/endpoints"; diff --git a/gameyfin/src/main/frontend/components/general/PluginLogo.tsx b/gameyfin/src/main/frontend/components/general/plugin/PluginLogo.tsx similarity index 100% rename from gameyfin/src/main/frontend/components/general/PluginLogo.tsx rename to gameyfin/src/main/frontend/components/general/plugin/PluginLogo.tsx diff --git a/gameyfin/src/main/frontend/components/general/PluginManagementSection.tsx b/gameyfin/src/main/frontend/components/general/plugin/PluginManagementSection.tsx similarity index 100% rename from gameyfin/src/main/frontend/components/general/PluginManagementSection.tsx rename to gameyfin/src/main/frontend/components/general/plugin/PluginManagementSection.tsx diff --git a/gameyfin/src/main/frontend/views/LibraryManagementView.tsx b/gameyfin/src/main/frontend/views/LibraryManagementView.tsx index d2117d5..4b3aeb7 100644 --- a/gameyfin/src/main/frontend/views/LibraryManagementView.tsx +++ b/gameyfin/src/main/frontend/views/LibraryManagementView.tsx @@ -6,7 +6,8 @@ import {LibraryEndpoint} from "Frontend/generated/endpoints"; import LibraryHeader from "Frontend/components/general/covers/LibraryHeader"; import {Button, Tab, Tabs} from "@heroui/react"; import {ArrowLeft} from "@phosphor-icons/react"; -import LibraryManagementDetails from "Frontend/components/general/LibraryManagementDetails"; +import LibraryManagementDetails from "Frontend/components/general/library/LibraryManagementDetails"; +import LibraryManagementGames from "Frontend/components/general/library/LibraryManagementGames"; export default function LibraryManagementView() { @@ -38,7 +39,7 @@ export default function LibraryManagementView() { -

Games

+

Unmatched paths

diff --git a/plugins/directdownload/src/main/kotlin/de/grimsi/gameyfin/plugins/directdownload/DirectDownloadPlugin.kt b/plugins/directdownload/src/main/kotlin/de/grimsi/gameyfin/plugins/directdownload/DirectDownloadPlugin.kt index a63e471..470caef 100644 --- a/plugins/directdownload/src/main/kotlin/de/grimsi/gameyfin/plugins/directdownload/DirectDownloadPlugin.kt +++ b/plugins/directdownload/src/main/kotlin/de/grimsi/gameyfin/plugins/directdownload/DirectDownloadPlugin.kt @@ -27,8 +27,8 @@ class DirectDownloadPlugin(wrapper: PluginWrapper) : ConfigurableGameyfinPlugin( override val configMetadata: List = listOf( PluginConfigElement( key = "compressionMode", - name = "Compression mode for generated ZIP files (\"none\" = default, \"fast\", \"best\")", - description = "Higher compression uses more CPU but saves bandwidth", + name = "Compression mode (\"none\" = default, \"fast\", \"best\")", + description = "Higher compression modes are more resource intensive, but save bandwidth", ) ) diff --git a/plugins/directdownload/src/main/resources/MANIFEST.MF b/plugins/directdownload/src/main/resources/MANIFEST.MF index 252addc..12fa4fb 100644 --- a/plugins/directdownload/src/main/resources/MANIFEST.MF +++ b/plugins/directdownload/src/main/resources/MANIFEST.MF @@ -1,4 +1,4 @@ -Plugin-Version: 1.0.0-alpha3 +Plugin-Version: 1.0.0-alpha4 Plugin-Class: de.grimsi.gameyfin.plugins.directdownload.DirectDownloadPlugin Plugin-Id: de.grimsi.gameyfin.directdownload Plugin-Name: Direct Download