Go Back   Winamp & SHOUTcast Forums > SHOUTcast > SHOUTcast Discussions

Reply
Thread Tools Search this Thread Display Modes
Old 27th August 2017, 18:39   #481
dopelabs
Major Dude
 
dopelabs's Avatar
 
Join Date: Oct 2006
Location: Silicon Valley
Posts: 519
Send a message via AIM to dopelabs
so right now the script takes advantage of twitters ability to deny a new tweet if its identical to the last. if you were to include the listener count, you would potentially have a new tweet every time you call the script, since the listener count could be different, thus in turn the tweet would be different from the last because of the listener count.

for those who have the script setup to be called via a cron job or having the page auto refresh in the browser, that could be as often as once a minute, or how often the refresh timeout is set within the script.

if however you have things setup so that your calling the script when the track changes things would be a bit easier.

i currently have a script called 'metapush' which checks the playlist history file thats generated by the source software. it checks once a minute. if theres a new entry at the end of the list, i have it call the twittercast script, send the title updates out to all my streaming servers, update the titles that get displayed on the website, in the mobile apps, within the video stream, etc.

i have re-added the auto refresh into the code on github.
dopelabs is offline   Reply With Quote
Old 27th August 2017, 19:09   #482
dopelabs
Major Dude
 
dopelabs's Avatar
 
Join Date: Oct 2006
Location: Silicon Valley
Posts: 519
Send a message via AIM to dopelabs
i have also re-added support for multiple servers, and displaying the listener count as an option.
dopelabs is offline   Reply With Quote
Old 27th August 2017, 19:12   #483
Busby
Senior Member
 
Busby's Avatar
 
Join Date: Apr 2004
Location: Isle of Man UK
Posts: 128
The script I use at present runs on a 1 minute cron and shows the listener numbers, but changes in the listener total doesn't trigger a repost of the tweet.

The script is called when the track changes as the listener numbers are generated by the Twittercast [Shoutcast] script and not the stream title.

Hope that helps.

Would you like me to pm you the scripts I'm using now..

I'll get there in the end...
www.1mix.co.uk
Busby is offline   Reply With Quote
Old 27th August 2017, 20:12   #484
dopelabs
Major Dude
 
dopelabs's Avatar
 
Join Date: Oct 2006
Location: Silicon Valley
Posts: 519
Send a message via AIM to dopelabs
alright i have modified the script so that it will only send a status update if the track is different from the last time it checked using a static text file.
dopelabs is offline   Reply With Quote
Old 28th August 2017, 00:48   #485
Busby
Senior Member
 
Busby's Avatar
 
Join Date: Apr 2004
Location: Isle of Man UK
Posts: 128
We are nearly there..

It's posting to Twitter, but it's not showing the title or the correct listener count.

Can you please confirm I have the correct format for Shoutcast 1 server:

$ip[0] = "fr1.1mix.co.uk";
$port[0] = "8000";
$sid[0] = "1";

Also it's not generating the title.txt file and I have this set as /TwittercastNew/title.txt where the path from the root is public_html/TwittercastNew/title.txt

Many thanks again for your help.

I'll get there in the end...
www.1mix.co.uk
Busby is offline   Reply With Quote
Old 28th August 2017, 17:36   #486
dopelabs
Major Dude
 
dopelabs's Avatar
 
Join Date: Oct 2006
Location: Silicon Valley
Posts: 519
Send a message via AIM to dopelabs
format is correct.

make sure you have set permissions 777 on the title.txt file
dopelabs is offline   Reply With Quote
Old 28th August 2017, 17:39   #487
dopelabs
Major Dude
 
dopelabs's Avatar
 
Join Date: Oct 2006
Location: Silicon Valley
Posts: 519
Send a message via AIM to dopelabs
for the path specify the full path

/home/username/public_html/TwittercastNew/title.txt

or the path relative to the script... if the title.txt file and shoutcast.php are in the same directory. just specify 'title.txt' in the path config option


also if you want, while testing,

// comment out the line that posts to twitter

so you can check the output without having it post every time, once your satisfied with the output that you see in the browser, you cn then

uncomment that line again and it will start posting
dopelabs is offline   Reply With Quote
Old 28th August 2017, 18:15   #488
Busby
Senior Member
 
Busby's Avatar
 
Join Date: Apr 2004
Location: Isle of Man UK
Posts: 128
Many thanks for the replies..

I have set title.txt to 777 as suggested.

I've changed the path to just title.txt as it's in the same folder as all the other files.

I uploaded an updated title.txt with a dummy track title and refreshed the page and nothing changed. I then viewed title.text and found it was blank.

Can you explain which line to comment out to prevent it from posting please..

http://fr1.1mix.co.uk/TwittercastNew/shoutcast.php
http://fr1.1mix.co.uk/TwittercastNew/title.txt

Thanks again..

I'll get there in the end...
www.1mix.co.uk
Busby is offline   Reply With Quote
Old 28th August 2017, 18:35   #489
dopelabs
Major Dude
 
dopelabs's Avatar
 
Join Date: Oct 2006
Location: Silicon Valley
Posts: 519
Send a message via AIM to dopelabs
code:
// $twitterObj->post('/statuses/update.json', array('status' => $tweet));



like that
dopelabs is offline   Reply With Quote
Old 28th August 2017, 18:37   #490
dopelabs
Major Dude
 
dopelabs's Avatar
 
Join Date: Oct 2006
Location: Silicon Valley
Posts: 519
Send a message via AIM to dopelabs
also.. make a copy of your shoutcast.php file rename it to something.txt, remove your api credentials from the top and then pm me the url to the txt so i can see the source
dopelabs is offline   Reply With Quote
Old 28th August 2017, 18:48   #491
dopelabs
Major Dude
 
dopelabs's Avatar
 
Join Date: Oct 2006
Location: Silicon Valley
Posts: 519
Send a message via AIM to dopelabs
ok i think i got it.. no need to send me the source. grab the updated code from github
dopelabs is offline   Reply With Quote
Old 28th August 2017, 18:48   #492
Busby
Senior Member
 
Busby's Avatar
 
Join Date: Apr 2004
Location: Isle of Man UK
Posts: 128
I've pm'd you the shoutcast.php file as that was easier..

Thanks again

I'll get there in the end...
www.1mix.co.uk
Busby is offline   Reply With Quote
Old 28th August 2017, 19:14   #493
Busby
Senior Member
 
Busby's Avatar
 
Join Date: Apr 2004
Location: Isle of Man UK
Posts: 128
I've updated everything below // END CONFIGURATION and it's still the same I'm afraid..

I'll get there in the end...
www.1mix.co.uk
Busby is offline   Reply With Quote
Old 28th August 2017, 19:24   #494
dopelabs
Major Dude
 
dopelabs's Avatar
 
Join Date: Oct 2006
Location: Silicon Valley
Posts: 519
Send a message via AIM to dopelabs
again. get the new code from github. please look at it carefully... there are changes made to the server blocks...
dopelabs is offline   Reply With Quote
Old 29th August 2017, 10:47   #495
Busby
Senior Member
 
Busby's Avatar
 
Join Date: Apr 2004
Location: Isle of Man UK
Posts: 128
Many thanks for all your hard work on this - I'm pleased to say that correcting my errors, and updating to the latest script and now it seems to be working..

Thanks so much

I'll get there in the end...
www.1mix.co.uk
Busby is offline   Reply With Quote
Old 29th August 2017, 16:43   #496
dopelabs
Major Dude
 
dopelabs's Avatar
 
Join Date: Oct 2006
Location: Silicon Valley
Posts: 519
Send a message via AIM to dopelabs
excellent glad its workin for ya...
dopelabs is offline   Reply With Quote
Old 30th August 2017, 08:49   #497
dopelabs
Major Dude
 
dopelabs's Avatar
 
Join Date: Oct 2006
Location: Silicon Valley
Posts: 519
Send a message via AIM to dopelabs
thanks breenda... who would have thought the most active thread in the shoutcast section would be my twittercast script lol...
dopelabs is offline   Reply With Quote
Old 30th August 2017, 10:50   #498
Busby
Senior Member
 
Busby's Avatar
 
Join Date: Apr 2004
Location: Isle of Man UK
Posts: 128
Quote:
Originally Posted by dopelabs View Post
thanks breenda... who would have thought the most active thread in the shoutcast section would be my twittercast script lol...
It's fantastic that your work will help so many others who want to do the same with their radio stations..

I'll get there in the end...
www.1mix.co.uk
Busby is offline   Reply With Quote
Old 30th August 2017, 11:37   #499
dopelabs
Major Dude
 
dopelabs's Avatar
 
Join Date: Oct 2006
Location: Silicon Valley
Posts: 519
Send a message via AIM to dopelabs
im actually in the middle of re-writing the script to use the xml output of either v1 or 2. as it stands right now the script is simply parsing the text, using commas as the delimiter for each field.. the obvious problem here is if the track name has a comma in it, the title will only be up to the comma. it will truncate the rest.

so instead ill use the xml output which will resolve that issue.
dopelabs is offline   Reply With Quote
Old 1st September 2017, 13:32   #500
DJ-Garybaldy
Major Dude
 
DJ-Garybaldy's Avatar
 
Join Date: Sep 2003
Location: Harpurhey, Manchester UK
Posts: 580
I'm now referring people to the Github downloads from my blog post about Twitter scripts for Shoutcast...

I know people who've been after a v2 script for a while now. I don't have a way to test this at present as I'm not streaming but its bound to be useful for those who need to test them.

Keep up the good work Dopelabs!



Proud user of RadioDJ v2.0.0 FREE shoutcast automation software

Online: Twitter - Facebook - RadioDJv2
DJ-Garybaldy is online now   Reply With Quote
Old 1st September 2017, 13:58   #501
dopelabs
Major Dude
 
dopelabs's Avatar
 
Join Date: Oct 2006
Location: Silicon Valley
Posts: 519
Send a message via AIM to dopelabs
i use the same script. all my servers are either icecast or shoutcast v2... im actually combining the shout and ice scripts into a single script that will use the xml stats output since theres still a few issues when using 7.html on the shoutcast side.
dopelabs is offline   Reply With Quote
Old 6th February 2018, 06:37   #502
Erickem
Junior Member
 
Join Date: Feb 2018
Posts: 1
Please is anybody's script still working since twitter changed the authentication method from basic to oauth?What does one need to do to get it to work?
Please?I am losing followers and listeners.
Erickem is offline   Reply With Quote
Old 6th February 2018, 09:11   #503
dopelabs
Major Dude
 
dopelabs's Avatar
 
Join Date: Oct 2006
Location: Silicon Valley
Posts: 519
Send a message via AIM to dopelabs
the script should already be using oauth/api. mine still works just fine..

twitter.com/dubstepfm
dopelabs is offline   Reply With Quote
Old 12th March 2018, 02:46   #504
tosuthien
Junior Member
 
Join Date: Jan 2017
Posts: 24
This failed.
tosuthien is offline   Reply With Quote
Old 12th March 2018, 03:27   #505
dopelabs
Major Dude
 
dopelabs's Avatar
 
Join Date: Oct 2006
Location: Silicon Valley
Posts: 519
Send a message via AIM to dopelabs
how did it fail?
dopelabs is offline   Reply With Quote
Old 13th March 2018, 11:02   #506
tosuthien
Junior Member
 
Join Date: Jan 2017
Posts: 24
Yeah, thank you, it has worked fine. https://twitter.com/tosuthienvn
tosuthien is offline   Reply With Quote
Old 7th April 2018, 04:40   #507
tosuthien
Junior Member
 
Join Date: Jan 2017
Posts: 24
it fails again.
tosuthien is offline   Reply With Quote
Old 7th April 2018, 11:26   #508
dopelabs
Major Dude
 
dopelabs's Avatar
 
Join Date: Oct 2006
Location: Silicon Valley
Posts: 519
Send a message via AIM to dopelabs
mine still works fine.. also i cant help if you dont provide some more info as to what wrong
dopelabs is offline   Reply With Quote
Old 12th April 2018, 06:32   #509
REY619
Junior Member
 
Join Date: Feb 2010
Posts: 27
Working as intended. Thanks for this.
Meant to ask one thing, is there a way to not to post a particular song to twitter, when the script runs automatically via CRON job? Like the script triggering when my Ads are playing, I don;t want to post that info on Twitter.

Thank you.
REY619 is offline   Reply With Quote
Old 12th April 2018, 10:25   #510
Busby
Senior Member
 
Busby's Avatar
 
Join Date: Apr 2004
Location: Isle of Man UK
Posts: 128
Can I suggest you rename the ads files so they appear on Twitter as station ID's - that way you can use them to advantage.

I'll get there in the end...
www.1mix.co.uk
Busby is offline   Reply With Quote
Old 13th April 2018, 14:27   #511
dopelabs
Major Dude
 
dopelabs's Avatar
 
Join Date: Oct 2006
Location: Silicon Valley
Posts: 519
Send a message via AIM to dopelabs
Quote:
Originally Posted by Busby View Post
Can I suggest you rename the ads files so they appear on Twitter as station ID's - that way you can use them to advantage.
yes changing the ad audio filename and/or metadata to something more friendly like the station name is one option..

if you are contractually obligated to have a specific titles for the ads, i have updated the scripts on the github page to include support for not tweeting if it contains the text you specify.

see $adtext configuration item
dopelabs is offline   Reply With Quote
Old 13th April 2018, 17:05   #512
Busby
Senior Member
 
Busby's Avatar
 
Join Date: Apr 2004
Location: Isle of Man UK
Posts: 128
Fab

I'll get there in the end...
www.1mix.co.uk
Busby is offline   Reply With Quote
Old 15th April 2018, 13:47   #513
REY619
Junior Member
 
Join Date: Feb 2010
Posts: 27
Quote:
Originally Posted by dopelabs View Post
yes changing the ad audio filename and/or metadata to something more friendly like the station name is one option..

if you are contractually obligated to have a specific titles for the ads, i have updated the scripts on the github page to include support for not tweeting if it contains the text you specify.

see $adtext configuration item
Thank you for this.
Yes, I have to set a specific metadata for the ad files to make them trigger.
REY619 is offline   Reply With Quote
Reply
Go Back   Winamp & SHOUTcast Forums > SHOUTcast > SHOUTcast Discussions

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump