TakeOver Pro — File Browser
TakeOverProv1.0 / TakeOverProv1.0 / ToPro / gotillamp3-1.mrc
gotillamp3-1.mrc — 28.15 KB — Download this file
;GoTilla MP3 v3.22
;by Bucksmack(buckaroo@rochester.rr.com)
;ID3 ALIASES(below) coutesy of w|dget(widget01@hotmail.com)
on *:load:{
if (( $version < 5.6 ) || ( $bits < 32 )) { got.eco GoTilla MP3 v3.22 requires mIRC v5.6(32bit) or higher | unload -rs $script | halt }
if ( $script(gotillamp3-2.mrc) != $null ) { .unload -rs $script(gotillamp3-2.mrc) }
.load -rs1 $shortfn($nofile($script)) $+ gotillamp3-2.mrc
if ( $script(gotillamp3-2.mrc) == $null ) { got.eco Could not locate gotillamp3-2.mrc, please make sure it is in your mIRC directory | halt }
if ( $got.read(mp3advert) == $null ) { got.write mp3advert on } | got.write mp3version 3.22
if (( $got.read(mp3color1) == $null ) || ( $got.read(mp3color2) == $null )) { got.write mp3color1 1 | got.write mp3color2 1 }
if (( $got.read(mp3dir) == $null ) || ( $got.read(mp3player) == $null )) { bgmp3local | bgmp3setup }
got.eco GoTilla MP3 has been loaded! Please enjoy :)
got.eco Dont forget about the /mp3 <keyword(s)> function!
got.eco Thanx for using GoTilla MP3...enjoy :-) Read the readme1st file for a list of whats new(if you downloaded from a website)
}
alias got.read { return $readini $got.q($mircdirgotilla.ini) mp3 $1- }
alias got.write { writeini $got.q($mircdirgotilla.ini) mp3 $$1 $$2- }
alias got.eco { echo -a $+ $colour(info) $+ *** $$1- }
on *:disconnect:{ unset %got.loser* | unset %gotflood* | unset %got.*.* }
ctcp *:*: { if ( $1 == version ) { if ( %got.loser [ $+ [ $nick ] ] != $null ) { halt } | set %got.loser [ $+ [ $nick ] ] 1 | .ctcpreply $nick $1 %got.loser | .timer 1 2 unset %got.loser [ $+ [ $nick ] ] } }
on *:connect: {
if ( $nopath($script) != gotillamp3-1.mrc ) { .timer 1 2 rename $got.q($script) " $+ $nofile($script) $+ gotillamp3-1.mrc $+ " }
set %got.loser $iif( GoTilla !isin %got.loser,GoTilla ) %got.loser <MP3 v3.22>
}
alias bghatesme { if ($?!="Are you sure you want to unload GoTilla MP3?") { .timer -m 1 1 unload -rs $got.q($script) | .timer -m 1 3 bghatesme2 | .timer -m 1 2 got.eco Gotilla MP3 v3.22 has successfully been unloaded : $+ $chr(91) } }
menu channel {
-
-
GoTilla MP3
.Features
..Play Window { bgmp3playlist }
..$got.mp3.addon.kermit { got.kermit }
..$got.mp3.addon.2 { got.mp3add2 }
..$got.mp3.addon.3 { got.mp3add3 }
.-
.Play { bgplay }
.Replay { bgreplay 2 }
.Random { bgranplay }
.Shuffle
..Start { bgshuffle }
..Skip { got.shuffleskip }
..-
..Stop { bgkillshuf }
.Folder play
..Start { bgfolderz }
..Skip { got.folderskip }
..-
..Stop { bgfoldkill }
.Last 5 Played
..$got.menuf(1) { got.almost 1 }
..$got.menuf(2) { got.almost 2 }
..$got.menuf(3) { got.almost 3 }
..$got.menuf(4) { got.almost 4 }
..$got.menuf(5) { got.almost 5 }
.-
.List
..Create file { bglistor 2 }
..Update file { bglistorcopy }
..-
..View List { bgviewlist }
..Setup List { got.listsetup }
..-
..Advertise { bglistaddy }
.-
.Options
..Main Setup { bgmp3setup }
..Locations { bgmp3local }
..-
..Unload { bghatesme }
..-
..About Us { got.aboot }
.Advertise { bgadvertise }
}
alias got.menuf { return $1 $+ . $iif( $gettok($got.read(mp3favplace),$1,124) != $null ,$remove($nopath($replace($gettok($got.read(mp3favplace),$1,124),$chr(42),$chr(32))),.mp3), N/A) }
alias got.almost { got.write mp3replay $gettok($got.read(mp3favplace),$$1,124) | bgreplay 1 }
alias bgviewlist { if ( $exists($shortfn($got.read(mp3list))) == $true ) { .run $got.read(mp3list) } | else { got.eco You must have a list made before you may view it } }
on 1:text:*:*:{ if ( $1 == ! $+ $me $+ -gotmp3 ) { dcc send $nick $got.q($script) } }
alias bgmp3setup {
if ( $dialog(gotilla.setup) != $null ) { dialog -v gotilla.setup | halt }
dialog -m gotilla.setup gotilla.setup
set %a 6
:toperz
did -a gotilla.setup %a White | did -a gotilla.setup %a Black | did -a gotilla.setup %a Blue | did -a gotilla.setup %a Green | did -a gotilla.setup %a Lt Red | did -a gotilla.setup %a Brown | did -a gotilla.setup %a Purple | did -a gotilla.setup %a Orange
did -a gotilla.setup %a Yellow | did -a gotilla.setup %a Lt Green | did -a gotilla.setup %a Cyan | did -a gotilla.setup %a Lt Cyan | did -a gotilla.setup %a Lt Blue | did -a gotilla.setup %a Pink | did -a gotilla.setup %a Grey | did -a gotilla.setup %a Lt Grey
if ( %a == 9 ) { goto next }
set %a 9
goto toperz
:next
did -c gotilla.setup 6 $calc( $got.read(mp3color1) +1 )
did -c gotilla.setup 9 $calc( $got.read(mp3color2) +1 )
if ( $got.read(mp3advert) == on ) { did -c gotilla.setup 3 | did -o gotilla.setup 3 1 Advertise to all } | else if ( $got.read(mp3advert) == onff ) { did -cu gotilla.setup 3 | did -o gotilla.setup 3 1 Do not advertise } | else { did -o gotilla.setup 3 1 Advertise to active }
if ( $got.read(mp3want) == on ) { did -c gotilla.setup 11 } | if ( $got.read(mp3length) == on ) { did -c gotilla.setup 12 } | if ( $got.read(mp3nocunt) == on ) { did -c gotilla.setup 13 }
if ( $got.read(mp3ison4) == on ) { did -c gotilla.setup 14 } | if ( $got.read(mp3ison1) == on ) { did -c gotilla.setup 15 } | if ( $got.read(mp3ison2) == on ) { did -c gotilla.setup 17 }
if ( $got.read(mp3ison3) == on ) { did -c gotilla.setup 16 } | if ( $got.read(mp3autosend) == on ) { did -c gotilla.setup 21 } | if ( $got.read(mp3locator) == on ) { did -c gotilla.setup 24 }
if ( $got.read(mp3request) == on ) { did -c gotilla.setup 27 } | if ( $got.read(mp3ctcpsend) == on ) { did -c gotilla.setup 26 } | if ( $got.read(mp3rancolor) == on ) { did -c gotilla.setup 25 }
.timer -m 1 1 did -ra gotilla.setup 22 $got.read(mp3dccmax) | if ( $got.read(mp3nocunt) == on ) { did -b gotilla.setup 6,9,25 } | else { did -e gotilla.setup 6,9,25 }
if ( $did(gotilla.setup,21).state == 0 ) { did -b gotilla.setup 22 } | else { did -e gotilla.setup 22 }
}
on *:dialog:gotilla.setup:sclick:*:{
if ( $did == 1 ) {
if ( $did(3).state == 0 ) { got.write mp3advert off } | else if ( $did(3).state == 1 ) { got.write mp3advert on } | else { got.write mp3advert onff }
got.write mp3want $bgquick($did(11).state) | got.write mp3length $bgquick($did(12).state) | got.write mp3nocunt $bgquick($did(13).state)
got.write mp3ison4 $bgquick($did(14).state) | got.write mp3ison1 $bgquick($did(15).state) | got.write mp3ison2 $bgquick($did(17).state) | got.write mp3locator $bgquick($did(24).state)
got.write mp3autosend $bgquick($did(21).state) | got.write mp3ison3 $bgquick($did(16).state) | got.write mp3color1 $calc( $did(6).sel - 1 ) | got.write mp3color2 $calc( $did(9).sel - 1 )
got.write mp3request $bgquick($did(27).state) | got.write mp3ctcpsend $bgquick($did(26).state) | got.write mp3rancolor $bgquick($did(25).state)
got.write mp3dccmax $iif( $did(22).text != $null, $did(22).text, 0 )
if (( $got.read(mp3dccmax) <= 0 ) || ( $got.read(mp3dccmax) !isnum )) { got.write mp3autosend off }
}
if ( $did == 3 ) { if ( $did(3).state == 0 ) { did -o gotilla.setup 3 1 Advertise to active } | else if ( $did(3).state == 1 ) { did -o gotilla.setup 3 1 Advertise to all } | else { did -o gotilla.setup 3 1 Do not advertise } }
if ( $did == 20 ) { dialog -x gotilla.setup }
if ( $did == 21 ) { if ( $did(21).state == 0 ) { did -b gotilla.setup 22 } | else { did -e gotilla.setup 22 } }
if ( $did == 13 ) { if ( $did(13).state == 0 ) { did -e gotilla.setup 6,9,25 } | else { did -b gotilla.setup 6,9,25 } }
}
on *:dialog:gotilla.local:sclick:*:{
if ( $did == 1 ) {
if ( $right($did(4).text,1) == \ ) { .timer -m 1 1 got.write mp3dir $did(4).text } | if ( $right($did(11).text,1) == \ ) { .timer -m 1 1 got.write mp3dir2 $did(11).text } | if ( $right($did(7).text,4) == .exe ) { .timer -m 1 1 got.write mp3player $did(7).text }
got.write mp32dir $bgquick($did(13).state)
}
if ( $did == 8 ) { .timer -m 1 1 got.dir 4 } | if ( $did == 9 ) { .timer -m 1 1 got.player } | if ( $did == 12 ) { .timer -m 1 1 got.dir 11 }
if ( $did == 13 ) { if ( $did(13).state == 0 ) { did -b gotilla.local 11 | did -b gotilla.local 12 } | else { did -e gotilla.local 11 | did -e gotilla.local 12 } }
}
dialog gotilla.local {
title "Gotilla MP3 Locations"
size -1 -1 380 105
box "Done?",5, 1 1 67 97
button "&OK",1,6 17 58 38,ok
button "&Cancel",2,6 55 58 38,cancel
text "MP3 Player",3,87 11 80 24
edit "",7,159 6 194 24,autohs
text "Main Directory",6,87 45 80 24
edit "",4,159 40 194 24,autohs
button "...",9,355 7 20 22
button "...",8,355 41 20 22
text "Directory #2",10,87 80 72 24
edit "",11,159 74 194 24,autohs
button "...",12,355 75 20 22
check "",13,70 75 14 24,left
}
alias got.dir { set %got.temp.1 $sdir="Where are your MP3's? ex. c:\mp3\" | if ( %got.temp.1 == $null ) { halt } | .timer -m 1 1 did -ra gotilla.local $$1 %got.temp.1 }
alias got.player { set %got.temp.1 $dir="Select your mp3 player" *.exe | if ( %got.temp.1 == $null ) { halt } | .timer -m 1 1 did -ra gotilla.local 7 %got.temp.1 }
alias bgmp3local {
if ( $dialog(gotilla.local) == $null ) { dialog -m gotilla.local gotilla.local }
.timer -m 1 1 did -ra gotilla.local 4 $got.read(mp3dir) | .timer -m 1 1 did -ra gotilla.local 7 $got.read(mp3player) | did -ra gotilla.local 11 $got.read(mp3dir2)
if ( $got.read(mp32dir) == on ) { did -c gotilla.local 13 }
if ( $did(gotilla.local,13).state == 0 ) { did -b gotilla.local 11 | did -b gotilla.local 12 } | else { did -e gotilla.local 11 | did -e gotilla.local 12 }
}
dialog gotilla.setup {
title "GoTilla MP3 Setup"
size -1 -1 468 122
box "Options",10,95 1 278 118
box "Autosends",19,377 1 90 90
edit "",22,388 64 70 20
text "Max DCC's",23,383 50 80 15,center
box "Colors",18,1 1 90 90
check "@locator",24,383 32 75 13
check "Enable",21,383 16 75 13
button "&Cancel",20,378 94 89 24
button "&OK",1,2 94 89 24,ok
text "#1",7,5 20 15 24,center
combo 6, 22 16 63 150,drop
text "#2",8,5 43 15 20,center
combo 9, 22 41 63 150,drop
check "",3,100 18 125 13,3state
check "Show Size",11,100 38 125 13
check "Show Length",12,100 58 125 13
check "Strip Control Codes",13,100 78 125 13
check "Remove Underscores",14,239 18 125 13
check "Show Bitrate",15,239 38 125 13
check "Show Quality",16,239 58 125 13
check "Show kHz's",17,239 78 125 13
check "Accept CTCP Requests",27,239 98 125 13
check "Send CTCP Requests",26,100 98 125 13
check "Random",25,7 66 78 20,push
}
dialog gotilla.playlist {
title "GoTilla Play List/Window"
size -1 -1 401 355
button "&Save and Close",7,295 3 104 20
button "&Close",16,225 3 70 20,cancel
box "Double Click to Play",12,3 21 396 153,center
edit "",17,1 1 122 20,read center
check "Sorted List",9,161 147 85 24,push
button "SKIP",8,85 301 74 24
button "STOP",1,159 301 79 24
button "REPLAY",10,238 301 74 24
check "SHUFFLE",14,312 301 84 24,push
list 102,5 36 392 101,extsel
button "PLAY",3,6 301 79 24
button "(+) Add File",4,6 327 70 24
button "(+) Add Folder",11,76 327 80 24
button "(-) Delete File",5,156 327 80 24
button "New",6,238 327 51 24
button "Load",66,289 327 53 24
button "Save",88,342 327 54 24
list 77,10 200 0 0,extsel
box "Playlist",13,3 175 396 179
list 2,5 191 392 125,extsel
button "Refresh",103,6 147 65 24
button "Add to playlist",104,71 147 90 24
button "Set c&hannel",105,125 3 100 20
button "Delete",106,246 147 70 24
button "Rename",107,316 147 80 24
button "S&earch",201,306 122 89 22,ok
edit "",202,5 122 300 22
}
alias got.windid6 {
if ( $?!="Are you sure you want to delete this file?" != $true ) { halt }
got.tsavr $did(gotilla.playlist,102,$did(gotilla.playlist,102,1).sel).text
dline @got.mp3.main $did(gotilla.playlist,102,1).sel
if ( %got.file == $null ) { did -d gotilla.playlist 102 1 | halt }
remove $got.q($got.com(%got.file)) | did -d gotilla.playlist 102 $did(gotilla.playlist,102,1).sel | dialog -v gotilla.playlist
}
alias got.chanset {
if ( $dialog(gotilla.chanset) == $null ) { dialog -om gotilla.chanset gotilla.chanset | dialog -v gotilla.playlist }
set %got.temp $calc( $chan(0) + 1 )
:toperz
dec %got.temp
if ( %got.temp == 0 ) { halt }
did -a gotilla.chanset 2 $chan(%got.temp)
goto toperz
}
dialog gotilla.chanset {
title "What Channel?"
size -1 -1 150 110
list 2,1 1 148 86
button "Select",1,2 86 146 23,ok
}
on *:dialog:gotilla.chanset:dclick:2:{ got.write mp3winchan $did(gotilla.chanset,2,$did(gotilla.chanset,2,1).sel).text | did -ra gotilla.playlist 17 $got.read(mp3winchan) | dialog -x gotilla.chanset | dialog -v gotilla.playlist }
on *:dialog:gotilla.chanset:sclick:1:{
if ( $did(gotilla.chanset,2,$did(gotilla.chanset,2,1).sel).text == $null ) { halt }
got.write mp3winchan $did(gotilla.chanset,2,$did(gotilla.chanset,2,1).sel).text | dialog -v gotilla.playlist
}
alias got.aboot { if ( $dialog(gotilla.aboot) == $null ) { dialog -m gotilla.aboot gotilla.aboot } }
dialog gotilla.aboot {
title "Released (8/8/99)"
size -1 -1 200 107
text "GoTilla MP3 v3.22",2,1 18 198 16,center
text "by Bucksmack",3,1 36 198 14,center
text "http://gotilla.cjb.net",4,1 55 198 14,center
box "About Us",5,1 1 198 80
button "&Goto our site!",1,2 82 97 24
button "&Close",6,102 82 97 24,ok
}
on *:dialog:gotilla.aboot:sclick:1:{ run http://gotilla.cjb.net }
dialog gotilla.mp3rename {
title "Rename me?"
size -1 -1 343 69
text "",1,3 2 398 16
edit "",3,2 18 340 24
button "ok",2,3 44 169 23
button "cancel",4,172 44 169 23,ok
}
alias got.windid7 {
if ( $dialog(gotilla.mp3rename) == $null ) { dialog -odm gotilla.mp3rename gotilla.mp3rename }
did -f gotilla.mp3rename 3
.timer -m 1 1 did -ra gotilla.mp3rename 1 Original: $did(gotilla.playlist,102,$did(gotilla.playlist,102,1).sel).text $+ .mp3
.timer -m 1 1 did -ra gotilla.mp3rename 3 $did(gotilla.playlist,102,$did(gotilla.playlist,102,1).sel).text $+ .mp3
set %got.playme.1 $did(gotilla.playlist,102,$did(gotilla.playlist,102,1).sel).text $+ .mp3
set %got.playme $findfile($got.read(mp3dir),%got.playme.1,1)
if (( %got.playme == $null ) && ( $got.read(mp32dir) == on )) { set %got.playme $findfile($got.read(mp3dir2),%got.playme.1,1) }
if ( %got.playme == $null ) { did -d gotilla.playlist 102 $did(gotilla.playlist,102,1).sel | dialog -x gotilla.mp3rename | halt }
}
on *:dialog:gotilla.mp3rename:sclick:*:{
if ( $did == 2 ) {
set %got.playme $remove($did(1).text,Original:)
set %got.playme.1 $replace(%got.playme,$chr(32),$chr(42))
set %got.playme $findfile($got.read(mp3dir),%got.playme.1,1)
if (( %got.playme == $null ) && ( $got.read(mp32dir) == on )) { set %got.playme $findfile($got.read(mp3dir2),%got.playme.1,1) }
if ( %got.playme == $null ) { goto end }
if ( $did(3).text isin $nopath(%got.playme) ) { got end }
if ( $right($did(3),4) == .mp3 ) { rename $got.q(%got.playme) " $+ $nofile(%got.playme) $+ $did(3).text $+ " }
else { rename $got.q(%got.playme) " $+ $nofile(%got.playme) $+ $did(3) $+ .mp3 $+ " }
did -o gotilla.playlist 102 $did(gotilla.playlist,102,1).sel $remove($did(3).text,.mp3)
:end
dialog -x gotilla.mp3rename | dialog -v gotilla.playlist
}
if ( $did == 4 ) { dialog -v gotilla.playlist }
}
on *:dialog:gotilla.playlist:dclick:102: {
bgtest0r
got.tsavr $did(gotilla.playlist,102,$did(gotilla.playlist,102,1).sel).text
if ( %got.file == $null ) { did -d gotilla.playlist 102 $did(gotilla.playlist,102,1).sel | halt }
bgfileplay $got.read(mp3winchan) %got.file
dialog -t gotilla.playlist Last Played: $remove($nopath(%got.file),.mp3)
got.end $got.read(mp3winchan) list
}
alias testies { aline @got.mp3.main $nopath($$1-) }
alias bgmp3playlist {
if ( $dialog(gotilla.playlist) == $null ) {
dialog -md gotilla.playlist gotilla.playlist
got.write mp3winchan # | did -ra gotilla.playlist 17 #
if ( $got.read(mp3sortlist) == on ) { did -c gotilla.playlist 9 }
if ( $exists($shortfn($mircdirogotlist.m3u)) == $true ) { bgplaylistload }
}
else { dialog -v gotilla.playlist | got.write mp3winchan # | did -ra gotilla.playlist 17 # | halt }
got.sortedlist
}
alias bgplaylistload {
unset %got.temp.* | set %got.temp.1 $lines($mircdirogotlist.m3u)
:toperz
inc %got.temp.2
if ( %got.temp.2 == $calc( %got.temp.1 + 1 ) ) { goto end }
var %1 = $read -l $+ %got.temp.2 $shortfn($mircdirogotlist.m3u)
did -a gotilla.playlist 2 $nopath(%1)
did -a gotilla.playlist 77 $read -l $+ %got.temp.2 $shortfn($mircdirogotlist.m3u)
goto toperz
:end
}
on *:dialog:gotilla.playlist:sclick:201:{
if ( $window(@got.mp3.main) == $null ) { got.sortedlist }
set %got.temp.1 * $+ $replace($did(gotilla.playlist,202).text,$chr(32),$chr(42)) $+ *
if ( $fline(@got.mp3.main,%got.temp.1,1) != $null ) { did -c gotilla.playlist 102 $fline(@got.mp3.main,%got.temp.1,1) }
halt
}
alias got.sortedlist {
did -r gotilla.playlist 102 | window -c @got.mp3.main | window -hn $+ $iif( $got.read(mp3sortlist) == on ,s) @got.mp3.main
var %got.temp.2 = $findfile($got.read(mp3dir),*.mp3,*,testies $$1-)
if ( $got.read(mp32dir) == on ) { set %got.temp.2 $findfile($got.read(mp3dir2),*.mp3,*,testies $$1-) }
var %got.temp.1 = $line(@got.mp3.main,0)
set %got.temp.2 0
:toperz | inc %got.temp.2 | if ( %got.temp.2 == $calc( %got.temp.1 +1 ) ) { halt } | did -a gotilla.playlist 102 $remove($line(@got.mp3.main,%got.temp.2),.mp3) | goto toperz
}
on *:dialog:gotilla.playlist:sclick:*:{
if ( $did == 16 ) { dialog -x gotilla.playlist | .timerplaylist off }
if ( $did == 9 ) { got.write mp3sortlist $bgquick($did(9).state) }
if ( $did == 1 ) { .timer -m 1 1 bgplaylistkill }
if ( $did == 3 ) { if ( $timer(playlist) == $null ) { .timer -m 1 1 bgplaylist2 } }
if ( $did == 4 ) { .timer -m 1 1 bgplaylist4 }
if ( $did == 5 ) { if ( $did(gotilla.playlist,2,0).sel == 0 ) { halt } | else { .timer -m 1 1 bgdid104 2 } }
if ( $did == 7 ) { haltdef | .timer -m 1 1 bgwindidclose }
if ( $did == 6 ) { did -r gotilla.playlist 2,77 | .remove $shortfn($mircdirogotlist.m3u) }
if ( $did == 8 ) { if ( $timer(playlist) != $null ) { .timer -m 1 1 bgplaylist2 } }
if ( $did == 11 ) { .timer -m 1 1 bgsowhat }
if ( $did == 10 ) { if ( $timer(playlist) != $null ) { .timer -m 1 1 bgsowhat2 } }
if ( $did == 103 ) { got.sortedlist }
if ( $did == 104 ) { if ( $did(gotilla.playlist,102,0).sel == 0 ) { halt } | else { .timer -m 1 1 bgdid104 102 } }
if ( $did == 105 ) { .timer -m 1 1 got.chanset }
if ( $did == 106 ) { if ( $did(gotilla.playlist,102,1).sel != $null ) { .timer -m 1 1 got.windid6 } }
if ( $did == 107 ) { if ( $did(gotilla.playlist,102,1).sel != $null ) { .timer -m 1 1 got.windid7 } }
if ( $did == 66 ) { .timer -m 1 1 got.m.d66 }
if ( $did == 88 ) { .timer -m 1 1 got.m.oops }
}
alias got.m.oops {
var %1,%2,%3 = 0
set %1 $$sdir="Where would you like to save the playlist?" [ $got.read(mp3dir) ]
set %1 $shortfn(%1) $+ $replace($$?="Please choose a filename. (no extension)",$chr(32),$chr(95)) $+ .m3u
if ( $isfile($shortfn(%1)) ) { if ( $?!="The specified, would you like to overwrite it?" ) { .remove $shortfn(%1) } | else { halt } }
if ( $did(gotilla.playlist,77).lines == 0 ) { halt }
else { set %2 $did(gotilla.playlist,77).lines }
:toperz | inc %3 | if ( %3 > %2 ) { dialog -t gotilla.playlist Saved playlist to %1 $+ ! | dialog -v gotilla.playlist | halt } | got.tsavr $remove($nopath($did(gotilla.playlist,77,%3).text),.mp3) | if ( %got.file == $null ) { goto toperz } | write $shortfn(%1) %got.file | goto toperz
}
alias got.m.d66 {
var %1 = $$dir="Choose an m3u to load" [ [ $got.read(mp3dir) $+ *.m3u ] ] | var %2 = $nofile(%1) , %3 = $lines($shortfn(%1)) , %4 = 0 , %5
did -r gotilla.playlist 77,2
:toperz
inc %4
if ( %4 == $calc(%3 + 1) ) { dialog -t gotilla.playlist Succesfully loaded %1 $+ ! | dialog -v gotilla.playlist | halt }
set %5 $read -l $+ %4 $shortfn(%1)
if ( : !isin $left( %5 ,2) ) { did -a gotilla.playlist 77 %2 $+ $read -l $+ %4 $shortfn(%1) } | else { did -a gotilla.playlist 77 $read -l $+ %4 $shortfn(%1) } | did -a gotilla.playlist 2 $remove($nopath($did(gotilla.playlist,77,%4)),.mp3)
goto toperz
}
alias bgdid104 { var %got.temp.1 = $calc( $did(gotilla.playlist,$$1,0).sel + 1 ) | :toperz | dec %got.temp.1 | if ( %got.temp.1 == 0 ) { halt } | if ( $$1 == 2 ) { did -d gotilla.playlist 2,77 $did(gotilla.playlist,2,%got.temp.1).sel } | if ( $$1 == 102 ) { did -a gotilla.playlist 2,77 $did(gotilla.playlist,102,$did(gotilla.playlist,102,%got.temp.1).sel).text } | goto toperz }
alias bgsowhat2 {
BGtest0r 1
if ( $exists($shortfn($replace($got.read(mp3replay),$chr(42),$chr(32)))) == $false ) { halt }
set %got.file $replace($got.read(mp3replay),$chr(42),$chr(32))
bgfileplay $got.read(mp3winchan) %got.file
if ( $mpegtime($got.q($got.com(%got.file))) == $null ) { if ( $lof(%got.file) == $null ) { got.eco Could not use id3 tag, next mp3 in 3min 30sec... | .timerfoldplay 1 210 bgplaylist2 } | else { got.eco Could not use id3 tag, next mp3 in $duration($calc($lof(%got.file) / 16000)) $+ ... | .timerfoldplay 1 $calc($lof(%got.file) / 16000) bgplaylist2 } }
else { .timerplaylist 1 $mpegtime($got.q($got.com(%got.file))) bgplaylist2 }
got.end $got.read(mp3winchan) playlist
}
alias bgwindidclose {
if ( $did(gotilla.playlist,77).lines == 0 ) { .remove $shortfn($mircdirogotlist.m3u) | goto end }
unset %got.temp.* | set %got.temp.1 $did(gotilla.playlist,77).lines
if ( $exists($mircdirogotlist.m3u) == $true ) { .remove $shortfn($mircdirogotlist.m3u) }
:toperz | inc %got.temp.2 | if ( %got.temp.2 == $calc( %got.temp.1 + 1 ) ) { goto end } | write $mircdirogotlist.m3u $did(gotilla.playlist,77,%got.temp.2).text | goto toperz | :end | dialog -x gotilla.playlist | .timerplaylist off
}
alias bgsowhat {
set %got.playlist.1 $sdir="Choose a Folder" $got.read(mp3dir)
if (( %got.playlist.1 == $null ) || ( $findfile(%got.playlist.1,*.mp3,*) == 0 )) { dialog -v gotilla.playlist | halt }
dialog -v gotilla.playlist
return $findfile(%got.playlist.1,*.mp3,*,bggowhat $$1-)
}
alias bggowhat { did -a gotilla.playlist 2 $remove($nopath($$1-),.mp3) | did -a gotilla.playlist 77 $$1- }
alias bgplaylist4 {
set %got.playlist.1 $dir="Choose an MP3 to add" $got.read(mp3dir)
if (( %got.playlist.1 == $null ) || ( .mp3 !isin %got.playlist.1)) { dialog -v gotilla.playlist | halt }
did -a gotilla.playlist 2 $remove($nopath(%got.playlist.1),.mp3) | did -a gotilla.playlist 77 %got.playlist.1 | dialog -v gotilla.playlist
}
alias bgplaylist2 {
bgtest0r 1
if ( $did(gotilla.playlist,2).lines == 0 ) { halt }
if ( $did(gotilla.playlist,14).state == 1 ) { set %got.temp $rand(1,$did(gotilla.playlist,77).lines) | set %got.playme $did(gotilla.playlist,77,%got.temp).text | did -d gotilla.playlist 2,77 %got.temp }
else { set %got.playme $did(gotilla.playlist,77,1).text | did -d gotilla.playlist 2,77 1 }
if ( : isin $left(%got.playme,2) ) { set %got.file $findfile($nofile(%got.playme),$replace($nopath(%got.playme),$chr(32),$chr(42)),1) }
else { got.tsavr %got.playme }
if ( %got.file == $null ) { .timer -m 1 1 bgplaylist2 }
bgfileplay $got.read(mp3winchan) %got.file
if ( $mpegtime($got.q($got.com(%got.file))) == $null ) { if ( $lof(%got.file) == $null ) { got.eco Could not use id3 tag, next mp3 in 3min 30sec... | .timerfoldplay 1 210 bgplaylist2 } | else { got.eco Could not use id3 tag, next mp3 in $duration($calc($lof(%got.file) / 16000)) $+ ... | .timerfoldplay 1 $calc($lof(%got.file) / 16000) bgplaylist2 } }
else { .timerplaylist 1 $mpegtime($got.q($got.com(%got.file))) bgplaylist2 }
dialog -t gotilla.playlist Last Played: $remove($nopath(%got.file),.mp3)
got.end $got.read(mp3winchan) playlist
}
alias bgplaylistkill { if ( $timer(playlist) != $null ) { .timerplaylist off | got.eco List play has been stopped | bgSTOP } | else { bgstop } }
alias got.q { return " [ $+ [ $1- ] $+ ] " }
;-------------------------
;ID3 ALIASES(below) coutesy of ------==== w|dget(widget01@hotmail.com) ====------
;~Some modifiations have been made by Bucksmack
;-------------------------
alias mpegver {
if ( $exists($remove($1-,")) == $false ) { return $null }
unset %mtmp
if ( RIFF isin [ $read -l1 $1- ] ) { bread $1- 72 2 &mpeg | goto after }
bread $1- 1 1 &mpeg
:after
%mtmp = $b2d($bvar(&mpeg,1))
if ($mid(%mtmp,4,2) = 00) { return Mpeg 2.5 }
elseif ($mid(%mtmp,4,2) = 10) { return Mpeg 2.0 }
elseif ($mid(%mtmp,4,2) = 11) { return Mpeg 1.0 }
}
alias mpegtime { return $int($calc(($lof($remove($1-,")) * 8) / ($mpegbitrate($1-)*1000))) }
alias mpegbitrate {
if ( $exists($remove($1-,")) == $false ) { return $null }
unset %mtmp
if ($mpegver($1-) == Mpeg 1.0 ) { goto mpeg1 }
elseif ($mpegver($1-) == Mpeg 2.0 ) { goto mpeg2 }
elseif ($mpegver($1-) == Mpeg 2.5 ) { goto mpeg2.5 }
:mpeg1
if ( RIFF isin [ $read -l1 $1- ] ) { bread $1- 74 2 &mpeg | goto riff }
bread $1- 2 2 &mpeg
:riff
%mtmp = $left($b2d($bvar(&mpeg,1)),4)
if (%mtmp == 0001) { return 32 } | elseif (%mtmp == 0010) { return 40 } | elseif (%mtmp == 0011) { return 48 } | elseif (%mtmp == 0100) { return 56 } | elseif (%mtmp == 0101) { return 64 } | elseif (%mtmp == 0110) { return 80 }
elseif (%mtmp == 0111) { return 96 } | elseif (%mtmp == 1000) { return 112 } | elseif (%mtmp == 1001) { return 128 } | elseif (%mtmp == 1010) { return 160 } | elseif (%mtmp == 1011) { return 192 } | elseif (%mtmp == 1100) { return 224 }
elseif (%mtmp == 1101) { return 256 } | elseif (%mtmp == 1111) { return 320 }
:mpeg2
if ( RIFF isin [ $read -l1 $1- ] ) { bread $1- 74 2 &mpeg | goto riff2 }
bread $1- 2 2 &mpeg
:riff2
%mtmp = $left($b2d($bvar(&mpeg,1)),4)
if (%mtmp == 0001) { return 8 } | elseif (%mtmp == 0010) { return 16 } | elseif (%mtmp == 0011) { return 24 } | elseif (%mtmp == 0100) { return 32 } | elseif (%mtmp == 0101) { return 40 } | elseif (%mtmp == 0110) { return 48 }
elseif (%mtmp == 0111) { return 56 } | elseif (%mtmp == 1000) { return 64 } | elseif (%mtmp == 1001) { return 80 } | elseif (%mtmp == 1010) { return 96 } | elseif (%mtmp == 1011) { return 112 } | elseif (%mtmp == 1100) { return 128 }
elseif (%mtmp == 1101) { return 144 } | elseif (%mtmp == 1111) { return 160 }
:mpeg2.5
if ( RIFF isin [ $read -l1 $1- ] ) { bread $1- 74 2 &mpeg | goto riff3 }
bread $1- 2 2 &mpeg
:riff3
%mtmp = $left($b2d($bvar(&mpeg,1)),4)
if (%mtmp == 0001) { return 8 } | elseif (%mtmp == 0010) { return 16 }
}
alias b2d {
unset %vf | if ( $1 & 1 ) inc %vf | if ( $1 & 2 ) inc %vf 10 | if ( $1 & 4 ) inc %vf 100 | if ( $1 & 8 ) inc %vf 1000 | if ( $1 & 16 ) inc %vf 10000 | if ( $1 & 32 ) inc %vf 100000 | if ( $1 & 64 ) inc %vf 1000000 | if ( $1 & 128 ) inc %vf 10000000
else if ( $len(%vf) < 8 ) { %tpl = $len(%vf) | %tpr = $calc(8 - %tpl) | set %tpc $str($chr(48),%tpr) | set %vf %tpc $+ %vf }
return %vf
}
alias mpegsmplrate {
if ( $exists($remove($1-,")) == $false ) { return $null }
unset %mtmp
if ($mpegver($1-) == Mpeg 1.0 ) { goto mpeg1 }
elseif ($mpegver($1-) == Mpeg 2.0 ) { goto mpeg2 }
elseif ($mpegver($1-) == Mpeg 2.5 ) { goto mpeg2.5 }
:mpeg1
if ( RIFF isin [ $read -l1 $1- ] ) { bread $1- 74 2 &mpeg | goto riff }
bread $1- 2 1 &mpeg
:riff
%mtmp = $mid($b2d($bvar(&mpeg,1)),5,2) | if (%mtmp == 00) { return 44 } | elseif (%mtmp == 01) { return 48 } | elseif (%mtmp == 10) { return 32 }
:mpeg2
if ( RIFF isin [ $read -l1 $1- ] ) { bread $1- 74 2 &mpeg | goto riff2 }
bread $1- 2 1 &mpeg
:riff2
%mtmp = $mid($b2d($bvar(&mpeg,1)),5,2) | if (%mtmp == 00) { return 22 } | elseif (%mtmp == 01) { return 24 } | elseif (%mtmp == 10) { return 16 }
:mpeg2.5
if ( RIFF isin [ $read -l1 $1- ] ) { bread $1- 74 2 &mpeg | goto riff3 }
bread $1- 2 1 &mpeg
:riff3
%mtmp = $mid($b2d($bvar(&mpeg,1)),5,2) | if (%mtmp == 00) { return 11 } | elseif (%mtmp == 01) { return 12 } | elseif (%mtmp == 10) { return 8 }
}
alias mpegcmode {
if ( $exists($remove($1-,")) == $false ) { return $null }
unset %mtmp
if ( RIFF isin [ $read -l1 $1- ] ) { bread $1- 74 2 &mpeg | goto riff }
bread $1- 3 1 &mpeg
:riff
if ($bvar(&mpeg,1) = 0) { %mtmp = 00000000 | goto after }
%mtmp = $left($b2d($bvar(&mpeg,1)),2)
:after
if (%mtmp == 00) { return Stereo }
elseif (%mtmp == 01) { return Joint Stereo }
elseif (%mtmp == 10) { return Dual Channel }
elseif (%mtmp == 11) { return Mono }
}