Skip to content

Commit

Permalink
Merge pull request #3 from elit3ge/dev
Browse files Browse the repository at this point in the history
Merge
  • Loading branch information
elit3ge committed May 8, 2016
2 parents 4c779d2 + 2f59cfc commit b541f88
Show file tree
Hide file tree
Showing 9 changed files with 82 additions and 17 deletions.
8 changes: 7 additions & 1 deletion config.php.sample
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,11 @@ $site_name = "Site Name";

//Apps

// sickbeard settings
// sickbeard/sickrage settings
$sickbeard_enabled = "1";
$ip = "website or ip:8081"; //must include http or https
$api = "1234";
$sick_grab_limit = "50"; //Limits the amount of recently snatched items.

// sonarr settings
$sonarr_enabled = "0"; //Change the value from 0 to 1 to enable sonarr
Expand All @@ -26,6 +27,11 @@ $headphones_enabled = "0";
$headphones_ip = "website or ip:8181"; //must include http or https
$headphones_api = "123";

// couchpotato settings -- Optional
$couchpotato_enabled = "0";
$couchpotato_ip = "external website or ip:5050"; //must include http or https
$couchpotato_api = "123";

// Downloaders

// sabnzbd settings -- Optional
Expand Down
39 changes: 39 additions & 0 deletions couchpotato.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
<center>
<?php

include 'config.php';

// Set Title
echo "<title>Couchpotato | ".$site_name."</title>";

include 'header.php';

$feed = $couchpotato_ip."/api/".$couchpotato_api."/movie.list";


$sbJSON = json_decode(file_get_contents($feed),true);

echo "<h1>CouchPotato</h1>";
echo "<br>";
echo '<table>';

foreach ($sbJSON['movies'] as $key => $values)

{
echo '<tr>';
echo '<td>';
//echo $values['title'];
//echo '<a href="seasonlist.php?showid=' . $key->{titles}->{imdb} . '">' . $values['title'] . '</a>';
echo '<a href="#">' . $values['title'] . '</a>';
echo '</td>';
echo '<td>';
echo $values['status'];
echo '</td>';
echo '</tr>';

}

echo '</table>';
include 'footer.php';
?>
</center>
5 changes: 2 additions & 3 deletions downloaded.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,8 @@
include 'config.php';
echo "<title>Recently Snatched | ".$site_name."</title>";

// Check if username is available, set URL
// This probably isn't necessary
$feed = $ip."/api/".$api."?cmd=history&type=snatched&limit=25";
// Set URL
$feed = $ip."/api/".$api."?cmd=history&type=snatched&limit=".$sick_grab_limit;

$sbJSON = json_decode(file_get_contents($feed));

Expand Down
7 changes: 4 additions & 3 deletions epdata.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@
echo "<center>";

// What are you!?
echo "<h1>".$title." - Season ".$seasonid." - Episode ".$epid."</h1>";
echo "<a href='episode.php?showid=".$showid."&seasonid=".$seasonid."'>Back</a><br><br>";
echo "<h1>".$title." - Season ".$seasonid." - Episode ".$epid."</h1><br>";
echo "<button><a href='episode.php?showid=".$showid."&seasonid=".$seasonid."'>Back</a></button><br><br>";

// trakt.tv banner intragration
if ($trakt_enabled == "1")
Expand Down Expand Up @@ -63,7 +63,8 @@
echo "<b>Description:</b> " . $sbJSON->{data}->{description} . "<br><br>";
echo "<b>Size:</b> " . $sbJSON->{data}->{file_size_human} . "<br />";
echo "<b>Aired:</b> " . $sbJSON->{data}->{airdate} . "<br />";
echo "<b>Quality:</b> " . $sbJSON->{data}->{quality} . "<br />";
echo "<b>Quality:</b> " . $sbJSON->{data}->{quality} . " - Size: " . round($sbJSON->{data}->{file_size}/1024/1024,2) . " MB<br />";

if ($sbJSON->{data}->{status} == "Archived")
{
echo "<b>Status:</b><font color='#41A317'> Archived </font><br /><br />";
Expand Down
8 changes: 4 additions & 4 deletions episode.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@
echo "<center>";

// What are you!?
echo "<h1>".$title." - Season ".$seasonid."</h1>";
echo "<a href='seasonlist.php?showid=".$showid."'>Back</a><br><br>";
echo "<h1>".$title." - Season ".$seasonid."</h1><br>";
echo "<button><a href='seasonlist.php?showid=".$showid."'>Back</a></button><br><br>";

// trakt.tv banner intragration
if ($trakt_enabled == "1")
Expand All @@ -54,10 +54,10 @@
foreach($sbJSON->{data} as $show) {

// Show Details
echo "<a href='epdata.php?showid=".$showid."&seasonid=".$seasonid."&ep=".$counter."'><b>Episode:</b> " . $counter . "</a><br />";
echo "<button><a href='epdata.php?showid=".$showid."&seasonid=".$seasonid."&ep=".$counter."'><b>Episode:</b> " . $counter . "</a></button><br />";
echo "<b>Name:</b> " . $show->{name} . "<br />";
echo "<b>Aired:</b> " . $show->{airdate} . "<br />";
echo "<b>Quality:</b> " . $show->{quality} . "<br />";
echo "<b>Quality:</b> " . $show->{quality} . " - Size: " . round($show->{file_size}/1024/1024,2) . " MB<br />";
if ($show->{status} == "Archived")
{
echo "<b>Status:</b><font color='#41A317'> Archived </font><br /><br />";
Expand Down
3 changes: 3 additions & 0 deletions header.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
echo "<link rel='stylesheet' href='css/style.css'>";
echo "<link rel='stylesheet' href='css/font-awesome.min.css'>";
echo "<script src='js/libs/modernizr-2.8.3.min.js'></script>";
echo "<!-- Theme borrowed from the HeadPhones project -->";
echo "</head>";
echo "<body>";
echo "<div id='container'>";
Expand All @@ -34,6 +35,8 @@
echo "<li><a href='plex-ondeck.php'>Plex</a></li>"; } else {}
if ($headphones_enabled == "1") {
echo "<li><a href='headphones.php'>Headphones</a></li>"; } else {}
if ($couchpotato_enabled == "1") {
echo "<li><a href='couchpotato.php'>Couchpotato</a></li>"; } else {}
echo "</ul>";
echo "</div>";
echo "</header>";
Expand Down
8 changes: 4 additions & 4 deletions seasonlist.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@
echo "<center>";

// What are you!?
echo "<h1>".$title." Seasons List</h1>";
echo "<a href='shows.php'>Back</a><br><br>";
echo "<h1>".$title." Seasons List</h1><br>";
echo "<button><a href='shows.php'>Back</a></button><br><br>";

// trakt.tv banner intragration
if ($trakt_enabled == "1")
Expand Down Expand Up @@ -85,11 +85,11 @@
// Show Details
if ($show == '0')
{
echo "<a href='episode.php?showid=".$showid."&seasonid=".$show."'>Specials</a> -<br />";
echo "<button><a href='episode.php?showid=".$showid."&seasonid=".$show."'>Specials</a></button> -<br />";
}
else
{
echo "<a href='episode.php?showid=".$showid."&seasonid=".$show."'>Season ".$show."</a> - ";
echo "<button><a href='episode.php?showid=".$showid."&seasonid=".$show."'>Season ".$show."</a></button> ";
}
}
include 'footer.php';
Expand Down
19 changes: 18 additions & 1 deletion shows.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
<?php

include 'config.php';

// Set Title
echo "<title>TV Shows | ".$site_name."</title>";

include 'header.php';
Expand All @@ -14,12 +16,27 @@

echo "<h1>Shows</h1>";
echo "<br>";
echo '<table>';

foreach ($sbJSON['data'] as $key => $values)
{
echo '<a href="seasonlist.php?showid=' . $values['tvdbid'] . '">' . $key . '</a><br />';
echo '<tr>';
echo '<td>';
echo '<a href="seasonlist.php?showid=' . $values['tvdbid'] . '">';
printf("<img width='300' src=".$ip."/api/".$api."/?cmd=show.getbanner&tvdbid=".$values['tvdbid'].">");
echo '</a>';
echo '</td>';
echo '<td align="center" style="vertical-align:middle">';
echo '<a href="seasonlist.php?showid=' . $values['tvdbid'] . '">' . $key . '</a>';
echo '</td>';
echo '<td style="vertical-align:middle">';
echo $values['status'];
echo '</td>';
echo '</tr>';

}

echo '</table>';
echo "<br>Eps Downloaded: ".$stats->{data}->{ep_downloaded}." of ".$stats->{data}->{ep_total}." == Shows Active: ".$stats->{data}->{shows_active}." of ".$stats->{data}->{shows_total};
include 'footer.php';
?>
Expand Down
2 changes: 1 addition & 1 deletion version.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?php

$version ="v15.12.21";
$version ="v16.04.29";

?>

0 comments on commit b541f88

Please sign in to comment.