| View previous topic :: View next topic |
| Author |
Message |
Anonymous Guest
|
Posted: Sun Nov 04, 2007 12:38 am Post subject: Ice-0 Question |
|
|
OK so I have the icecast2 server running perfect, now i started streaming on ices-0 a folder and ideally I will update this folder continuously, and well of course generate a new playlist.txt file every so often that add new files to this folder.
So my question is, Does Ice picks up the new playlist or still will use the old one? I mean the process Is going to be running already so would I have to stop the ices process and start a new one? or would it just read the new file.
If ices does not read the new file is there any solution that could be suggested so that the process(ices) does not go down or stop at all.
Thanks |
|
| Back to top |
|
 |
karlH Code Warrior

Joined: 13 Jun 2005 Posts: 5476 Location: UK
|
Posted: Sun Nov 04, 2007 2:12 am Post subject: |
|
|
I believe that ices 0 checks the mtime of the playlist when the next filename is required, and reloads the playlist if it has been updated.
karl. |
|
| Back to top |
|
 |
Anonymous Guest
|
Posted: Sun Nov 04, 2007 4:08 pm Post subject: |
|
|
Would you happen to know how often is the reload of the new playlist.txt file ? since i tried creating a single stream with only one song and updated the file to 2 songs but yet after hearing the song for about 3 times I never got a chances to hear the new song.
The Basic idea is that I created a folder where a few of my friends can upload songs and the playlist.txt file gets regenerated every so often, and I wanna make sure the new songs are also played.
Does it matter the fact that I'm playing shuffel/random?
Thanks |
|
| Back to top |
|
 |
karlH Code Warrior

Joined: 13 Jun 2005 Posts: 5476 Location: UK
|
Posted: Sun Nov 04, 2007 7:07 pm Post subject: |
|
|
The random setting may have an affect but I'm not sure, it's been a while since looked at ices0
karl. |
|
| Back to top |
|
 |
Anonymous Guest
|
Posted: Sun Nov 04, 2007 9:53 pm Post subject: |
|
|
ok so I decided to test with 2 songs on the playlist then adding a 3rd one after i start ices0,
my first test was made with the configuration set to not Random (<Random>0</Random>) after about 5 minutes of hearing the same 2 short songs i finally heard the new one.
Then I changed the setting on the configuration to 1 and did the same test. over 10 minutes passed and never heard the new song.
So I guess this answer my question, however it rises another one, is there a way to generate a playlist.txt file but in random order? Since I have my files in different folders and some of them are full albums and i don't want to hear the full album at once. but more like shuffle |
|
| Back to top |
|
 |
karlH Code Warrior

Joined: 13 Jun 2005 Posts: 5476 Location: UK
|
Posted: Sun Nov 04, 2007 10:17 pm Post subject: |
|
|
I'm sure you can remove the check for random setting from source if it hasn't been done so already
karl. |
|
| Back to top |
|
 |
Guest
|
Posted: Wed Nov 07, 2007 1:23 am Post subject: |
|
|
Ok so after a few test and listening to the same songs over and over trying to see if ices would start the new play list, I end up giving up on hoping random option would read the new play list, so since I noticed that without this option ices would read the new play list I created a perl script that would generate a play list of a folder in random order. so every time it is run, it will create a play list completely different. and since i have more than one instance of ice running i made it dynamic so it would run for the different folders I need to have a play list of.
| Quote: |
#!/usr/bin/perl -w
# afelotreyu at gmail . com
# Nov 6 2007 #
# Verson 1.0 #
use strict;
use warnings;
use File::Find;
srand(time|$$);
my (@a,$choice,$file,$playlist);
my $dir=['/some/dir/Jazz','/some/dir/Dance-House','/some/dir/Reggae'];
for (my $d=0;$d <= $#{$dir}; $d++) {
$playlist = "$dir->[$d]/playlist.txt";
open(PLAY,">$playlist") or die "Could not open $playlist";
flock(PLAY,0); seek(PLAY,0,0);
find(\&add_array,$dir->[$d]);
while (@a) {
$choice = splice(@a, rand @a,1);
if ($choice =~ m/\.mp3$/) { print PLAY $choice."\n"; }
}
close PLAY;
} # Close for loop
sub add_array()
{
push (@a,$File::Find::name)
}
|
Sorry I didn't go explaining the script. but if you need help please feel free to ask. |
|
| Back to top |
|
 |
prachi
Joined: 05 May 2009 Posts: 1
|
Posted: Tue May 05, 2009 4:54 am Post subject: Re: Ice-0 Question |
|
|
| After completion of paylist how to stop looping |
|
| Back to top |
|
 |
|