From 9f187891c6bf6dc332e93ef0e4465cb04197cb22 Mon Sep 17 00:00:00 2001 From: MadMakz Date: Sun, 16 Feb 2014 17:42:58 +0100 Subject: [PATCH] Updated php/twitch/twitchstatus.php --- PHP/Twitch/twitchstatus.php | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/PHP/Twitch/twitchstatus.php b/PHP/Twitch/twitchstatus.php index 207af08..8b08e50 100644 --- a/PHP/Twitch/twitchstatus.php +++ b/PHP/Twitch/twitchstatus.php @@ -42,14 +42,18 @@ if($stream["stream"] != null){ $txt = "".$stream["stream"]["channel"]["status"]."
"; $txt .= "".$account["display_name"]."

"; $txt .= "Live!

"; - $txt .= "Playing: ".$stream["stream"]["game"]."

"; + if(!empty($stream["stream"]["game"])){ + $txt .= "Playing: ".$stream["stream"]["game"]."

"; + $boxart = "http://static-cdn.jtvnw.net/ttv-boxart/".$stream["stream"]["game"].".jpg"; + }else{ + $boxart = "http://i.imgur.com/bwqCxgg.jpg"; + } $txt .= "Viewers: ".$stream["stream"]["viewers"]."

"; - $boxart = "http://static-cdn.jtvnw.net/ttv-boxart/".$stream["stream"]["game"].".jpg"; } else{ $txt = "".$account["display_name"]."

"; $txt .= "Offline.
"; - $boxart = "http://img7.imageshack.us/img7/9652/offlineeu.jpg"; + $boxart = "http://i.imgur.com/TqKeUSn.jpg"; } $txt .= "
Go to Channel";