Raduga (English)

User: Guest


Please use the
Bug Report Form
if you think you found a software defect.

Use the Contact Form
to send a personal message to Wolfgang.

RSS Feed RSS Feed

Other boards:
Song Requester

Display Song on internet

Posted on: Raduga (English)

From Message


2009-10-22 21:45:41

Display Song on internet


We want to display our songs on either our play box or website, but need information how to do this.

Our filenames for all songs are: "title of song_artist"

In other words, we only need to list the file name for listeners to know who is singing the song and the artist.


Wolfgang Loch

2009-10-25 17:50:48

Re: Display Song on internet

There is a Raduga add-in in the folder C:\Program Files\WoLoSoft\Raduga\AddIns\FtpUpload. It uploads the name of the currently playing song by FTP to a server. Please read the Readme.txt file in the folder for setup instructions.

Mark Lee

2010-02-18 14:52:58

Re: Display Song on internet

Hey Guys,

Hope you don't mind me tagging on the end of your post but it applies to the same thing about uploading song info by FTP and i thought Wolfgang or someone might be able to help.

I have installed the Java app and it is generating the local playlist file, but when i start Raduga i get an error:

Putfile "C:\Playlist.html", "html/playlist.html" failed:

What does this mean exactly and how do i fix it? I have the playlist.html file in my root HTDocs folder on my server and this can be viewed ok:


So any suggestions before i go even more insaine?????

joe b

2010-03-12 08:25:54

Re: Display Song on internet

that's a very good question. joe


2011-01-13 17:06:13

Re: Display Song on internet

not many information about this, no answer from the author himself...

How to edit the javascript "FtpUpload.js" with my settings so raduga can upload to my FTP ?
thank you.

Wolfgang Loch

2011-01-13 20:18:01

Re: Display Song on internet

The FtpUpload.js is located in the folder "C:\Program Files\WoLoSoft\Raduga\AddIns\FtpUpload\" and it starts like this:

/* Configuration parameters */

var server = "yourserver.com" // your FTP server name
var userName = "username" // your FTP account
var password = "password" // your FTP password

var localFile = "C:\\FtpUpload.html" // a temporary local file name
var remoteFile = "FtpUpload.html" // file name on the remote server


You must adjust all of these parameters to match your FTP server.

The remoteFile parameter must be given relative to the FTP root directory and it should be a location within the DocumentRoot directory of the web server. For example, if the absolute path of the web server's DocumentRoot is /home/httpd/vhosts/wolosoft.com/httpdocs and the FTP root directory is /home/httpd/vhosts/wolosoft.com, then the remoteFile parameter should start with "httpdocs/". For example with "httpdocs/playlist.html" the file will be accessible with the URL http://www.wolosoft.com/playlist.html

Normally you can leave the localFile paramter as it is. But if you change it, make sure that the directory actually exists on the PC and that you replace any backslash characters in the file name by double-backslash, because that's required for JavaScript.


2011-01-14 16:33:54

Re: Display Song on internet

thank you for this piece of information wich you cannot find inside the help file in the demo version.


2011-01-18 10:50:54

Re: Display Song on internet

Wolfgang, you should let people know about the whole file "FtpUpload.js", here I give a complete WORKING install of this file:

/* Configuration parameters */

var server = "ftp.xxxxxxx.com" // your FTP server name
var userName = "xxxxxx" // your FTP account
var password = "xxxxxx" // your FTP password

var localFile = "C:\\FtpUpload.html" // a temporary local file name
var remoteFile = "FtpUpload.html" // file name on the remote server


var ftp;
var currentSong = "";
var previousSong = "";
var nextSong = "";
var BLUE = 128*256*256;
var RED = 128;

// The Application::Startup event is fired on startup of Raduga
function Application::Startup()
Application.Console.Visible = true;
DebugOutput( "FtpUpload started" );

// The Application::Shutdown event is fired on shutdown of Raduga
function Application::Shutdown()
if( ftp != null )

// The Player::Start event is fired by Raduga whenever a new track starts
function Player::Start()
var playlist = Application.Playlist;

previousSong = currentSong;
currentSong = playlist.DisplayNameOf( Player.FileName )
nextSong = playlist.DisplayNameOf( playlist.Item( playlist.NextIndex ) )


function WriteFile()
Application.Statusbar = "Writing file " + localFile;
DebugOutput( "Writing file " + localFile );

var ForWriting = 2;
var FormatAscii = 0;
var fso = new ActiveXObject( "Scripting.FileSystemObject" )
fso.CreateTextFile( localFile );
var file = fso.GetFile( localFile );
var ts = file.OpenAsTextStream( ForWriting, FormatAscii );

ts.WriteLine( "<HTML><HEAD>" );
ts.WriteLine( "<META HTTP-EQUIV=\"Refresh\" Content=\"10\">" );
ts.WriteLine( "<TITLE>Radio Bonheur</TITLE>" );
ts.WriteLine( "<STYLE>TD { font-family: sans-serif }</STYLE>" );
ts.WriteLine( "</HEAD>" );
ts.WriteLine( "<BODY>" );
ts.WriteLine( "<TABLE>" );
ts.WriteLine( "<TR><TD>Precente:</TD><TD>" + previousSong + "</TD></TR>" );
ts.WriteLine( "<TR><TD>On Air:</TD><TD><B>" + currentSong + "</B></TD></TR>" );
ts.WriteLine( "<TR><TD>Suivante:</TD><TD>" + nextSong + "</TD></TR>" );
ts.WriteLine( "</TABLE>" );
ts.WriteLine( "</BODY></HTML>" );

Application.Statusbar = "";

function UploadFile()
Application.Statusbar = "Uploading file " + localFile + " to " + remoteFile;

if( ftp == null )
ftp = new ActiveXObject( "Raduga.Ftp" );
ftp.Server = server;
ftp.UserName = userName;
ftp.Password = password;

DebugOutput( "Connecting to FTP server " + ftp.Server );

DebugOutput( "Uploading file " + localFile + " to " + remoteFile );
ftp.PutFile( localFile, remoteFile );
catch( error )
HandleError( error );
ftp = null;

Application.Statusbar = "";

function HandleError( error )
Application.StatusBar = "FtpUpload Error: " + error.description;
Application.Console.WriteLineColor( error.description, RED );

function DebugOutput( text )
Application.Console.WriteLineColor( text, BLUE );

Post a reply to this message: