1, 'name' => 'jellyfin', 'api_url' => 'http://192.168.1.102:8096', // Adjust this to your Jellyfin URL 'api_key' => '1db2d28854e541dd90c32ea6aab5e603' // Adjust this to your API key ]; echo "Testing with source: " . $testSource['name'] . "\n"; echo "API URL: " . $testSource['api_url'] . "\n"; // Create Jellyfin service instance $pdo = \App\Database\Database::getInstance(); $jellyfinService = new \App\Services\JellyfinSyncService($pdo, $testSource); // Test basic sync execution echo "\nTesting basic sync execution...\n"; try { // This will trigger the executeSync method which calls all the private methods echo "Attempting to run sync (this may fail if Jellyfin server is not accessible)...\n"; $jellyfinService->startSync('full'); echo "✓ Sync completed successfully\n"; } catch (Exception $e) { echo "✗ Sync failed (expected if Jellyfin server not accessible): " . $e->getMessage() . "\n"; echo "This is normal if your Jellyfin server is not running or credentials are incorrect.\n"; } echo "\n=== Test Complete ===\n"; } catch (Exception $e) { echo "Error: " . $e->getMessage() . "\n"; echo "Stack trace:\n" . $e->getTraceAsString() . "\n"; }