diff --git a/applications/cactusjukebox/source/cactusjukebox.lpi b/applications/cactusjukebox/source/cactusjukebox.lpi index 54bc64d45..4b6dc1746 100644 --- a/applications/cactusjukebox/source/cactusjukebox.lpi +++ b/applications/cactusjukebox/source/cactusjukebox.lpi @@ -21,8 +21,59 @@ - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/applications/cactusjukebox/source/cactusjukebox.pas b/applications/cactusjukebox/source/cactusjukebox.pas index c3c57288e..569279528 100644 --- a/applications/cactusjukebox/source/cactusjukebox.pas +++ b/applications/cactusjukebox/source/cactusjukebox.pas @@ -42,7 +42,11 @@ begin {$ifdef CactusDebug} CVerbosityLevel:=9; {$else} - CVerbosityLevel:=1; + {$ifdef Windows} + CVerbosityLevel:=0; + {$else} + CVerbosityLevel:=1; + {$endif} {$endif} DebugOutLn('', 1); diff --git a/applications/cactusjukebox/source/mainform.pas b/applications/cactusjukebox/source/mainform.pas index ab1b0335c..fb48c8f97 100644 --- a/applications/cactusjukebox/source/mainform.pas +++ b/applications/cactusjukebox/source/mainform.pas @@ -977,7 +977,7 @@ var tmppos: integer; fileobj: TMediaFileClass; begin - DebugOutLn('[TMain.playtimerTimer] START', 1); + DebugOutLn('[TMain.playtimerTimer] START', 3); try // if PlayerObj.playing=false then stopClick(nil); if PlayerObj.PlaybackMode = STREAMING_MODE then @@ -1001,18 +1001,18 @@ begin playwin.TimeImg.Canvas.Font.Color := ClNavy; playwin.TimeImg.Canvas.TextOut(5, 3, pnlPlaytime.Caption); - DebugOutLn('[TMain.playtimerTimer] B', 1); + DebugOutLn('[TMain.playtimerTimer] B', 3); - DebugOutLn(Format('[TMain.playtimerTimer] tmppos=%d', [tmppos]), 1); + DebugOutLn(Format('[TMain.playtimerTimer] tmppos=%d', [tmppos]), 3); tmppos := PlayerObj.Get_FilePosition; trackbar.position := tmppos; x2 := (trackbar.position * 2) - 3; if x2 < 3 then x2 := 3; - DebugOutLn('[TMain.playtimerTimer] D', 1); + DebugOutLn('[TMain.playtimerTimer] D', 3); if (tmppos = 100) then begin - DebugOutLn('[TMain.playtimerTimer] E', 1); + DebugOutLn('[TMain.playtimerTimer] E', 3); // writeln('nexttrack'); // WriteLn(PlayerObj.CurrentTrack); if (PlayerObj.CurrentTrack < PlayerObj.Playlist.ItemCount) then @@ -1022,7 +1022,7 @@ begin end; if CactusConfig.CoverDownload and (CoverFound = False) and (LoopCount < 20) then begin - DebugOutLn('[TMain.playtimerTimer] F', 1); + DebugOutLn('[TMain.playtimerTimer] F', 3); Inc(LoopCount); if (assigned(LastFMAPI)) and (LastFMAPI.data_ready) then begin @@ -1042,17 +1042,17 @@ begin end else if (LoopCount >= 20) and (CoverFound = False) then CoverImage.Picture.Clear; - DebugOutLn('[TMain.playtimerTimer] G', 1); + DebugOutLn('[TMain.playtimerTimer] G', 3); end else begin - DebugOutLn('[TMain.playtimerTimer] H', 1); + DebugOutLn('[TMain.playtimerTimer] H', 3); {playtimer.Enabled:=false}; end; except DebugOutLn('CAUGHT EXCEPTION IN PLAYTIMER!!!!', 1); end; - DebugOutLn('[TMain.playtimerTimer] END', 1); + DebugOutLn('[TMain.playtimerTimer] END', 3); end; //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ diff --git a/applications/cactusjukebox/source/mplayer.pas b/applications/cactusjukebox/source/mplayer.pas index 895d1ad29..6a50f4124 100644 --- a/applications/cactusjukebox/source/mplayer.pas +++ b/applications/cactusjukebox/source/mplayer.pas @@ -95,14 +95,17 @@ const MPLAYER_BINARY='mplayer.exe'; //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ procedure TMPlayerClass.SendCommand(cmd: string); begin - DebugOutLn('[TMPlayerClass.sendcommand] START cmd=' + cmd, 1); - cmd:=cmd+#13#10; //MPLayer always needs #10 as Lineending, no matter if win32 or linux + DebugOutLn('[TMPlayerClass.sendcommand] START cmd=' + cmd, 3); + cmd:=cmd+#10; //MPLayer always needs #10 as Lineending, no matter if win32 or linux try - DebugOutLn('[TMPlayerClass.sendcommand] 2', 1); - if GetMPlayerPlaying then MPlayerProcess.Input.write(cmd[1], length(cmd)); - DebugOutLn('[TMPlayerClass.sendcommand] 3', 1); + if GetMPlayerPlaying then + begin + DebugOutLn('[TMPlayerClass.sendcommand] 2', 3); + MPlayerProcess.Input.write(cmd[1], length(cmd)); + end; + DebugOutLn('[TMPlayerClass.sendcommand] 3', 3); except - DebugOutLn('EXCEPTION sending command to mplayer', 1); + DebugOutLn('EXCEPTION sending command to mplayer', 3); end; end; //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ @@ -180,7 +183,7 @@ function TMPlayerClass.play(index: integer): byte; var MPOptions: String; begin - DebugOutLn('[TMPlayerClass.play]', 1); + DebugOutLn('[TMPlayerClass.play]', 3); if (index=0) then begin if (FileExists(playlist.items[index].path)) then @@ -214,7 +217,7 @@ begin if MPlayerProcess.Running then begin - DebugOutLn('MPlayerProcess is Running', 1); + DebugOutLn('MPlayerProcess is Running', 3); FCurrentTrack:=index; FPlaying:=true; Playlist.Items[index].Played:=true; @@ -385,17 +388,17 @@ var tmps: string; i:integer; begin - DebugOutLn('[TMPlayerClass.Get_FilePosition] START', 1); + DebugOutLn('[TMPlayerClass.Get_FilePosition] START', 3); if GetMPlayerPlaying then begin - DebugOutLn('[TMPlayerClass.Get_FilePosition] A', 1); + DebugOutLn('[TMPlayerClass.Get_FilePosition] A', 3); i:=0; repeat SendCommand('get_property percent_pos'); sleep(8); tmps:=GetProcessOutput; inc(i); - DebugOutLn('[TMPlayerClass.Get_FilePosition] ' + tmps, 1); + DebugOutLn('[TMPlayerClass.Get_FilePosition] ' + tmps, 3); until (pos('percent_pos', tmps)>0) or (i>=5); // writeln('getpos'); @@ -412,7 +415,7 @@ begin result:=-1; if (result=-1) and (FLastGet_Pos>0) then Result:=100; - DebugOutLn('[TMPlayerClass.Get_FilePosition] END', 1); + DebugOutLn('[TMPlayerClass.Get_FilePosition] END', 3); end; //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ function TMPlayerClass.get_FileLength: longint;