mirror of
https://github.com/ceratic/MediaCollectorLibary.git
synced 2026-05-13 23:56:46 +02:00
- 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
41 lines
1.2 KiB
PHP
41 lines
1.2 KiB
PHP
<?php
|
|
|
|
require_once __DIR__ . '/vendor/autoload.php';
|
|
|
|
// Load environment variables
|
|
$dotenv = Dotenv\Dotenv::createImmutable(__DIR__);
|
|
$dotenv->load();
|
|
|
|
// Load database configuration
|
|
$dbConfig = require __DIR__ . '/config/database.php';
|
|
\App\Database\Database::setConfig($dbConfig);
|
|
|
|
// Initialize database
|
|
try {
|
|
$pdo = \App\Database\Database::getInstance();
|
|
echo "✅ Database connection successful\n";
|
|
} catch (Exception $e) {
|
|
die('❌ Database connection failed: ' . $e->getMessage());
|
|
}
|
|
|
|
// Check adult videos structure
|
|
try {
|
|
$stmt = $pdo->query("SELECT id, title, poster_url, metadata FROM adult_videos LIMIT 1");
|
|
$adultVideo = $stmt->fetch(PDO::FETCH_ASSOC);
|
|
|
|
if ($adultVideo) {
|
|
echo "🔞 Sample adult video structure:\n";
|
|
echo " - ID: {$adultVideo['id']}\n";
|
|
echo " - Title: {$adultVideo['title']}\n";
|
|
echo " - poster_url: " . ($adultVideo['poster_url'] ?? 'NULL') . "\n";
|
|
echo " - metadata: " . substr($adultVideo['metadata'] ?? 'NULL', 0, 200) . "...\n";
|
|
} else {
|
|
echo "🔞 No adult videos found\n";
|
|
}
|
|
|
|
} catch (Exception $e) {
|
|
echo "❌ Error: " . $e->getMessage() . "\n";
|
|
}
|
|
|
|
echo "\n✨ Check completed!\n";
|