Skip to Content
It is currently July 17th, 2019, 9:59 am

All times are UTC - 6 hours [ DST ]




Post new topic Reply to topic  [ 14 posts ] 
Author Message
PostPosted: March 4th, 2018, 2:33 pm 
Offline
Junior User
Junior User

Joined: October 13th, 2013, 12:21 am
Posts: 60
Hello,

I found this script here:

Code:
Pal.Loop := true;
var Song : TSongInfo;

Song := TSongInfo.Create;

  Song['artist'] := 'Month of Pop Music Only';

Encoders.SongChange(Song);

Song.Free;
PAL.WaitForPlayCount(1);


that suppose insert text into each song but for some reason its not working and I'm getting "Error: Invalid variant type conversion".
Had Firebird DB and thought by switching over to MySQL 5.6 would solve the problem but it did not. Any ideas?

TIA


Top
 Profile  
Reply with quote  
PostPosted: March 4th, 2018, 11:19 pm 
Offline
SVS Member
SVS Member

Joined: October 15th, 2003, 11:59 pm
Posts: 4728
Location: Los Angeles - A Little West Of Nashville
I tested it out on both SHOUTcast version 1 & version 2 and it works perfectly.

What version of SAM are you using ?

_________________
- DJ Dee
- Spacial Volunteer Support (SVS)
- Custom PAL services: www.palscripts.com
- http://www.AlternativeHD.com
- http://www.lahotcountry.com


Top
 Profile  
Reply with quote  
PostPosted: March 8th, 2018, 5:36 pm 
Offline
Junior User
Junior User

Joined: October 13th, 2013, 12:21 am
Posts: 60
Thanks for the reply! I'm on 2014.7
Any other way to add it through "Caption template" ?


Top
 Profile  
Reply with quote  
PostPosted: March 8th, 2018, 7:22 pm 
Offline
SVS Member
SVS Member

Joined: December 6th, 2004, 9:00 am
Posts: 7860
Location: Aachen (Germany)
Are you sure you didn't run this or any other scripts with syntax errors before?
Because this sounds a lot like an overflow in a script causing lots of problems.

In any case:
Restart SAM (so we're sure there's no memory corruption due to previous errors)
Go into the editor for your script, in the menu click run -> reset, then run -> compile (or hit the compile button right above the text-box) and if there are no errors, continue with run.

_________________
Benedikt Bauer - SVS (Spacial Volunteer Support)

We're offering custom PAL / PHP code and general SAM assistance at palscripts.com

My Project:
Send "Now Playing" from SAM to Twitter and/or Facebook | Sourcecode


Top
 Profile  
Reply with quote  
PostPosted: March 8th, 2018, 10:27 pm 
Offline
Junior User
Junior User

Joined: October 13th, 2013, 12:21 am
Posts: 60
There are 2 default scripts but they are not running.

I did close SAM and opened it again but I'm still getting "Error: Invalid variant type conversion".

With Shoutcast v1 whatever I would put under caption it would show at the end of the song but now with v2 all what it does is displays Artist - Song name and nothing else. I've tried putting at the end of caption $filename$ but it completely ignores it.


Top
 Profile  
Reply with quote  
PostPosted: March 9th, 2018, 8:03 am 
Offline
SVS Member
SVS Member

Joined: May 8th, 2004, 9:00 am
Posts: 10434
Location: Denver, CO
I seem to recall that being an issue with an early version of ShoutCast V2. I know it is working in version 2.5.1.724 or later. Not the SAM issue, but the issue of not being able to affect the artist tile display through the streaming server.

_________________
- Rob Oyler, SVS
Image


Top
 Profile  
Reply with quote  
PostPosted: March 9th, 2018, 8:22 am 
Offline
SVS Member
SVS Member

Joined: December 6th, 2004, 9:00 am
Posts: 7860
Location: Aachen (Germany)
Does that error message show up right after you start or only in the second run?
You could try removing the Song.Free command and let the Garbage Collector handle the clearup automatically.

No idea what's wrong there.
Invalid Variant Type conversion actually means you tried to assign a value to an incompatible typed variable (i.e. set a string variable to a number and vice versa)

_________________
Benedikt Bauer - SVS (Spacial Volunteer Support)

We're offering custom PAL / PHP code and general SAM assistance at palscripts.com

My Project:
Send "Now Playing" from SAM to Twitter and/or Facebook | Sourcecode


Top
 Profile  
Reply with quote  
PostPosted: March 9th, 2018, 9:08 am 
Offline
Junior User
Junior User

Joined: October 13th, 2013, 12:21 am
Posts: 60
Thanks guys for the replies!

I'm on v2.5.5.733 and when I initially run the script it goes through each line and does not display error and then it sits on PAL.WaitForPlayCount(1); waiting for the next song. As soon as new song starts it displays that error.
Tried removing Song.Free; but it did not make any difference.

What about Caption template?


Top
 Profile  
Reply with quote  
PostPosted: March 9th, 2018, 12:35 pm 
Offline
SVS Member
SVS Member

Joined: December 6th, 2004, 9:00 am
Posts: 7860
Location: Aachen (Germany)
You can change that, but then you'll have to adjust it every time by hand.
$combine$ is for Artist - Title
If you just want to append/prepend something to the usual display, just add some text in front or back, but avoid using the $ symbol in your prefix/postfix.

_________________
Benedikt Bauer - SVS (Spacial Volunteer Support)

We're offering custom PAL / PHP code and general SAM assistance at palscripts.com

My Project:
Send "Now Playing" from SAM to Twitter and/or Facebook | Sourcecode


Top
 Profile  
Reply with quote  
PostPosted: March 10th, 2018, 12:02 pm 
Offline
Junior User
Junior User

Joined: October 13th, 2013, 12:21 am
Posts: 60
This is really odd.
I've tried adding show name only after $combine$ but it completely ignores it because when I login on Shoutcast and look at log all I see is this:
Code:
2018-03-10 07:49:50   INFO   [SRC MY.COMPUTER.PUBLIC.IP:63386 sid=1] Title update [Toto Cutugno - L'italiano]

Can you guys please check if it works for you?

I even uninstalled SAM and removed MySQL and after that installed SAM again with FB DB but with same result :(


Top
 Profile  
Reply with quote  
PostPosted: March 10th, 2018, 1:13 pm 
Offline
SVS Member
SVS Member

Joined: December 6th, 2004, 9:00 am
Posts: 7860
Location: Aachen (Germany)
I think I remember something about combine + something being parsed as removing all the custom stuff.
Can you try what happens when you use $artist$ and $title$ instead? (I think those were the right variables)

I'll try this out myself as soon as I get to my testbench-computer at home again tomorrow or monday.

_________________
Benedikt Bauer - SVS (Spacial Volunteer Support)

We're offering custom PAL / PHP code and general SAM assistance at palscripts.com

My Project:
Send "Now Playing" from SAM to Twitter and/or Facebook | Sourcecode


Top
 Profile  
Reply with quote  
PostPosted: March 13th, 2018, 9:45 am 
Offline
Junior User
Junior User

Joined: October 13th, 2013, 12:21 am
Posts: 60
So I tried just adding $artist$ and $title$ but it completely ignores and displays Artist - Title

Can you guys try it on your end please?


Top
 Profile  
Reply with quote  
PostPosted: March 13th, 2018, 9:54 am 
Offline
SVS Member
SVS Member

Joined: October 15th, 2003, 11:59 pm
Posts: 4728
Location: Los Angeles - A Little West Of Nashville
This post might help you .. Dr O, formally of SHOUTcast explains it:
https://forums.broadcastingworld.com/sh ... ng-History

_________________
- DJ Dee
- Spacial Volunteer Support (SVS)
- Custom PAL services: www.palscripts.com
- http://www.AlternativeHD.com
- http://www.lahotcountry.com


Top
 Profile  
Reply with quote  
PostPosted: March 13th, 2018, 2:41 pm 
Offline
Junior User
Junior User

Joined: October 13th, 2013, 12:21 am
Posts: 60
Thanks for the link but if I read OP request correctly he wants to suppress things from appearing. On the other hand my goal is to append/add simple text to the caption title.
"Trying to suppress things other than Songs from appearing in the SHOUTcast v2 history."


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 14 posts ] 

All times are UTC - 6 hours [ DST ]


Who is online

Users browsing this forum: Bing [Bot] and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group