View Single Post
Old 19th October 2010, 13:06   #328
MADxHAWK
Senior Member
 
Join Date: Jan 2010
Posts: 181
Hi,

i have 2 little problems with the beta 6 maybe someone could help.

First of all i tryed to use the new Playlistfeature to call an external programm to get a song.
My external php file only pick a random jingle from the jinglefolder. So far that works.

php file:
PHP Code:
/**
 * set path to a path you want to get a random song
 * Example: $path = '/home/stream/Music/Jingles/';
 */
$path '/home/stream/Music/Jingle2/';


/**
 * no need to change anything below this line!!!!
 * ==============================================
 */
$dir = @opendir($path);
$filelist = array();

while((
$file readdir($dir)) !== false)
{
    
$cur_file $path $file;
    if (
is_file($cur_file))
    {
        
array_push($filelist$cur_file);
    }
}
$rnd array_rand($filelist1);

echo 
$filelist[$rnd]. "\n"
Playlistfile:
PHP Code:
#!/usr/bin/php /home/stream/random.php 
and calendar entry:
PHP Code:
<event type="playlist">
<
playlist loopatend="0" shuffle="inherit" priority="1" >Jingle2</playlist>
<
calendar  starttime="00:30:00" duration="00:05:00" timeoffset="00:00:00" repeat="128" />
</
event
every ~30 minutes a random jingle is played, but i get a errormessage in my logfile and i dont know where it comes from:
Quote:
2010-10-19 14:30:00 D msg:[playlistMgr] Activating playlist Jingle2 id=2 loop=0 prior=1 shuffle=1 dur=300 curt=1287491400
2010-10-19 14:30:00 I msg:[playlistMgr] playlist load from file home/stream/sc_trans_2.6/archive/Jingle2_278290030.lst
2010-10-19 14:30:00 D msg:[playlistMgr] root path is home/stream/sc_trans_2.6/archive/
2010-10-19 14:30:00 D msg:[playlistMgr] Remote application entry
2010-10-19 14:30:00 D msg:[playlistMgr] #!/usr/bin/php /home/stream/random.php
2010-10-19 14:30:00 I msg:[playlistMgr] load complete
2010-10-19 14:30:00 D msg:[playlistMgr] Playlist queue:
name:Jingle2 priority:1 loop:0 shuffle:1 id:2 stop:1287491700
name:Standard_Playlist priority:0 loop:1 shuffle:1 id:-1 stop:0

2010-10-19 14:31:39 I msg:[mp3 decode] 2123685031 eof
2010-10-19 14:31:39 D msg:[playlistMgr] Attempting to run [/usr/bin/php /home/stream/random.php 3]
2010-10-19 14:31:39 D msg:[playlistMgr] Return string is /home/stream/Music/Jingle2/Radio-BlackPearl-Jingles1.mp3
2010-10-19 14:31:39 I msg:[decode] next file is /home/stream/Music/Jingle2/Radio-BlackPearl-Jingles1.mp3
2010-10-19 14:31:39 I msg:[ID3V2] version 3.0 tagsize=2278 unsync=0 xheader=0
2010-10-19 14:31:39 I msg:[decode] Radio-BlackPearl-Jingles1.mp3::335118::20.9449
2010-10-19 14:31:39 I msg:[ID3V2] version 3.0 tagsize=2278 unsync=0 xheader=0
2010-10-19 14:31:39 E msg:Failure converting filename to metadata Premature end of data (*/%TIT2.*)
2010-10-19 14:31:51 I msg:[shoutcastmetadata] metadata string [Radio BlackPearl - Jingles - Die Juwelen der Musikgeschichte]
2010-10-19 14:31:51 I msg:[shoutcastmetadata] Sending metadata
2010-10-19 14:31:58 I msg:[mp3 decode] 1060714471 eof
2010-10-19 14:31:59 I msg:[playlistMgr] deactivating playlist Jingle2 id=2
2010-10-19 14:31:59 I msg:[decode] next file is /home/stream/Music/Standard_Playlist/Corey_Hart_-_Sunglasses_At_Night_-_192.mp3
2010-10-19 14:31:59 I msg:[ID3V2] version 3.0 tagsize=2038 unsync=0 xheader=0
2010-10-19 14:31:59 I msg:[decode] Corey_Hart_-_Sunglasses_At_Night_-_192.mp3::7650868::318.786
2010-10-19 14:31:59 I msg:[ID3V2] version 3.0 tagsize=2038 unsync=0 xheader=0
2010-10-19 14:31:59 I msg:[ID3V2] version 3.0 tagsize=2038 unsync=0 xheader=0
2010-10-19 14:31:59 I msg:[ID3V2] version 4.0 tagsize=4086 unsync=0 xheader=0
2010-10-19 14:31:59 I msg:[ID3V2] version 3.0 tagsize=309 unsync=0 xheader=0
2010-10-19 14:31:59 I msg:[ID3V2] version 3.0 tagsize=2038 unsync=0 xheader=0
2010-10-19 14:31:59 I msg:[playlistMgr] Could not deactivate playlist with calendar id 2. It was not found.
2010-10-19 14:31:59 D msg:[playlistMgr]
name:Standard_Playlist priority:0 loop:1 shuffle:1 id:-1 stop:0

2010-10-19 14:32:11 I msg:[shoutcastmetadata] metadata string [Corey Hart - Sunglasses At Night]
2010-10-19 14:32:11 I msg:[shoutcastmetadata] Sending metadata
So what does trigger the errormessage
Quote:
2010-10-19 14:31:39 E msg:Failure converting filename to metadata Premature end of data (*/%TIT2.*)
and why i get the info the Playlist can't be deactivated
Quote:
2010-10-19 14:31:59 I msg:[playlistMgr] Could not deactivate playlist with calendar id 2. It was not found.

Another question: I have tried shoutcast2 (protocol 3) with 2 streamid's, a 192kbps and a 48kbps stream, and that worked fine so far. my problem here is, iv i use the Shoutcast2 protocol Shoutcast2 shows only the songname but not the artist on statuspage, songhistory and xml-stats. For example Nothing Else Matters. Winamp shows Metallica - Nothing Elses Matters. This happens if sc_trans is playing a playlist. If a DJ connects shoutcast also shows songs in Interpret - Title format. so i think it should be a problem on how sc-trans submit the metatag data to shoutcast2 using shoutcast2 protocol.

I have tryed
uvoxradiometadata=0
uvoxnewmetadata=1
and
uvoxradiometadata=1
uvoxnewmetadata=0

but there have been no changes.

Thanks ofor your answers.
MADxHAWK is offline