Commit graph

48 commits

Author SHA1 Message Date
Pat Hartl
0dc76c51b8 Replace Automapper with Mapperly 2026-07-02 18:09:14 -05:00
Pat Hartl
516465ad1a Add WebP support for media 2026-06-22 17:05:47 -05:00
Pat Hartl
c1aca1572e Add server-side tool to optimize images 2026-06-15 21:45:14 -05:00
Pat Hartl
63ac3d1361 Automatically convert APNG to video 2026-05-01 01:14:13 -05:00
Pat Hartl
3fe6bea7e5 Added "Preview" edit view, flesh out media picker
- Added sort order to media for screenshots and videos
- Added new "Preview" pane to game editor. Simulates the game details view in the launcher and allows for in-place media upload / grabbing
- Added abstractions for media grabbing
- Added subtitle to media picker dialog to indicate which services provide which assets
- Added preview for videos
- Made media searching faster overall
2026-04-24 02:05:56 -05:00
Pat Hartl
7deb435e98 Initial support for grid image, screenshots, video 2026-04-03 19:22:26 -05:00
Aaron Powell
2f9cb9a9f2 checking if the path is an absolute path or not 2025-12-19 14:46:46 +11:00
Aaron Powell
2d66c4c0b7 Some tidying up on the MediaService 2025-12-17 22:36:49 +11:00
Aaron Powell
d37623dbc0 Ensuring that the config/data directory is appended to the media path 2025-12-17 22:36:32 +11:00
Pat Hartl
cf27436a71 Fix media importing when existing entity/file doesn't exist 2025-12-03 18:31:03 -06:00
Pat Hartl
55ad5ddb96 Use DefaultAsync for default storage location 2025-11-21 13:15:57 -06:00
Pat Hartl
add770b227 Refactor Settings
Settings for the server are now combined with the settings from the SDK. This introduces a large breaking change and a migration should be created. This refactor utilizes .NET Configuration and the Options pattern. This will allow for the overriding of any setting using envionment variables. It also means that Settings.yml can be used to override any .NET configuration. A SettingsProvider implementation was created, and any updating of settings was changed from SettingsService.SaveSettings() to SettingsProvider.Update(s => { ... })
2025-11-16 12:31:25 -06:00
Pat Hartl
5cab1f3618 Remove old SettingsService, replace with Options pattern 2025-09-29 19:49:09 -05:00
Pat Hartl
aaf65fcf09 Runnable launcher using new client 2025-09-27 16:39:54 -05:00
Pat Hartl
d875377f15 Rename SDK services -> clients, implement new configuration, use dependency injection for clients 2025-09-24 20:58:23 -05:00
Pat Hartl
c477ef1877 UI to edit media thumbnail sizes 2025-09-15 19:19:52 -05:00
Pat Hartl
cd768486ec Move thumbnail sizing to settings 2025-09-10 02:35:22 -05:00
Pat Hartl
a5dab5c094 Merge branch 'main' into refactor/optional-import-export
# Conflicts:
#	LANCommander.Server.Services/GameService.cs
#	LANCommander.Server.Services/ImportService.cs
#	LANCommander.Server.Services/Importers/GameImporter.cs
#	LANCommander.Server.Services/UserService.cs
#	LANCommander.Server/UI/Components/AvatarUploader.razor
#	LANCommander.Server/UI/Components/ImportUploadDialog.razor
2025-07-25 18:42:39 -05:00
RattleSN4K3
028e3bfe0d Option to delete selected Media entries 2025-05-18 01:02:52 +02:00
RattleSN4K3
946ce1da5a Reduce media thumbnail image size by 40%, clamp new size between min and max 2025-04-24 20:52:23 +02:00
Pat Hartl
13527e8ef2 Working in game imports 2025-03-29 20:10:35 -05:00
Pat Hartl
294e08f074 Refactor upload method to WriteToFile 2025-03-29 17:58:47 -05:00
Pat Hartl
a5471aa9c2 Fix adding data with relationships 2025-02-23 08:50:16 -06:00
Pat Hartl
7de04d8597 Fix media picking error 2025-02-13 02:10:46 -06:00
Pat Hartl
b28e8a51ee Fix auditing
The way updates are being handled means that the auditing interceptor doesn't work as the entities are not showing in the change tracker at that stage as modified. Added the auditing to BaseDatabaseService instead.
2025-02-09 18:53:40 -06:00
Pat Hartl
270a3a8ff3 Expire game cache when related items are updated 2025-02-04 02:31:23 -06:00
Pat Hartl
6081edfb4f Update relationships 2025-02-02 14:58:07 -06:00
Pat Hartl
af08645396 Remove use of DatabaseServiceFactory, update service dependency injection 2025-02-01 02:21:34 -06:00
Pat Hartl
3b8edf2376 Fix game importing 2025-01-23 00:25:23 -06:00
Pat Hartl
701ad5b3e3 Fix media uploading from external sources 2025-01-21 21:37:43 -06:00
Pat Hartl
c22414fce9 Fix media editor new item 2025-01-21 20:43:59 -06:00
Pat Hartl
304f308474 WIP refactor of game importing 2025-01-12 02:54:41 -06:00
Pat Hartl
5de9eccce1 Adjust Blazor server-side to pull data with new context 2024-11-25 22:29:56 -06:00
Pat Hartl
67cef0aea6 Fix logic for saving thumbs as PNG 2024-11-15 23:22:15 -06:00
Pat Hartl
00b9ca5953 Rename service and repository methods to async 2024-11-12 18:32:46 -06:00
Pat Hartl
a4eb19ffb0 Generate thumbnail for PNG as JPEG if no transparent pixels 2024-11-07 18:55:10 -06:00
Pat Hartl
a98c2c92a2 Add route to get thumbnail 2024-11-07 18:54:46 -06:00
Pat Hartl
51a8a5cdb7 Log any exceptions for generating thumbnails 2024-11-07 02:17:08 -06:00
Pat Hartl
620c8d5d2d Check that source file for thumbnail already exists 2024-11-07 02:16:57 -06:00
Pat Hartl
40cd698510 Fix PDF thumbnail generation 2024-11-07 02:16:42 -06:00
Pat Hartl
1fc74d22dd Add background job for generating all thumbnails 2024-11-05 19:39:32 -06:00
Pat Hartl
ce105a285f Rename GetImagePath -> GetMediaPath 2024-11-05 19:38:59 -06:00
Pat Hartl
262cbacc52 Fix upload location for media 2024-11-05 19:23:29 -06:00
Pat Hartl
5fa37ef257 Generate thumbnails on upload for all media types 2024-11-05 19:22:59 -06:00
Pat Hartl
24acb5e1bd Cache service calls from database for all of entity type for 30 seconds 2024-10-30 17:44:10 -05:00
Pat Hartl
2805f34449 WIP fix for MySQL connection concurrency issues
This is a large commit. There are a number of things that this commit does to try to fix various issues that were occurring when the database provider was set to MySQL:
- The DAL `Repository` has been completely refactored to follow best practices. The repository is now being injected into services instead of the database context itself. This allows the DI to handle the repository's lifetime instead of creating a new repository for every transaction and sharing the context across repositories. As part of these changes, there is no more allowed usage of `IQueryable` and all service/repository methods must actually execute database queries before their return. This is to ensure that the context does not stay open longer than it needs to. Abusing `IQueryable`s by tossing them into Blazor components seems to be a big no-no.
- Some deletion behaviors on relationships have been tweaked as MySQL wasn't able to apply migrations with behaviors that were contradictory.
- A `ConnectionInterceptor` was added to try to keep track of `DatabaseContext` lifetimes. This is really only for debugging and should be put into `#if DEBUG` regions. This helped identify some potential issues where some contexts were basically never closing, causing the MySQL connector to not function.
- Docs for generating migrations have been updated to reflect the addition of being able to specify the database provider and connection string when adding a migration, avoiding the need to edit `Settings.yml`
- The application can now be put into a pause state on startup by adding the `--debugger` argument when used from the command line. When a debugger is attached, it resumes execution.
- The application can now log to Seq when using debug build
- Service lifetime on `DatabaseContext` has switched to transient. This may be reverted in the future.
- Lazy loading has been disabled for debugging purposes. It didn't directly help the concurrency issues, but it needs to be tested individually to be re-enabled.
- All usage of `UserManager`, `RoleManager`, and `SignInManager` have been removed from all controllers, pages, and Blazor components. Functionality has been moved to `UserService` and `RoleService`. This might have done the most amount of help, but could probably be improved upon in the future by not relying on them and instead having our own implementation.
- Application startup migrations and server autostarts have been disabled temporarily. There might be an issue of `DatabaseContext` lifetimes that spawn from this.
2024-10-13 20:42:45 -05:00
Pat Hartl
07882e39d2 Add ability to specify multiple upload folders for archives
Implements #97
2024-10-11 01:09:12 -05:00
Pat Hartl
91ee1d47a9 Move data and service layers to separate projects, update packages 2024-10-07 18:04:26 -05:00
Renamed from LANCommander.Server/Services/MediaService.cs (Browse further)