From 757b7e63d24177070fc2d3b221dd6386beb94c60 Mon Sep 17 00:00:00 2001 From: Simon <9295182+grimsi@users.noreply.github.com> Date: Sun, 5 Feb 2023 01:25:11 +0100 Subject: [PATCH] Release 1.3.2 (#74) * Fixes #71 * [GH-61] Fix manual mapping leading to duplicates in DB * [GH-73] Fix Gameyfin only detecting PC games * Improve game title matching (#77) * Implement some filename suffix logic Removes some common file suffixes from files downloaded from for example itch.io. Also removes trailing/leading whitespace/-/_/./() and version numbers starting with a "v" like "v1.2.3". * Add edge cases for game titles (#76) * Fix SONAR code smells Co-authored-by: tr7zw Co-authored-by: Pfuenzle * Validate some combinations of filename with added suffixes (#79) Also fixes a bug of not removing trailing empty []. * Improve test coverage (#70) * Implemented missing testcases for IgdbWrapper Refactored getPlatformBySlug to return Optional<> * Fixed SONAR findings * Implemented integration tests for the DB * Started implementing tests for controller * Finished GamesControllerTest * Added ImageControllerTest * Implemented LibraryControllerTest * Add LibraryManagementControllerTest * Updated some dependencies * Add DownloadServiceTest * Introduced "gameyfin.data" property to specify a folder for both cache and DB. De-facto removed "gameyfin.db" and "gameyfin.cache" properties Refactored file-system code to be cleaner and easier to test * Refactored filesystem code Implemented FilesystemServiceTest * Fix SONAR code smells * Implemented GameServiceTest * Implemented ImageServiceTest * Fix website scroll position when clicking on game covers in the library view (#94) Fixes #81 * Expansion panels are now not collapsing when last active filter is de-selected (#95) Fixes #86 --------- Co-authored-by: tr7zw Co-authored-by: Pfuenzle --- .run/Angular Application.run.xml | 5 + .run/Angular CLI Server.run.xml | 12 + backend/pom.xml | 5 +- .../config/FileSystemProviderConfig.java | 23 ++ .../gameyfin/config/FilesystemConfig.java | 99 ++---- .../gameyfin/config/GameyfinFolderConfig.java | 99 ++++++ .../gameyfin/dto/LibraryScanRequestDto.java | 4 + .../gameyfin/entities/DetectedGame.java | 5 +- .../de/grimsi/gameyfin/igdb/IgdbWrapper.java | 82 +++-- .../repositories/DetectedGameRepository.java | 7 +- .../grimsi/gameyfin/rest/GamesController.java | 9 +- .../grimsi/gameyfin/rest/ImageController.java | 2 +- .../gameyfin/service/DownloadService.java | 10 +- .../gameyfin/service/FilesystemService.java | 45 ++- .../grimsi/gameyfin/service/GameService.java | 39 +-- .../grimsi/gameyfin/service/ImageService.java | 13 +- .../gameyfin/service/LibraryService.java | 23 +- .../de/grimsi/gameyfin/util/FilenameUtil.java | 35 ++ .../src/main/resources/config/gameyfin.yml | 7 +- backend/src/main/resources/config/secure.yml | 5 +- .../grimsi/gameyfin/igdb/IgdbWrapperTest.java | 63 ++++ .../gameyfin/mapper/CompanyMapperTest.java | 16 - .../gameyfin/mapper/GenreMapperTest.java | 2 - .../gameyfin/mapper/RandomMapperTest.java | 2 +- .../DetectedGameRepositoryTest.java | 114 +++++++ .../repositories/LibraryRepositoryTest.java | 48 +++ .../UnmappableFileRepositoryTest.java | 87 +++++ .../gameyfin/rest/GamesControllerTest.java | 159 +++++++++ .../gameyfin/rest/ImageControllerTest.java | 42 +++ .../gameyfin/rest/LibraryControllerTest.java | 180 ++++++++++ .../rest/LibraryManagementControllerTest.java | 141 ++++++++ .../gameyfin/service/DownloadServiceTest.java | 86 +++++ .../service/FilesystemServiceTest.java | 253 ++++++++++++++ .../gameyfin/service/GameServiceTest.java | 317 ++++++++++++++++++ .../gameyfin/service/ImageServiceTest.java | 86 +++++ .../gameyfin/util/FilenameUtilTest.java | 84 ++++- .../src/test/resources/application-test.yml | 6 +- .../org.mockito.plugins.MockMaker | 1 + frontend/package-lock.json | 4 +- frontend/package.json | 2 +- frontend/src/app/app-routing.module.ts | 2 +- .../library-overview.component.html | 11 +- .../library-overview.component.ts | 19 +- pom.xml | 2 +- 44 files changed, 2024 insertions(+), 232 deletions(-) create mode 100644 .run/Angular Application.run.xml create mode 100644 .run/Angular CLI Server.run.xml create mode 100644 backend/src/main/java/de/grimsi/gameyfin/config/FileSystemProviderConfig.java create mode 100644 backend/src/main/java/de/grimsi/gameyfin/config/GameyfinFolderConfig.java create mode 100644 backend/src/test/java/de/grimsi/gameyfin/repositories/DetectedGameRepositoryTest.java create mode 100644 backend/src/test/java/de/grimsi/gameyfin/repositories/LibraryRepositoryTest.java create mode 100644 backend/src/test/java/de/grimsi/gameyfin/repositories/UnmappableFileRepositoryTest.java create mode 100644 backend/src/test/java/de/grimsi/gameyfin/rest/GamesControllerTest.java create mode 100644 backend/src/test/java/de/grimsi/gameyfin/rest/ImageControllerTest.java create mode 100644 backend/src/test/java/de/grimsi/gameyfin/rest/LibraryControllerTest.java create mode 100644 backend/src/test/java/de/grimsi/gameyfin/rest/LibraryManagementControllerTest.java create mode 100644 backend/src/test/java/de/grimsi/gameyfin/service/DownloadServiceTest.java create mode 100644 backend/src/test/java/de/grimsi/gameyfin/service/FilesystemServiceTest.java create mode 100644 backend/src/test/java/de/grimsi/gameyfin/service/GameServiceTest.java create mode 100644 backend/src/test/java/de/grimsi/gameyfin/service/ImageServiceTest.java create mode 100644 backend/src/test/resources/mockito-extensions/org.mockito.plugins.MockMaker diff --git a/.run/Angular Application.run.xml b/.run/Angular Application.run.xml new file mode 100644 index 0000000..4346cac --- /dev/null +++ b/.run/Angular Application.run.xml @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/.run/Angular CLI Server.run.xml b/.run/Angular CLI Server.run.xml new file mode 100644 index 0000000..60749b4 --- /dev/null +++ b/.run/Angular CLI Server.run.xml @@ -0,0 +1,12 @@ + + + + + +