From 59b56c2283c12c8a82144a836faee4f12b15e5c1 Mon Sep 17 00:00:00 2001 From: RaindropsSys Date: Thu, 27 Apr 2023 13:32:25 +0200 Subject: Updated 5 files and deleted 2 files (automated) --- pages/api/plex-thumb.php | 11 ------ pages/api/plex.php | 88 ------------------------------------------------ pages/jobs.inc | 11 ++++++ 3 files changed, 11 insertions(+), 99 deletions(-) delete mode 100644 pages/api/plex-thumb.php delete mode 100644 pages/api/plex.php (limited to 'pages') diff --git a/pages/api/plex-thumb.php b/pages/api/plex-thumb.php deleted file mode 100644 index 4009871..0000000 --- a/pages/api/plex-thumb.php +++ /dev/null @@ -1,11 +0,0 @@ - "Plex", - "avatar_url" => "https://support.plex.tv/wp-content/themes/plex/assets/img/favicons/plex-192.png", - "embeds" => [ - [ - "title" => formatTitle($payload["Metadata"]), - "type" => "rich", - "description" => formatSubtitle($payload["Metadata"]), - "color" => hexdec( "2b2d31" ), - "thumbnail" => [ - "url" => "https://ponies.equestria.horse/assets/cache/" . $id . ".jpg" - ], - "footer" => [ - "text" => $payload["Account"]["title"] . " ยท Playing from " . $payload["Player"]["title"], - "icon_url" => $payload["Account"]["thumb"] - ] - ] - ] - - ], JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE ); -} - -if (isset($hookObject)) { - $ch = curl_init(); - - curl_setopt_array( $ch, [ - CURLOPT_URL => $app["webhook"]["plex"], - CURLOPT_POST => true, - CURLOPT_POSTFIELDS => $hookObject, - CURLOPT_HTTPHEADER => [ - "Content-Type: application/json" - ] - ]); - - $response = curl_exec( $ch ); - curl_close( $ch ); -} \ No newline at end of file diff --git a/pages/jobs.inc b/pages/jobs.inc index 6723175..c00e35c 100644 --- a/pages/jobs.inc +++ b/pages/jobs.inc @@ -4,6 +4,7 @@ require_once $_SERVER['DOCUMENT_ROOT'] . "/includes/init.inc"; global $title; gl require_once $_SERVER['DOCUMENT_ROOT'] . '/includes/util/functions.inc'; $history = json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/data/history.json"), true); +$running = json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/data/running.json"), true); if (isset($_GET["enqueue"]) && isset($history[(int)$_GET["enqueue"]])) { createJob(explode("(", $history[(int)$_GET["enqueue"]]["name"])[0], $history[(int)$_GET["enqueue"]]["options"]); @@ -73,6 +74,16 @@ require_once $_SERVER['DOCUMENT_ROOT'] . '/includes/components/header.inc';
+ $file): $item = json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/data/jobs/" . $file), true); ?> +
+
( $value): echo($name . "=" . json_encode($value)); endforeach; ?>)
+
+
RunningPending
+
+ + $item): ?>
-- cgit