IRcap — File Browser

ircap871-mircscripts_2799 / ircap871-mircscripts_2799 / mod / mp3player / mp3player.mrc

mp3player.mrc — 19.82 KB — Download this file

;IRcap8 0e77b9a9ecb8d37a593c1702fb21f8a2

menu menubar {
  $m(255)
  .$m(256)
  ..$m(257):zplay -
  ..$m(258):zplay stop
  ..$m(259):zplay pausa
  ..$m(260):zplay >>
  ..$m(261):zplay <<
  ..-
  ..$m(262):mprnd - %dir.audio
  ..$m(262) (dir): var %mp33dir = $sdir=" $mg(seldir) " %dir.audio | mprnd - $left(%mp33dir,$calc($len(%mp33dir) - 1))
  ..-
  ..$m(263)
  ...$nopath($longfn($gettok(%mp3ult,1,22))): zplay - $gettok(%mp3ult,1,22)
  ...$nopath($longfn($gettok(%mp3ult,2,22))): zplay - $gettok(%mp3ult,2,22)
  ...$nopath($longfn($gettok(%mp3ult,3,22))): zplay - $gettok(%mp3ult,3,22)
  ...$nopath($longfn($gettok(%mp3ult,4,22))): zplay - $gettok(%mp3ult,4,22)
  ...$nopath($longfn($gettok(%mp3ult,5,22))): zplay - $gettok(%mp3ult,5,22)
  ...$nopath($longfn($gettok(%mp3ult,6,22))): zplay - $gettok(%mp3ult,6,22)
  ...$nopath($longfn($gettok(%mp3ult,7,22))): zplay - $gettok(%mp3ult,7,22)
  ...$nopath($longfn($gettok(%mp3ult,8,22))): zplay - $gettok(%mp3ult,8,22)
  .$m(264):zplay playlist
  .$m(265):zplay busca
  .-
  .$m(266) ( $iif(r isincs %mp3flag,*) ):zplay crep
  .$m(267):sndvolexe
  .$m(268):zplay idtag
  .-
  .$m(269):f3 setsonido
}

menu channel,query {
  $m(255)
  .$m(257): zplay $active
  .$m(263)
  ..$nopath($longfn($gettok(%mp3ult,1,22))): zplay $active $gettok(%mp3ult,1,22)
  ..$nopath($longfn($gettok(%mp3ult,2,22))): zplay $active $gettok(%mp3ult,2,22)
  ..$nopath($longfn($gettok(%mp3ult,3,22))): zplay $active $gettok(%mp3ult,3,22)
  ..$nopath($longfn($gettok(%mp3ult,4,22))): zplay $active $gettok(%mp3ult,4,22)
  ..$nopath($longfn($gettok(%mp3ult,5,22))): zplay $active $gettok(%mp3ult,5,22)
  ..$nopath($longfn($gettok(%mp3ult,6,22))): zplay $active $gettok(%mp3ult,6,22)
  ..$nopath($longfn($gettok(%mp3ult,7,22))): zplay $active $gettok(%mp3ult,7,22)
  ..$nopath($longfn($gettok(%mp3ult,8,22))): zplay $active $gettok(%mp3ult,8,22)
  .-
  .$m(262): mprnd $active %dir.audio
  .$m(262) (dir): var %mp33dir = $sdir=" $mg(seldir) " %dir.audio | mprnd $active $left(%mp33dir,$calc($len(%mp33dir) - 1))
  .$m(264):%plista.donde = $active | zplay playlist
  .$iif(($window(@sba1.plist)),$m(270)): %plista.donde = $active | plistbuf dib
  .-
  .$m(258):zplay stop
  .$m(259):zplay pausa
}


alias ZPLAY {
  if $1- == stop { splay stop | .timerMP3tit off | .timermp3extfin off | unset %tmp.mp3.scroll %mp3.rnd %mp3.pl %plista.donde | bartit | plistbuf dib | return }
  if $1- == pausa  { if ($insong.pos < 1) return | if ($insong.pause) { if (.ogg isin $right($insong.fname,4)) { splay seek $insong.pos } | splay resume } | else splay pause | return }
  if $1- == repe { var %d = -  , %c = $longfn($gettok(%mp3ult,1,22)) | goto L1 }
  if $1- == << {  if (%mp3.rnd) { mprnd %mp3.rnd } | else if $line(@sba1.plist,0) > 0 PLISTplay << | return }
  if $1- == >> { if (%mp3.rnd) { mprnd %mp3.rnd } | else if $line(@sba1.plist,0) > 0 PLISTplay >> | return }
  if $1- == playlist { .load -rs mod\mp3player\playlist.mrc | playlist | return }
  if $1- == crep { if (r isincs %mp3flag) { %mp3flag = $removecs(%mp3flag,r) } | else { %mp3flag = %mp3flag $+ r } | bartit | return }
  if $1- == busca { var %a = $$?=" $mg(busca) " | .load -rs mod\mp3player\playlist.mrc | playlist busca %a | return }
  if $1- == idtag { .load -rs mod\mp3player\mp3varios.mrc | mp3varios-idtag | return }

  var %d = $1 , %c = $longfn($2-) | if (!%c) { unset %tmp.mp3.scroll %mp3.rnd %mp3.pl %plista.donde | var %c = $sfile(%dir.audio $+ \*.mp3;*.ogg;*.wma;*.wav;*.mid;*.jpg;*.bmp;*.png;*.gif;*.avi;*.mpg;*.mpeg;*.ogm;*.mov) }

  if ($right(%c,4) isin .jpg .bmp .png .gif .avi .mpg .mpeg .ogm .mov) { run $shortfn(%c) | goto L2 }
  :L1
  splay stop | if (!$exists($shortfn(%c))) { fallo | .timerMP3NOVA 1 1 MP3nova | return }
  if (x !isincs %mp3flag) { .timerMP3NOVA 1 1 MP3nova | splay " $+ $shortfn(%c) $+ " } | else { run -u $shortfn(%c) | .timer -o 1 1 bartit }

  if (x isincs %mp3flag) { 
    var %tt = $int($calc($sound($shortfn(%c)).length / 1000)) | if (%tt < 1) { %tt = $int($calc($file(%c).size / 16000 + 8)) }
    .timerMP3EXTFIN -oc 1 %tt mp3-fin
  }

  var %ct = $shortfn(%c) | %mp3ult = $gettok(%ct $+  $+ $remtok(%mp3ult,%ct,1,22),1-8,22)
  if (x !isincs %mp3flag) .timerMP3tit -om 0 500 bartit | bartit
  :L2
  musidato $shortfn(%c)
  if ($window(@id3tag)) { .timer 1 1 zplay idtag }
  if %d == - { echo -st %mus.banner | raya | return }
  if (/ isin %mp3.banner) { $replace(%mp3.banner,/me,/describe) $iif(/a !isin %mp3.banner,%d) %mus.banner }
  if (%mp3.ctcp == SOUND) || (%mp3.ctcp == MP3) { if (/a isin %mp3.banner) .amsg  $+ %mp3.ctcp $nopath(%c) $+  | .else ctcp $remove(%d,=) %mp3.ctcp $nopath(%c) }
}


alias Bartit {
  var %tic = $ticks
  var %x = $gettok(%bar.pu,6,44) , %bmp = $gettok(%bar.g,6,44)

  if ($insong) { var %ti = $insong.fname , %le = $insong.length , %po = $insong.pos } 
  else if ($inmidi) { var %ti = $inmidi.fname , %le = $inmidi.length , %po = $inmidi.pos } 
  else if ($inwave) { var %ti = $inwave.fname , %le = $inwave.length , %po = $inwave.pos } 

  var %ca = %tmp.musica ( $+ $asctime($calc(%le / 1000),nn:ss) $+ ) * * * | inc %tmp.mp3.scroll | if %tmp.mp3.scroll > $len(%ca) { %tmp.mp3.scroll = 1 } | if (!%ti) unset %tmp.mp3.scroll | %ca = $mid(%ca,%tmp.mp3.scroll,100) %ca
  if (%bar.ply == on) {
    var %a = $gettok(%bar.m3,3,44)
    drawpic -cn @barra $calc(%x + $gettok(%a,1,32)) $gettok(%a,2,32) $calc($gettok(%bmp,1,32) + $gettok(%a,1,32)) $calc($gettok(%bmp,2,32) + $gettok(%a,2,32)) $gettok(%a,3-4,32) " $+ $mircdirskin\ $+ %skin $+ \bar.png"
    drawtext -cnr @barra $gettok($gettok(%bar.m3,15,44),2,32) Arial 9 $calc(%x + $gettok(%a,1,32) + 1) $calc($gettok(%a,2,32) + 1) $calc($gettok(%a,3,32) - 1) $gettok(%a,4,32) %ca
    drawtext -cnr @barra $gettok($gettok(%bar.m3,15,44),1,32) Arial 9 $calc(%x + $gettok(%a,1,32)) $gettok(%a,2-4,32) %ca
  }

  if (%bar.ply == on) {
    var %a = $gettok(%bar.m3,1,44)
    drawpic -cn @barra $calc(%x + $gettok(%a,1,32)) $gettok(%a,2,32) $calc($gettok(%bmp,1,32) + $gettok(%a,1,32)) $calc($gettok(%bmp,2,32) + $gettok(%a,2,32)) $gettok(%a,3-4,32) " $+ $mircdirskin\ $+ %skin $+ \bar.png"
    if (%le) {
      var %xx = $int($calc(%x + $gettok(%a,1,32) + $calc(%po / (%le / $gettok(%a,3,32))) - 2))
      if (%xx < $calc(%x + $gettok(%a,1,32))) { %xx = $calc(%x + $gettok(%a,1,32)) }
      if (%xx > $calc(%x + $gettok(%a,1,32) + $gettok(%a,3,32) - 4)) { %xx = $calc(%x + $gettok(%a,1,32) + $gettok(%a,3,32) - 4) }
      drawrect -rnfe @barra $gettok(%bar.m3,17,44) 1 %xx $gettok(%a,2,32) 4 4
    }
  }

  if (%bar.ply == on) {
    var %a = $gettok(%bar.m3,4,44)
    drawpic -cn @barra $calc(%x + $gettok(%a,1,32)) $gettok(%a,2,32) $calc($gettok(%bmp,1,32) + $gettok(%a,1,32)) $calc($gettok(%bmp,2,32) + $gettok(%a,2,32)) $gettok(%a,3-4,32) " $+ $mircdirskin\ $+ %skin $+ \bar.png"
    if (r isincs %mp3flag) drawrect -rnd @barra $gettok(%bar.m3,18,44) 1 $calc($gettok(%a,1,32) + %x) $gettok(%a,2-4,32) 6 6
  }

  var %d = $calc(%po / 1000) | if (q isincs %mp3flag) { %d = $calc((%le - %po) / 1000) }

  if (%bar.ply == on) {
    var %a = $gettok(%bar.m3,2,44)
    drawpic -cn @barra $calc(%x + $gettok(%a,1,32)) $gettok(%a,2,32) $calc($gettok(%bmp,1,32) + $gettok(%a,1,32)) $calc($gettok(%bmp,2,32) + $gettok(%a,2,32)) $gettok(%a,3-4,32) " $+ $mircdirskin\ $+ %skin $+ \bar.png"
    drawtext -cnr @barra $gettok($gettok(%bar.m3,16,44),2,32) Arial 11 $calc(%x + $gettok(%a,1,32) + 1) $calc($gettok(%a,2,32) + 1) $gettok(%a,3-4,32) $iif(q isincs %mp3flag,- $+ $asctime(%d,nn:ss),$asctime(%d,nn:ss))
    drawtext -cnr @barra $gettok($gettok(%bar.m3,16,44),1,32) Arial 11 $calc(%x + $gettok(%a,1,32)) $gettok(%a,2-4,32) $iif(q isincs %mp3flag,- $+ $asctime(%d,nn:ss),$asctime(%d,nn:ss))

    drawline @barra
  }

  if ($window(@plist))  PLISTtit %ti %le %po %d %ca
}

on 1:MP3END: if (x !isincs %mp3flag) mp3-fin
on 1:WAVEEND: if (x !isincs %mp3flag) mp3-fin
on 1:MIDIEND: if (x !isincs %mp3flag) mp3-fin
alias -l MP3-FIN {
  if ($1 != NOLO) { if ($shortfn($filename) != $shortfn($gettok(%mp3ult,1,22))) { if (x !isincs %mp3flag) return } }

  unset %tmp.mp3*
  .timerMP3tit off
  bartit

  if (%mp3.rnd) { mprnd %mp3.rnd | return }
  if (%mp3.pl) { zplay >> | return }
  if (r isincs %mp3flag) zplay repe
}

alias -l MP3NOVA if (!$insong) && (!$inmidi) && (!$inwave) mp3-fin NOLO

alias MUSIDATO {

  %mus.ext = $upper($gettok($1-,-1,46))
  %mus.title = $sound($1-).title
  %mus.album = $sound($1-).album
  %mus.artist = $sound($1-).artist
  %mus.comm = $sound($1-).comment
  %mus.year = $sound($1-).year
  %mus.genre = $sound($1-).genre
  %mus.track = $sound($1-).track

  if ($sound($1-,TPE1).tag) { %mus.artist = $ifmatch }
  if ($sound($1-,TIT2).tag) { %mus.title = $ifmatch }
  if ($sound($1-,TPE1).tag) { %mus.artist = $ifmatch }
  if ($sound($1-,TALB).tag) { %mus.album = $ifmatch }
  if ($sound($1-,TCON).tag) { %mus.genre = $ifmatch }
  if ($sound($1-,TRCK).tag) { %mus.track = $ifmatch }
  if ($sound($1-,TYER).tag) { %mus.year = $ifmatch }
  if ($sound($1-,COMM).tag) { %mus.comm = $ifmatch }
  if ($sound($1-,TCOM).tag) { %mus.compositor = $ifmatch }
  if ($sound($1-,TOPE).tag) { %mus.original = $ifmatch }
  if ($sound($1-,TCOP).tag) { %mus.copy = $ifmatch }
  if ($sound($1-,WXXX).tag) { %mus.url = $ifmatch }
  if ($sound($1-,TENC).tag) { %mus.coder = $ifmatch }

  %mus.dur = $replace($duration($calc($sound($1-).length / 1000)),mins,m,secs,s) 
  %mus.tam = $round($calc($lof($1-) / 1048576 ),1)
  %mus.br = $sound($1-).bitrate $+ $iif(($sound($1-).vbr),~VBR)
  %mus.sam = $calc($sound($1-).sample / 1000)

  var %cc = $left($nopath($longfn($1-)),-4)
  if (!%mus.artist) { if (- isin %cc) { %mus.artist = $gettok(%cc,1,45) } }
  if (!%mus.title) { if (- isin %cc) { %mus.title = $gettok(%cc,2-,45) } | else %mus.title = %cc }
  if (%mus.dur == 0s) { unset %mus.dur }
  if (%mus.sam == 0) { %mus.sam = N/A }
  if (!%mus.br) { %mus.br = N/A }


  %mus.banner = $replace(%banner.mp3,<tema>,%mus.title,<artista>,%mus.artist,<album>,%mus.album,<dur>,%mus.dur,<tamaño>,%mus.tam,<br>,%mus.br,<sam>,%mus.sam,<ext>,%mus.ext,<comentario>,%mus.comm)
  %mus.banner = $replace(%mus.banner,<año>,%mus.year,<genero>,%mus.genre,<pista>,%mus.track,<copyright>,%mus.copy,<compositor>,%mus.compositor,<original>,%mus.original,<www>,%mus.url,<coder>,%mus.coder)

  %mus.banner = $replace(%mus.banner,<title>,%mus.title,<artist>,%mus.artist,<size>,%mus.tam,<comment>,%mus.comm)
  %mus.banner = $replace(%mus.banner,<year>,%mus.year,<genre>,%mus.genre,<track>,%mus.track,<composer>,%mus.compositor)

  %mus.banner = $replace(%mus.banner,<comm>,%mus.comm,<tipo>,%mus.ext,<cancion>,%mus.title,<autor>,%mus.artist,<tam>,%mus.tam)

  %tmp.musica = $replace(%mus.artist - %mus.title,_,$chr(32))

  .timerMUSIDAT 1 2 unset %mus.*
}
alias mp3playerclick {
  if $barect($1,$2,5) { if ($3 == sclick) { barect2 5 | return } | wpulsa off | zplay repe }
  if $barect($1,$2,6) { if ($3 == sclick) { barect2 6 | return } | wpulsa off | zplay pausa }
  if $barect($1,$2,7) { if ($3 == sclick) { barect2 7 | return } | wpulsa off | zplay stop }
  if $barect($1,$2,8) { if ($3 == sclick) { barect2 8 | return } | wpulsa off | zplay << }
  if $barect($1,$2,9) { if ($3 == sclick) { barect2 9 | return } | wpulsa off | zplay >> }
  if $barect($1,$2,10) { if ($3 == sclick) { barect2 10 | return } | wpulsa off | zplay - }
  if $barect($1,$2,11) { if ($3 == sclick) { barect2 11 | return } | wpulsa off | mp3menus bar }
  if $barect($1,$2,12) { if ($3 == sclick) { barect2 12 | return } | wpulsa off | sndvolexe }
  if $barect($1,$2,13) { if ($3 == sclick) { barect2 13 | return } | wpulsa off | zplay Playlist }
  if $barect($1,$2,14) { if ($3 == sclick) { barect2 14 | return } | wpulsa off | zplay busca }

  if ($barect($1,$2,1)) && ($insong) && ($3 == sclick) { 
    var %x = $gettok($gettok(%bar.m3,1,44),1,32) , %an = $gettok($gettok(%bar.m3,1,44),3,32) , %p = $calc($1 - %x)
    splay seek $int($calc(($insong.length / %an) * %p)) | bartit 
  }

  if ($barect($1,$2,4)) { 
    if ($3 == sclick) { wpulsa @barra $calc($gettok(%bar.pu,6,44) + $gettok($gettok(%bar.m3,4,44),1,32)) $gettok($gettok(%bar.m3,4,44),2-4,32) | return }
    wpulsa off | zplay crep | bartit
  }

  if ($barect($1,$2,2)) && ($3 == uclick) { if (q isincs %mp3flag) { %mp3flag = $removecs(%mp3flag,q) } | else { %mp3flag = %mp3flag $+ q } | bartit }
  if ($barect($1,$2,3)) && ($3 == uclick) && (%mp3ult) { var %i = 1 , %u | :L1 | if ($gettok(%mp3ult,%i,22)) { %u = %u $+ $left($nopath($longfn($ifmatch)),99) $+  | inc %i | goto L1 } | smenu mp3menus_ult 200 %u }
}

alias -l barect var %a = $gettok(%bar.m3,$3,44) | return $inrect($1,$2,$gettok(%a,1,32),$gettok(%a,2,32),$gettok(%a,3,32),$gettok(%a,4,32))
alias -l barect2 wpulsa @barra $calc($gettok(%bar.pu,6,44) + $gettok($gettok(%bar.m3,$1,44),1,32)) $gettok($gettok(%bar.m3,$1,44),2-4,32)

alias MPRND {
  zplay stop
  if (!$2) return
  var %m = $findfile( [ $2- ] ,*.*,0)
  var %c =   $findfile( [ $2- ] ,*.*,$rand(1,%m))
  %mp3.rnd = $1-
  if ($right(%c,4) !isin .mp3 .ogg .wma .mid) { .timerMPNOVALE 1 1 mprnd $1- | return }
  zplay $1 %c
}

alias mp3menus {
  goto $1
  :bar
  if (!$2) {
    if $active == @sba || $active == @plist { var %x = - $+ $m(271) }
    smenu mp3menus_bar 100 $m(264) $+  $+ $m(265) $+ - $+ $m(257) $+  $+ $m(259) $+  $+ $m(258) $+  $+ $m(260) $+  $+ $m(261) $+ - $+ $m(262) $+   $+ $m(262) $+ (dir)- $+ $m(267) $+  $+ $m(268) $+ - $+ $m(279) $+  $+ $m(545) $+ - $+ $m(266) ( $iif(r isincs %mp3flag,*) ) $+ $m(269) $+ %x
  }
  if $2 == 1 { zplay playlist }
  if $2 == 2 { zplay busca }
  if $2 == 4 { zplay - }
  if $2 == 5 { zplay pausa }
  if $2 == 6 { zplay stop }
  if $2 == 7 { zplay >> }
  if $2 == 8 { zplay << }
  if $2 == 10 { mprnd - %dir.audio }
  if $2 == 11 { var %mp33dir = $sdir=" $mg(seldir) " %dir.audio | mprnd - $left(%mp33dir,$calc($len(%mp33dir) - 1)) }
  if $2 == 13 { sndvolexe }
  if $2 == 14 { zplay idtag }
  if $2 == 16 { 
    musidato $gettok(%mp3ult,1,22) | var %c = $chr(37) $+ 22
    url http://www.lyricstime.com/ $+ $vagalume(%mus.artist) $+ - $+ $vagalume(%mus.title) $+ -lyrics.html
  }
  if $2 == 17 { 
    musidato $gettok(%mp3ult,1,22) | var %c = $chr(37) $+ 22
    url http://www.coveralia.com/discos/ $+ $replace($vagalume(%mus.artist),-,_) $+ - $+ $replace($vagalume(%mus.album),-,_) $+ .php
  }
  if $2 == 19 { zplay crep }
  if $2 == 20 { F3 setsonido }
  if $2 == 22 { .load -rs mod\mp3player\mp3varios.mrc | mp3varios-donde }
  return
  :ult
  zplay stop | zplay - $gettok(%mp3ult,$2,22)
  return
  :+
  if (!$2) { smenu mp3menus_+ 130 $mg(mp3l1) | return }
  .load -rs mod\mp3player\mp3varios.mrc
  if $2 == 1 { mp3varios-anadir }
  if $2 == 2 { mp3varios-anadir2 }
  if $2 == 3 { mp3varios-anadir3 }
  .unload -rs mod\mp3player\mp3varios.mrc
  return
  :-
  if (!$2) { smenu mp3menus_- 130 $mg(mp3l2) | return }
  .load -rs mod\mp3player\mp3varios.mrc
  if $2 == 1 { mp3varios-borra }
  if $2 == 2 { mp3varios-borra2 }
  if $2 == 3 { mp3varios-borra3 }
  .unload -rs mod\mp3player\mp3varios.mrc
  return
  :l
  if (!$2) { smenu mp3menus_l 130 $mg(mp3l3) | return }
  .load -rs mod\mp3player\mp3varios.mrc
  if $2 == 1 { mp3varios-leelista }
  if $2 == 2 { mp3varios-leelista a }
  if $2 == 4 { mp3varios-grabalista }
  if $2 == 5 { mp3varios-grabalista2 }
  if $2 == 7 { mp3varios-ordena }
  if $2 == 8 { mp3varios-desordena }
  if $2 == 9 { clear @sba1.plist | PLISTBUF dib | plistbuf graba }
  .unload -rs mod\mp3player\mp3varios.mrc
}
alias -l vagalume var %a = $lower($1-) | if $left(%a,1) == $chr(32) { %a = $mid(%a,2,9999) } | return $remove($replace(%a,$chr(32),-,_,-,',-,á,a,é,e,í,i,ó,o,ú,u,ñ,n),',?,$chr(44))


alias PLISTBUF {
  if $1 == dib { if ($window(@plist)) { guilista @plist plist.ls1 | titula @plist $m(sbaplist) ( $line(@sba1.plist,0) ) > %plista.donde } | if ($script(sba.plist.mrc)) { guilista @sba sba.ls1.plist | drawline @sba } | return }
  if $1 == lee { if ($exists(usr\playlist.txt)) { if (!$window(@sba1.plist)) { window -hl @sba1.plist } | loadbuf -r @sba1.plist usr\playlist.txt } }
  else { savebuf @sba1.plist usr\playlist.txt }
}
alias PLISTplay {
  if (!%plista.donde) { %plista.donde = - }
  if $1- == >> { inc %mp3.pl | if %mp3.pl > $line(@sba1.plist,0) { if (r isincs %mp3flag) %mp3.pl = 1 | else { zplay stop | return } } | zplay %plista.donde $gettok($line(@sba1.plist,%mp3.pl),3,8) | marcaplista | return }
  if $1- == << { dec %mp3.pl | if %mp3.pl < 1 { %mp3.pl = $line(@sba1.plist,0) } | zplay %plista.donde $gettok($line(@sba1.plist,%mp3.pl),3,8) | marcaplista | return }
  if (!$gettok($3-,3,8)) return
  if $1 == 1 { .timerTTTIPMP3 -m 1 300 TTTIPMP3 $gettok($3-,3,8) }
  if $1 == 2 { unset %mp3.rnd | zplay %plista.donde $gettok($3-,3,8) | %mp3.pl = $2 | marcaplista | .timerTTTIPMP3 off }
}
alias MArcaPlista {
  var %a = $fline(@sba1.plist,*,1) | if (%a) { rline @sba1.plist %a $strip($line(@sba1.plist,%a)) }
  rline @sba1.plist %mp3.pl  $+ $line(@sba1.plist,%mp3.pl)
  sline @sba1.plist %mp3.pl
  PLISTBUF dib
}
alias PLISTbusca {
  clear @sba1.plist
  var %f = * $+ $replace($1-,_,?,$chr(32),?,$chr(40),?,$chr(41),?,-,?) $+ *
  var %n = $findfile(%dir.audio,%f,0,llenapl $1-).shortfn
  unset %plist.busca
  PLISTBUF dib
  plistidtag 1
}
alias PLISTidtag {
  var %i = $fline(@sba1.plist,*00:00*,1) , %l = $line(@sba1.plist,%i) | if (!%l) || ($1 > $2) { plistbuf dib | unset %tmp.id3tag | plistbuf graba | return }
  if ($gettok(%l,2,8) == 00:00) {
    var %c = $shortfn($gettok(%l,3-,8)) , %x = $sound(%c).artist - $sound(%c).title
    if (%x == -) { var %x = $gettok(%l,1,8) } | %x = %x $+ $chr(8) $+ $replace($asctime($calc($sound(%c).length / 1000),nn:ss),00:00,-- : --)  $+ $chr(8) $+ $gettok(%l,3-,8)
    rline @sba1.plist %i %x
  }
  inc %tmp.id3tag | if (%tmp.id3tag > 10) { 
    unset %tmp.id3tag 
    if (%plist.ls1) { if ($abs($calc(%i - $gettok(%plist.ls1,5,32))) < 40) { guilista @plist plist.ls1 | drawline @plist } }
    if (%sba.ls1.plist) { if ($abs($calc(%i - $gettok(%sba.ls1.plist,5,32))) < 40) { guilista @sba sba.ls1.plist | drawline @sba } }
  }
  inc %i | .timerIDTAG -m 1 30 plistidtag %i $2
}
alias TTTIPMP3 var %a = %tmp.musica | musidato $1- | %tmp.musica = %a | tttip  %mus.title $iif(%mus.artist, $ifmatch) $iif(%mus.album, $ifmatch) $iif(%mus.dur, $ifmatch) $iif(%mus.tam, $ifmatch MB)  %mus.br kbps / %mus.sam Khz $iif(%mus.comm, $ifmatch)

#LlegaSonido on
ctcp 1:SOUND: dosno concon $1- | llegaMP3 $nopath($2-) | halt
ctcp 1:MP3: dosno concon $1- | llegaMP3 $nopath($2-) | halt

alias LLEGAMP3 {
  if ($insong) || ($inmidi) || ($inwave) { if (i !isincs %mp3flag) return }
  var %c = $nopath($1-)
  var %a = $findfile(%dir.audio,%c,1)
  if (%a) {
    echo -st $logo $nick pone $+ $iif($target != $me, ( $target )) $+ : %c
    zplay - %a
  }
  else { %tmp.inickf = $iif($target == $me,$nick,$target) ! $+ $nick %c | echo -ste $mg(mp3l4, $+ %c $+ ,$nick,F11) }
}
alias F11 msg %tmp.inickf | echo -se $logo $mg(mp3l5, $+ $gettok(%tmp.inickf,3-99,32) $+ )
#LlegaSonido end

#mp3playrcvd on
on 1:FILERCVD:*: if ($gettok($filename,-1,46) isin mp3 wav ogg wma mid) zplay - %dir.audio $+ $nopath($filename)
#mp3playrcvd end

on 1:SIGNAL:envfichero: mandofichero $1-

alias -l mandofichero {
  var %f = $2- , %e = $gettok(%f,-1,46)
  if (%e isin mp3 ogg wma wav mid) { var %s = $findfile(%dir.audio,%f,1) }
  if (%e isin jpg bmp png gif avi mpg mpeg ogm mov) { var %s = $findfile(%dir.video,%f,1) }
  if (%s) dccola $1 %s
}

alias SNDVOLEXE {
  if ($exists(c:\Windows\System32\sndvol32.exe)) { run sndvol32.exe } | else { run sndvol.exe }
}


on 1:START: unset %tmp.mp3.scroll %mp3.rnd %mp3.pl | PLISTBUF lee
on 1:LOAD: bar | sbarra | %mp3.ctcp = SOUND | %mp3.banner = /ME
on 1:UNLOAD:{
  splay stop
  .timerMP3* off | .timerIDTAG off | .timermp3extfin off
  unset %mp3.* %tmp.mp3* %plist.* %mp3ult %tmp.id3tag
  window -c @plist
  window -c @sba1.plist
  .timer 1 1 bar
  .timer 1 1 sbarra
}
;EOF