Operating System: Linux
SinusBot Version: 0.9.21-87a90ce
TS3 Version: 3.0.19.4
Problem Description
I'm using the API to output the artist of a song to my webpage, however, it does not work anymore. It works with streams from the radio menu, though. Seems like it may be a bug. Below is the code I'm using to get the artist's name:
I'm looking into it on my side to see if there is a typo or deprecation in my code, but there does not appear to be.
All assistance is greatly appreciated!
SinusBot Version: 0.9.21-87a90ce
TS3 Version: 3.0.19.4
Problem Description
I'm using the API to output the artist of a song to my webpage, however, it does not work anymore. It works with streams from the radio menu, though. Seems like it may be a bug. Below is the code I'm using to get the artist's name:
I'm looking into it on my side to see if there is a typo or deprecation in my code, but there does not appear to be.
All assistance is greatly appreciated!
Code:
<?php
error_reporting('E_ERROR');
include("sinusbot.class.php");
include("config.php");
$sinusbot = new SinusBot($ipport);
$sinusbot->login($user, $passwd);
$status = $sinusbot->getStatus($inst);
$track = (($status["currentTrack"]["type"] == "url") ? $status["currentTrack"]["tempTitle"] : $status["currentTrack"]["title"]);
$artist = $status["currentTrack"]["tempArtist"];
$name = $track;
$track = preg_replace('^ ^', '+', $track);
if(!empty($artist)) {
echo $name."<br /><div id='artist'>".$artist."</div>";
} else {
echo $name."<br /> ";
}