mp3 extras

By Dooley on Feb 24, 2008

this makes a playlist with !nick name of song.mp3 and has a search for artist or songs feature and removes underscores. Feel free to change to suit your needs

menu channel,status,menubar {
mp3 extras
.make playlist { 
  if (%mp3dir == $null) { 
    echo -a you must set a directory first
    set %mp3dir $sdir(*)
  } 
  if ($exists(playlist.txt)) remove playlist.txt
  $findfile(%mp3dir,*.mp3,0,write playlist.txt $chr(33) $+ $me $nopath($1-))
  filter -ffct 1 13 playlist.txt playlist.txt *
  run playlist.txt
  set %pl $lines(playlist.txt)
  .timer 1 5 echo -a songs in playlist %pl
}
.Remove underscores://noop $findfile(%mp3dir,*.*,0,rename $qt($1-) $qt($replace($1-,_,$chr(32)))) 
.Search for Artists or Songs:{
  if ($exists(temp.txt)) remove temp.txt
  if (%mp3dir == $null) { 
    echo -a you must set a directory first
    set %mp3dir $sdir(*)
  }
  set %search $$?="Artist or Song*"
  var %i = 1, %ln = $lines(playlist.txt)
  while (%i <= %ln) {
    var %temptext = $read(playlist.txt,%i)
    if (%search isin %temptext) {
      write temp.txt $right(%temptext,-6)
    }
    inc %i
  }
  write temp.txt $lines(temp.txt) matches for %search
  write temp.txt this file will be deleted on next search
  run temp.txt
}

Comments

Sign in to comment.
Are you sure you want to unfollow this person?
Are you sure you want to delete this?
Click "Unsubscribe" to stop receiving notices pertaining to this post.
Click "Subscribe" to resume notices pertaining to this post.