-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsabnzbd.php
executable file
·53 lines (45 loc) · 1.07 KB
/
sabnzbd.php
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
<?php
// Settings
include 'config.php';
include 'header.php';
echo "<title>Download Queue | ".$site_name."</title>";
echo "<center>";
// Feed URL
$feed = $sab_ip."/api?mode=qstatus&output=json&apikey=".$sab_api;
$sbJSON = json_decode(file_get_contents($feed));
if($sab_enabled == "1")
{
// What are you!?
echo "<h1>Download Queue</h1>";
if ($sbJSON->{mb} > "0")
{
echo "<b>Timeleft:</b> ".$sbJSON->{timeleft}."<br />";
if ($sbJSON->{paused} == "")
{
}
else
{
echo "<b>Downloads Paused:</b> ".$sbJSON->{paused}."<br />";
}
echo "<b>Queued:</b> ".$sbJSON->{mb}." MB<br />";
echo "<b>Speed:</b> ".$sbJSON->{kbpersec}." Kbps<br /><br>";
echo "<b>Jobs:</b><br>";
foreach($sbJSON->{jobs} as $job) {
// Show Details
echo "<b>Filename:</b> ".$job->{filename}."<br>";
echo "<b>Size:</b> ".$job->{mb}."<br>";
echo "<b>Size Left:</b> ".$job->{mbleft}."<br><br>";
}
}
else
{
echo "<b>Queue is Empty!</b>";
}
}
else
{
echo "<br><b>Module is disabled!</b>";
}
include 'footer.php';
echo "</center>";
?>