You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
206 lines
4.4 KiB
206 lines
4.4 KiB
|
|
|
|
%Xmms_play=$mp3player.getfilename;
|
|
|
|
|
|
|
|
%Prefix = $str.left(%Xmms_play,4)
|
|
%Postfix = $str.right(%Xmms_play,4)
|
|
%Http_prefix = "http"
|
|
%Cda_postfix = ".cda"
|
|
if(%Prefix == %Http_prefix) {
|
|
|
|
%Stime = $($mp3player.gettime/1000)
|
|
%Mtime = 0
|
|
%Ctime =" ";
|
|
|
|
while(%Stime > 59) {
|
|
%Mtime++
|
|
%Stime-=60
|
|
}
|
|
|
|
%Htime=0
|
|
|
|
while(%Mtime > 59) {
|
|
%Htime++
|
|
%Mtime-=60
|
|
}
|
|
|
|
if (%Stime < 10){
|
|
%tmp = %Stime
|
|
%Stime = $str.append("0",%tmp)
|
|
}
|
|
if (%Mtime < 10 && %Htime > 1){
|
|
%tmp = %Mtime
|
|
%Mtime = $str.append("0",%tmp)
|
|
}
|
|
|
|
|
|
|
|
if (%Htime > 0)
|
|
%Ctime = $str.append %Htime:%Mtime:%Stime
|
|
|
|
|
|
|
|
if (%Mtime > 0 && %Htime < 1)
|
|
%Ctime = $str.append %Mtime:%Stime
|
|
|
|
|
|
|
|
if (%Mtime < 1 && %Htime < 1)
|
|
%Ctime = %Stime
|
|
|
|
|
|
|
|
me muckelt grad [$mp3player.gettitle @ %Xmms_play - $($mp3player.getrate/1000) kbps - $($mp3player.getfreq/1000) kHz - seit: %Ctime (h:m:s)]
|
|
}
|
|
else if(%Postfix == %Cda_postfix) {
|
|
me muckelt grad [$mp3player.gettitle - Audio CD]
|
|
|
|
}
|
|
|
|
|
|
else {
|
|
|
|
if ($mp3player.getchannels == 2)
|
|
%Channels = Stereo
|
|
else
|
|
%Channels = Mono
|
|
|
|
%Frequ = $mp3player.getfreq
|
|
%Frequ2 = $(%Frequ/1000)
|
|
|
|
%tmins = $($mp3player.getlength / 60000)
|
|
%tsecs = $(($mp3player.getlength % 60000) / 1000)
|
|
%tsecs1 = $(%tsecs / 10)
|
|
%tsecs2 = $(%tsecs % 10)
|
|
%mins = $($mp3player.gettime / 60000)
|
|
%secs = $(($mp3player.gettime % 60000) / 1000)
|
|
%secs1 = $(%secs / 10)
|
|
%secs2 = $(%secs % 10)
|
|
%rate = $($mp3player.getrate / 1000)
|
|
%size = $file.size("$mp3player.getfilename")
|
|
%msize = $(%size / (1024*1024))
|
|
%ksize = $((%size - ((%size / (1024*1024)) * 1024 * 1024) - (%size % 1024)) / 1024)
|
|
|
|
%bsize = $(%size % 1024)
|
|
|
|
if(%msize > 0)
|
|
{
|
|
%size = "%msize MByte %ksize KByte"
|
|
}else{
|
|
if(%ksize > 0)
|
|
{
|
|
%size = "%ksize KByte %bsize Byte"
|
|
}else{
|
|
%size = "%bsize Byte"
|
|
}
|
|
}
|
|
if ($mp3player.isplaying){
|
|
|
|
if($mp3player.getmp3tag_artist != ""){
|
|
%outartist= $mp3player.getmp3tag_artist
|
|
}
|
|
else {
|
|
%outartist=""
|
|
}
|
|
if ($mp3player.getmp3tag_title != ""){
|
|
%outtitle= $mp3player.getmp3tag_title
|
|
}
|
|
else {
|
|
%outtitle=""
|
|
}
|
|
if ((%outartitst != "") && (%outtitle != "")) {
|
|
%outartisttitle="["%outartitst" - "%autartisttitle"]"
|
|
}
|
|
else {
|
|
if (%outtitle == ""){
|
|
%outartisttitle="["%outartist"]"
|
|
}
|
|
else {
|
|
%outartisttitle="["%outtitle"]"
|
|
}
|
|
|
|
}
|
|
|
|
if (mp3player.getmp3tag_album !=""){
|
|
%outalbum =" - [Album: "$mp3player.getmp3tag_album"]"
|
|
}
|
|
else {
|
|
%outalbum =""
|
|
}
|
|
|
|
if (mp3player.getmp3tag_genre !=""){
|
|
%outgenre =" - [Genre: "$mp3player.getmp3tag_genre"]"
|
|
}
|
|
else {
|
|
%outgenre =""
|
|
}
|
|
|
|
|
|
if ($mp3player.getmp3tag_comment !=""){
|
|
%outcomment =" - [Comment: "$mp3player.getmp3tag_comment"]"
|
|
}
|
|
else {
|
|
%outcomment=""
|
|
}
|
|
if ($mp3player.getmp3tag_version != ""){
|
|
%outmp3tagversion = "MPEG"$mp3player.getmp3tag_version
|
|
}
|
|
else {
|
|
%outmp3tagversion=""
|
|
}
|
|
if ($mp3player.getmp3tag_layer != ""){
|
|
%outmp3taglayer = "Layer"$mp3player.getmp3tag_layer
|
|
}
|
|
else {
|
|
%outmp3taglayer = ""
|
|
}
|
|
if (%outmp3taglayer != "" && %outmp3tagversion != ""){
|
|
%outmp3tagversionlayer = " - ["%outmp3tagversion" - "%outmp3taglayer"]"
|
|
}
|
|
else {
|
|
%outmp3tagversionlayer= ""
|
|
if (%outmp3tagversion != ""){
|
|
%outmp3tagversionlayer= "["%mp3tagversion"]"
|
|
}
|
|
if (%outmp3taglayer != ""){
|
|
%outmp3tagversionlayer= "["%mp3taglayer"]"
|
|
}
|
|
|
|
}
|
|
|
|
|
|
%rate = $($mp3player.getrate/1000)
|
|
if (%rate != 0){
|
|
%outrate=" - ["%rate KBps"]"
|
|
}
|
|
else {
|
|
%outrate=""
|
|
}
|
|
if (%Frequ2 != 0){
|
|
%outfrequ2=" - ["%Frequ2 KHz"]"
|
|
}
|
|
else {
|
|
%outfrequ2=""
|
|
}
|
|
if (%Channels != 0){
|
|
%outchannels = " - ["%Channels"]"
|
|
}
|
|
else {
|
|
%outchannels=""
|
|
}
|
|
if (%size != 0){
|
|
%outsize = " - ["%size"]"
|
|
}
|
|
else {
|
|
%outsize=""
|
|
}
|
|
|
|
me muckelt grad %outartisttitle %outalbum %outgenre %outcomment %outmp3tagversionlayer %outrate %outfrequ2 - [%mins:%secs1%secs2 min of %tmins:%tsecs1%tsecs2 min] - [Player: $mp3player.getplayer ]
|
|
}
|
|
}
|
|
if (!$mp3player.isplaying){
|
|
me muckelt grad * nix *
|
|
|
|
} |