Old 26th December 2008, 12:32   #1
MailmanP
Junior Member
 
Join Date: Feb 2003
Posts: 3
Searching for Webinterface for SC_Trans

Hi there!

I'm looking all day for a webinterface to manage playlists and handle the api-things that sc_trans comes with.

Someone has such a tool?

It would be nice if it supports the new calender functions in beta 4
MailmanP is offline   Reply With Quote
Old 26th December 2008, 13:11   #2
jaromanda
Forum King
 
Join Date: Jun 2007
Location: Under the bridge
Posts: 2,289
Re: Searching for Webinterface for SC_Trans

Quote:
Originally posted by MailmanP
Hi there!

I'm looking all day for a webinterface to manage playlists and handle the api-things that sc_trans comes with.

Someone has such a tool?

It would be nice if it supports the new calender functions in beta 4
Firstly, there is no such tool available, yet

secondly, as far as I can tell, a PURE "web interface" (html and javascript) isn't possible - as it would require cross domain AJAX i.e. a web page at http://some-domain.com/ can not use xmlHttpRequest (the core to AJAX) for http://some-domain.com:9999/api/ (where 9999 is the admin port in sc_trans, for example)

I'm working on a html/javascript/php interface - but it's damned tedious (not difficult, just boring) and I'm not working on it too hard as

a) specs may change in the next beta!
b) the api doc also documents functionality not implemented yet! for example, see the posts starting at http://forums.shoutcast.com/showthre...79#post2461379

Is it just me or are shoutcast users getting dumber?
jaromanda is offline   Reply With Quote
Old 26th December 2008, 13:28   #3
MailmanP
Junior Member
 
Join Date: Feb 2003
Posts: 3
let me know if you got it ready!

for sure i can run the api commands with links in a special hidden page

the only things that would be nice is a way to edit the playlist-files online? someone has an idea?
MailmanP is offline   Reply With Quote
Old 26th December 2008, 18:44   #4
Jkey
Forum King
 
Join Date: Jul 2004
Location: E*arth
Posts: 3,031
It is stated that in future builds of sc_trans there will be an ajax based web interface.

I have been working on a flash based one for some time (before the api was public ),and now with the addition of flash policy features its a great way to go.

My adventures asside the SHOUTcast Dev team are working on a web interface example that will be shipped with sc_trans.
Jkey is offline   Reply With Quote
Old 28th December 2008, 16:24   #5
nradisch
Senior Member
 
Join Date: Jun 2008
Location: Weston, CT
Posts: 250
Re: Re: Searching for Webinterface for SC_Trans

Quote:
Originally posted by jaromanda
Firstly, there is no such tool available, yet

secondly, as far as I can tell, a PURE "web interface" (html and javascript) isn't possible - as it would require cross domain AJAX i.e. a web page at http://some-domain.com/ can not use xmlHttpRequest (the core to AJAX) for http://some-domain.com:9999/api/ (where 9999 is the admin port in sc_trans, for example)

I'm working on a html/javascript/php interface - but it's damned tedious (not difficult, just boring) and I'm not working on it too hard as

a) specs may change in the next beta!
b) the api doc also documents functionality not implemented yet! for example, see the posts starting at http://forums.shoutcast.com/showthre...79#post2461379
That's not entirely true. You can do cross domain scripting, but you have to request that permission in your script. The user will then be prompted by the browser to allow it. If it's a script/web page you've designed yourself then there's no inherent security risk (since you wrote it after all), and no danger in allowing the cross domain access.

You could also put the files on a web server in the same domain as sc_trans, and that should solve the cross domain issue without resorting to security level scripting.


--Neil
nradisch is offline   Reply With Quote
Old 29th December 2008, 12:10   #6
jaromanda
Forum King
 
Join Date: Jun 2007
Location: Under the bridge
Posts: 2,289
Re: Re: Re: Searching for Webinterface for SC_Trans

Quote:
Originally posted by nradisch
You could also put the files on a web server in the same domain as sc_trans, and that should solve the cross domain issue without resorting to security level scripting.
xyz.com:80 is not considered the same domain as xyz.com:8000 - at least not in firefox

yes ... you can request higher privileges etc ... I forgot about that

Is it just me or are shoutcast users getting dumber?
jaromanda is offline   Reply With Quote
Old 29th December 2008, 19:46   #7
nradisch
Senior Member
 
Join Date: Jun 2008
Location: Weston, CT
Posts: 250
I didn't realize that a different port was considered a different domain. That adds weight to Tag's request for sc_trans to be able to serve up arbitrary web pages. If it did that, then you could build an entire interface that is served up via the admin port.

--Neil
nradisch is offline   Reply With Quote
Old 3rd January 2009, 00:54   #8
aster1sk
Junior Member
 
Join Date: Dec 2008
Location: Toronto
Posts: 4
I have written three different ones in total all of different complexity. I have upped a few demonstrations to youtube, search user "4st3r1sk".
aster1sk is offline   Reply With Quote
Old 3rd January 2009, 10:41   #9
Jkey
Forum King
 
Join Date: Jul 2004
Location: E*arth
Posts: 3,031
it would be more helpful to users of sc_trans 2.0 if you made them public.
Jkey is offline   Reply With Quote
Old 3rd January 2009, 13:43   #10
MailmanP
Junior Member
 
Join Date: Feb 2003
Posts: 3
hey aster1sk!

GREAT WORK!

I realy need this if you want share it pls contact me!
MailmanP is offline   Reply With Quote
Old 3rd January 2009, 15:56   #11
aster1sk
Junior Member
 
Join Date: Dec 2008
Location: Toronto
Posts: 4
Well they are in fact public, visit geekhut dot org for more information.
aster1sk is offline   Reply With Quote
Old 3rd January 2009, 16:19   #12
aster1sk
Junior Member
 
Join Date: Dec 2008
Location: Toronto
Posts: 4
A Playlist management interface is a joke to write, have the end user specify their music directory and :

$cmd = "find $path -type f -name \"*.mp3\" > playlist.pls";
shell_exec($cmd);

Now we just read the playlist file and :

$broken = explode("\m", $file);
foreach ($broken as $track)
{
$split_track = explode('/', $track);
$artist = array_slice($split_track, -3, 1);
$album = array_slice($split_track, -2, 1);
$track = end($split_track);
// run insert query for artist, album, track and full path, you can also md5() each $track that way you can lookup tracks in the future (directly from the logfiles, as long as the end user doesn't change the file names)
}

Now that you have all of the data in the DB, you can run a quick search query and construct a playlist on the fly (I used AJAX auto complete & drag / drop for mine)

The database will return the path and can easily be written like this :
foreach($item as $track)
{
$output .= $track->path."\n";
}
// write playlist to file using php fwrite or shell_exec("echo $output > playlist.lst");

Only restriction is the user must arrange their folders : Artist -> album -> track...

I have played a lot with this concept and have way too much time on my hands...
aster1sk is offline   Reply With Quote
Old 17th July 2009, 05:45   #13
aster1sk
Junior Member
 
Join Date: Dec 2008
Location: Toronto
Posts: 4
geekhut.org/2009/06/shoutcast-web-dj-software/
aster1sk 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