-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathseries.php
More file actions
35 lines (31 loc) · 1.01 KB
/
series.php
File metadata and controls
35 lines (31 loc) · 1.01 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
<?php
require_once 'backend/config.php';
$parentId = $_GET['id'];
$url = $CONFIG['jellyfin_url'] . "/Users/" . $CONFIG['user_id'] . "/Items" .
"?api_key=" . $CONFIG['api_key'] .
"&ParentId=" . $parentId .
"&Recursive=true" .
"&IncludeItemTypes=Episode" .
"&SortBy=SortName";
$data = json_decode(file_get_contents($url), true);
$episodes = $data['Items'];
?>
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="style.css">
</head>
<body>
<div class="ctr-header">EPISODES</div>
<div class="ctr-list">
<?php foreach ($episodes as $ep): ?>
<a href="watch.php?id=<?= $ep['Id'] ?>" class="ctr-item">
<span class="type-tag">E</span>
S<?= $ep['ParentIndexNumber'] ?>:E<?= $ep['IndexNumber'] ?> - <?= htmlspecialchars($ep['Name']) ?>
</a>
<?php endforeach; ?>
</div>
<a href="index.php" class="ctr-btn">BACK</a>
</body>
</html>