Centova Technologies Forum

Centova Cast v3 => General discussion => Topic started by: E.S.H on March 27, 2013, 10:26:14 am

Title: Auto DJ Threw API
Post by: E.S.H on March 27, 2013, 10:26:14 am
 hi guys 

hoping some one can help me fix this issue as im a bit stumped.

in v2 i was using the basic api files that you could download to control the auto dj ,

linked in this kb -> https://secure.centova.com/pages/faqs/display/stopping_starting_the_autodj_102

since moving to v3 i cant get it to work , nor can i find a basic  file like they provided in v2 ( above link )

using the v2 version it shows everything as ' offline '  so theres no option to stop as it automatically wants you to start it.

is there a way of editing/updating the v2 files or does some one have a working code for v3 that allows people to log in and  disable / enable the auto dj.  i tried to read threw all the kb about api but got lost so thought one of you guys might still use this function instead of the new inbuilt function.

although i know that there is a feature in cent for this im finding that its not working past the 1st few accounts created and tends to ban people attempting to log in to adjust the source, which makes that feature a bit useless

Cheers ESH
Title: Re: Auto DJ Threw API
Post by: djduck on March 27, 2013, 01:59:06 pm
Looks like the API has changed ..

V2 API response array(2) {

v3 API response
array(1) { ["status"]=> array(18) { ["mount"]=> string(7) "/stream" ["listenercount"]=> string(1) "0" ["genre"]=> string(11) "Unspecified" ["url"]=> string(26) "http://shellshockradio.com" ["title"]=> string(25) "[/::Shell Shock Radio::\]" ["currentsong"]=> string(16) "Seether - Remedy" ["bitrate"]=> string(3) "256" ["sourceconnected"]=> string(1) "1" ["serverstate"]=> string(1) "1" ["appstate"]=> array(1) { ["icescc"]=> string(1) "1" } ["sourcestate"]=> string(1) "1" ["reseller"]=> string(0) "" ["useserver"]=> string(1) "1" ["ipaddress"]=> string(14) "216.172.106.76" ["port"]=> string(4) "8000" ["proxy"]=> string(1) "0" ["servertype"]=> string(9) "ShoutCast" ["sourcetype"]=> string(6) "icescc" } }
Title: Re: Auto DJ Threw API
Post by: djduck on March 27, 2013, 02:01:27 pm
You need to update class_HTTPRetriever.php and ccapiclient.php
Title: Re: Auto DJ Threw API
Post by: djduck on March 27, 2013, 02:45:02 pm
Also use this page('index',$server->data['status']['serverstate'],$server->data['status']['sourcestate']);
as the "index" page.

This should fix the issue with the autodj .. It works for me you can find  class_HTTPRetriever.php and ccapiclient.php in /usr/local/centovacast/extra/billing/ihost/centovacast/ Let me know if this works for you.
Title: Re: Auto DJ Threw API
Post by: E.S.H on March 27, 2013, 03:14:36 pm
cheers for the responce duck

i tried having a look in the location you provided  /usr/local/centovacast/extra/billing/ihost/centovacast/

but i cant see those 2 files i only see   class_APIClient + class_BackendCentovaCast

so im unable to even try as i cant update those files, could you possibly link me to them already updated  so i can then upload then , i did a system search for those files and it only comes back with

/usr/local/centovacast/system/class_HTTPRetriever.php
/usr/local/centovacast/web/class_HTTPRetriever.php

&

ccapiclient.php   didnt show up except the old version thats on my web site.
Title: Re: Auto DJ Threw API
Post by: djduck on March 27, 2013, 03:27:40 pm
Files at http://stream.shellservers.net/FILES.tar
Title: Re: Auto DJ Threw API
Post by: E.S.H on March 27, 2013, 08:26:59 pm
+1 for you duck that did the trick and is now working a treat and displays the streams online and allows all functions to work  :)

very greatful and many thanks , 

Title: Re: Auto DJ Threw API
Post by: djduck on March 27, 2013, 09:21:38 pm
Glad I could help :)