Remove obsolete test scripts and add new API controllers for dashboard and game management

- Deleted test scripts: test_jellyfin_execution.php, test_stash.php, test_xbvr.php, test_xbvr_sync.php, vite.config.js
- Added DashboardController for fetching dashboard statistics and recent activity
- Added GameController for managing games, including fetching all games, game details, and games by category
- Introduced various check scripts to validate database structures and data integrity for adult videos, games, gender data, posters, and TV show actors
This commit is contained in:
Lars Behrends
2026-01-18 01:42:03 +01:00
parent b728b0c72d
commit eb1ec1153d
29 changed files with 2685 additions and 2454 deletions

View File

@@ -49,6 +49,8 @@ $app->group('/api', function (RouteCollectorProxy $group) use ($container) {
// Games
$group->get('/games', [$mediaController, 'listGames']);
$group->get('/games/{id:[0-9]+}', [$mediaController, 'getGame']);
$group->get('/games/grouped', [$mediaController, 'getGamesGroupedByPlatform']);
$group->get('/games/categories/{category}', [$mediaController, 'getGamesByCategory']);
// Movies
$group->get('/movies', [$mediaController, 'listMovies']);
@@ -58,10 +60,22 @@ $app->group('/api', function (RouteCollectorProxy $group) use ($container) {
$group->get('/tvshows', [$mediaController, 'listTvShows']);
$group->get('/tvshows/{id:[0-9]+}', [$mediaController, 'getTvShow']);
// Actors
$group->get('/actors', [$mediaController, 'listActors']);
$group->get('/actors/{id:[0-9]+}', [$mediaController, 'getActor']);
// Adult Content
$group->get('/adult', [$mediaController, 'listAdult']);
$group->get('/adult/{id:[0-9]+}', [$mediaController, 'getAdult']);
// Search
$group->get('/search', [$mediaController, 'search']);
})->add(new ApiAuthMiddleware($container->get(AuthService::class)));
// Dashboard
$group->get('/dashboard/stats', [$container->get(\App\Controllers\Api\DashboardController::class), 'getStats']);
$group->get('/dashboard/activity', [$container->get(\App\Controllers\Api\DashboardController::class), 'getRecentActivity']);
});
// Admin routes (require admin role)
$group->group('/admin', function (RouteCollectorProxy $group) use ($container) {

View File

@@ -18,11 +18,11 @@ $app->post('/login', AuthController::class . ':login')->setName('auth.login.post
$app->post('/logout', AuthController::class . ':logout')->setName('auth.logout');
$app->get('/logout', AuthController::class . ':logout')->setName('auth.logout');
// Public image serving (no auth required)
$app->get('/images/{path:.+}', 'App\Controllers\ImageController:serve')->setName('images.serve');
// Protected routes (require authentication)
$app->group('', function (RouteCollectorProxy $group) {
// Image serving (no auth required for public images)
$group->get('/images/{path:.+}', 'App\Controllers\ImageController:serve')->setName('images.serve');
// Global Search
$group->get('/search', 'App\Controllers\SearchController:index')->setName('search.index');
$group->get('/', 'App\Controllers\DashboardController:index')->setName('dashboard.index');