add option to enable disable the tmdb support
This commit is contained in:
@ -1,7 +1,9 @@
|
||||
<?php
|
||||
require 'Database.php';
|
||||
require 'SSettings.php';
|
||||
|
||||
$conn = Database::getInstance()->getConnection();
|
||||
$settings = new SSettings();
|
||||
|
||||
if (isset($_POST['action'])) {
|
||||
$action = $_POST['action'];
|
||||
@ -15,11 +17,10 @@ if (isset($_POST['action'])) {
|
||||
}
|
||||
|
||||
$r = mysqli_fetch_assoc($result);
|
||||
if ($r['password'] != "-1") {
|
||||
$r['passwordEnabled'] = true;
|
||||
} else {
|
||||
$r['passwordEnabled'] = false;
|
||||
}
|
||||
// booleans need to be set manually
|
||||
$r['passwordEnabled'] = $r['password'] != "-1";
|
||||
$r['TMDB_grabbing'] = ($r['TMDB_grabbing'] != '0');
|
||||
|
||||
echo json_encode($r);
|
||||
break;
|
||||
case "saveGeneralSettings":
|
||||
@ -27,12 +28,14 @@ if (isset($_POST['action'])) {
|
||||
$password = $_POST['password'];
|
||||
$videopath = $_POST['videopath'];
|
||||
$tvshowpath = $_POST['tvshowpath'];
|
||||
$tmdbsupport = $_POST['tmdbsupport'];
|
||||
|
||||
$query = "UPDATE settings SET
|
||||
video_path='$videopath',
|
||||
episode_path='$tvshowpath',
|
||||
password='$password',
|
||||
mediacenter_name='$mediacentername'
|
||||
mediacenter_name='$mediacentername',
|
||||
TMDB_grabbing=$tmdbsupport
|
||||
WHERE 1";
|
||||
|
||||
if ($conn->query($query) === true) {
|
||||
|
Reference in New Issue
Block a user