Skip to content

Commit

Permalink
Minor Changes
Browse files Browse the repository at this point in the history
  • Loading branch information
elit3ge committed Dec 21, 2015
1 parent 7de1281 commit b5e4ffb
Show file tree
Hide file tree
Showing 8 changed files with 91 additions and 89 deletions.
10 changes: 5 additions & 5 deletions downloaded.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,16 @@
include 'header.php';
echo "<h1>Recently Snatched</h1>";
echo "<br>";
echo "<table style='width:auto'>";
echo "<table style='width:705'>";

// Run through each feed item
foreach($sbJSON->{data} as $show) {

// Reformat date
$newDate = date("l, j F Y g:ia", strtotime($show->{date}));
// Reformat date
$newDate = date("l, j F Y g:ia", strtotime($show->{date}));

// Show Details
echo "<tr><td><a href='epdata.php?showid=".$show->{tvdbid}."&seasonid=".$show->{season}."&ep=".$show->{episode}."'>" . $show->{show_name} . ", S" . $show->{season} . " E" . $show->{episode} . "</a></td><td>" .$newDate . "</td></tr>";
// Show Details
echo "<tr><td><a href='epdata.php?showid=".$show->{tvdbid}."&seasonid=".$show->{season}."&ep=".$show->{episode}."'>" . $show->{show_name} . ", S" . $show->{season} . " E" . $show->{episode} . "</a></td><td>" .$newDate . "</td></tr>";
}
echo '</table>';
include 'footer.php';
Expand Down
2 changes: 1 addition & 1 deletion epdata.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
echo "<center>";

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

// trakt.tv banner intragration
Expand Down
2 changes: 1 addition & 1 deletion episode.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
echo "<center>";

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

// trakt.tv banner intragration
Expand Down
4 changes: 0 additions & 4 deletions footer.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,10 @@
echo "<div id='info'>";
echo "<small>";
echo "<a href='http://bit.ly/1jYt1q3'> Website</a> |";
//echo "<a href='https://github.com/rembo10/headphones/wiki/TroubleShooting'><i class='fa fa-ambulance'></i> Help</a>";
echo "</small>";
echo "</div>";
echo "<div id='actions'>";
echo "<small>";
//echo "<a href='shutdown'><i class='fa fa-power-off'></i> Shutdown</a> |";
//echo "<a href='restart'><i class='fa fa-power-off'></i> Restart</a> |";
echo "Copyright (C) ".date(Y)." - ".$site_name;
echo "</small>";
echo "</div>";
Expand All @@ -32,7 +29,6 @@
echo "<script src='js/libs/jquery-ui.min.js'></script>";
echo "<script src='js/common.js'></script>";
echo "<script src='js/script.js'></script>";
echo "<!-- This template is made by Elmar Kouwenhoven -->";

echo "</body>";
echo "</html>";
Expand Down
147 changes: 74 additions & 73 deletions index.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,79 +4,80 @@

if (file_exists($filename)) {

// Settings
include 'config.php';

echo "<title>Airing Soon | ".$site_name."</title>";
if ($sickbeard_enabled == "1") {

echo "<center>";
include 'header.php';

// Feed URL
$feed = $ip."/api/".$api."/?cmd=future&sort=date&type=soon";
$feed2 = $ip."/api/".$api."/?cmd=future&sort=date&type=today|missed";

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

// What are you!?
echo "<h1>Airing Soon</h1>";
echo "<br>";

// Remove Today header if no shows
if ($sbJSON2->{data}->{today} == "")
{ }
else
{
echo "<u><b>Today</b></u><br><table style='width:650'>";
}

// Run through each feed item
foreach($sbJSON2->{data}->{today} as $show2) {

// Reformat date
$newDate2 = date("l, j F Y", strtotime($show2->{airdate}));

// Show Details
echo "<tr><td><a href='seasonlist.php?showid=".$show2->{tvdbid}."'>" . $show2->{show_name} . "</a></td><td>S" . $show2->{season} . "</td><td>E" . $show2->{episode} . "</td><td>" .$newDate2 . "</td></tr>";
}
echo "</table>";

echo "<br><b><u>Later</u></b><br><table style='width:650'>";
foreach($sbJSON->{data}->{soon} as $show) {
// Only grab shows of episode 1

// Reformat date
$newDate = date("l, j F Y", strtotime($show->{airdate}));

// Show Details
echo "<tr><td><a href='seasonlist.php?showid=".$show->{tvdbid}."'>".$show->{show_name} . "</a></td><td>S" . $show->{season} . "</td><td>E" . $show->{episode} . "</td><td>" .$newDate . "</td></tr>";
}
echo "</table>";

// Remove Today header if no shows
if (!empty($sbJSON->{data}->{missed}))
{ }
else
{
echo "<br><b><u>Missed</u></b><br><table style='width:650'>";
}

// Run through each feed item
foreach($sbJSON2->{data}->{missed} as $show3) {

// Reformat date
$newDate3 = date("l, j F Y", strtotime($show3->{airdate}));

// Show Details
echo "<tr><td><a href='seasonlist.php?showid=".$show2->{tvdbid}."'>" . $show3->{show_name} . "</a></td><td>S" . $show3->{season} . "</td><td>E" . $show3->{episode} . "</td><td>" .$newDate3 . "</td></tr>";
}
echo "</table>";
echo "</center>";
include 'footer.php';

} else {echo '<br>Sickbeard is Disabled in Config. Please Enable it to see the Airing Soon items.';}
// Settings
include 'config.php';

echo "<title>Airing Soon | ".$site_name."</title>";
if ($sickbeard_enabled == "1") {

echo "<center>";
include 'header.php';

// Feed URL
$feed = $ip."/api/".$api."/?cmd=future&sort=date&type=soon";
$feed2 = $ip."/api/".$api."/?cmd=future&sort=date&type=today|missed";

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

// What are you!?
echo "<h1>Airing Soon</h1>";
echo "<br>";

// Remove Today header if no shows
if ($sbJSON2->{data}->{today} == "")
{ }
else
{
echo "<u><b>Today</b></u><br><table style='width:712'>";
}

// Run through each feed item
foreach($sbJSON2->{data}->{today} as $show2) {

// Reformat date
$newDate2 = date("l, j F Y", strtotime($show2->{airdate}));

// Show Details
echo "<tr><td width='300'><a href='seasonlist.php?showid=".$show2->{tvdbid}."'>" . $show2->{show_name} . "</a></td><td align='right' width='62'>S" . $show2->{season} . "</td><td width='40'>E" . $show2->{episode} . "</td><td align='center' width='310'>" .$newDate2 . "</td></tr>";
}
echo "</table>";

echo "<br><b><u>Later</u></b><br><table style='width:712'>";
foreach($sbJSON->{data}->{soon} as $show) {
// Only grab shows of episode 1

// Reformat date
$newDate = date("l, j F Y", strtotime($show->{airdate}));

// Show Details
echo "<tr><td width='300'><a href='seasonlist.php?showid=".$show->{tvdbid}."'>".$show->{show_name} . "</a></td><td align='right' width='62'>S" . $show->{season} . "</td><td width='40'>E" . $show->{episode} . "</td><td align='center' width='310'>" .$newDate . "</td></tr>";
}
echo "</table>";

// Remove Today header if no shows
if (!empty($sbJSON->{data}->{missed}))
{ }
else
{
echo "<br><b><u>Missed</u></b><br><table style='width:712'>";
}

// Run through each feed item
foreach($sbJSON2->{data}->{missed} as $show3) {

// Reformat date
$newDate3 = date("l, j F Y", strtotime($show3->{airdate}));

// Show Details
echo "<tr><td width='300'><a href='seasonlist.php?showid=".$show3->{tvdbid}."'>" . $show3->{show_name} . "</a></td><td align='right' width='62'>S" . $show3->{season} . "</td><td width='40'>E" . $show3->{episode} . "</td><td align='center' width='310'>" .$newDate3 . "</td></tr>";
}
echo "</table>";
echo "</center>";
include 'footer.php';

} else
{ echo '<br>Sickbeard is Disabled in Config. Please Enable it to see the Airing Soon items.'; }

} else {
echo "Config file is missing.";
Expand Down
4 changes: 2 additions & 2 deletions plex-ondeck.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@
foreach($achxml->Video AS $child) {
//echo "<a href='plex-shows-season.php?key=".$child['ratingKey']."'>".$child['title']."</a><br>";
echo '<tr>';
echo '<td valign="middle">';
echo '<td align="center">';
echo printf("<img height='350' src=".$plex_ip.$child['art']."");
echo '</td>';
echo '<td valign="middle">';
echo '<td align="center">';
echo $child['grandparentTitle'];
echo ' - ';
echo $child['title'];
Expand Down
9 changes: 7 additions & 2 deletions season.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
include 'header.php';
echo "<h1>New Season Start Dates</h1>";
echo "<br>";
echo "<table style='width:650'>";
echo "<table style='width:705'>";

// Run through each feed item
foreach($sbJSON->{data}->{later} as $show) {
Expand All @@ -23,9 +23,14 @@

// Reformat date
$newDate = date("l, j F Y", strtotime($show->{airdate}));

// Work out days until
$now = time(); // or your date as well
$your_date = strtotime($newDate);
$datediff = $your_date - $now;

// Show Details
echo "<tr><td><a href='episode.php?showid=".$show->{tvdbid}."&seasonid=".$show->{season}."'>".$show->{show_name} . ", Season " . $show->{season} . "</a></td><td>" .$newDate . "</td></tr>";
echo "<tr><td width='380'><a href='episode.php?showid=".$show->{tvdbid}."&seasonid=".$show->{season}."'>".$show->{show_name} . ", Season " . $show->{season} . "</a></td><td width='245'>" .$newDate . "</td><td width='80'>".floor($datediff/(60*60*24))." days</tr>";
}
}
echo "</table>";
Expand Down
2 changes: 1 addition & 1 deletion seasonlist.php
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@
$next_ep = $tvdata->{data}->{next_ep_airdate};
}
// Show Details
echo "<b>Network:</b> ".$tvdata->{data}->{network}.", <b>Airs:</b> ".$tvdata->{data}->{airs}.", <b>Next Ep:</b> ".$next_ep.", <b>Show Status:</b> ".$tvdata->{data}->{status}."<br><br>";
echo "<b>Network:</b> ".$tvdata->{data}->{network}."<br> <b>Airs:</b> ".$tvdata->{data}->{airs}."<br> <b>Next Ep:</b> ".$next_ep."<br> <b>Show Status:</b> ".$tvdata->{data}->{status}."<br><br>";
}

// Run through each feed item
Expand Down

0 comments on commit b5e4ffb

Please sign in to comment.