diff options
author | RaindropsSys <raindrops@equestria.dev> | 2023-10-31 17:04:34 +0100 |
---|---|---|
committer | RaindropsSys <raindrops@equestria.dev> | 2023-10-31 17:04:34 +0100 |
commit | e61e581a2b66b0444db01d884465ea913929e343 (patch) | |
tree | b49eaedb3681c4b26637acdd375cda4c3d37b07c /albumart.php | |
parent | 41c51b8bdb9c8e9fa4a7d56f260d594739d4107e (diff) | |
download | mist-e61e581a2b66b0444db01d884465ea913929e343.tar.gz mist-e61e581a2b66b0444db01d884465ea913929e343.tar.bz2 mist-e61e581a2b66b0444db01d884465ea913929e343.zip |
Updated 27 files, added 12 files and deleted 3 files (automated)
Diffstat (limited to 'albumart.php')
-rw-r--r-- | albumart.php | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/albumart.php b/albumart.php index c2551fd..0a7e445 100644 --- a/albumart.php +++ b/albumart.php @@ -1,11 +1,13 @@ <?php $songs = json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/assets/content/songs.json"), true); +$albums = json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/assets/content/albums.json"), true); -if (!isset($_GET["i"]) || !isset($songs[$_GET["i"]])) { +if (!isset($_GET["i"]) || (!isset($songs[$_GET["i"]]) && !isset($albums[$_GET["i"]]))) { die(); } +header("Cache-Control: public, max-age=604800, immutable"); header("Content-Type: image/jpeg"); header("Content-Length: " . filesize($_SERVER['DOCUMENT_ROOT'] . "/assets/content/" . $_GET["i"] . ".jpg")); readfile($_SERVER['DOCUMENT_ROOT'] . "/assets/content/" . $_GET["i"] . ".jpg");
\ No newline at end of file |