OpenMediaCenter/api/SSettings.php
Lukas Heiligenbrunner b9b9ac0bc2 new class Ssettings to get videopath from db
add test - failing
remove useless videopath and tvpath from app.js
2020-07-15 20:08:22 +02:00

22 lines
429 B
PHP

<?php
class SSettings
{
private $database;
/**
* SSettings constructor.
*/
public function __construct() {
$this->database = Database::getInstance();
}
public function getVideoPath() {
$query = "SELECT video_path from settings";
$result = $this->database->getConnection()->query($query);
$r = mysqli_fetch_assoc($result);
return $r['video_path'];
}
}