From c3a168743616db6606702db5ad0fecab4dfee3da Mon Sep 17 00:00:00 2001 From: Alexey Kulakov Date: Thu, 24 Apr 2014 14:55:20 +0000 Subject: Miranda API update Watrack refactoring, API changes git-svn-id: http://svn.miranda-ng.org/main/trunk@9068 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/Watrack/myshows/myshows.pas | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) (limited to 'plugins/Watrack/myshows/myshows.pas') diff --git a/plugins/Watrack/myshows/myshows.pas b/plugins/Watrack/myshows/myshows.pas index f09cc3cf08..75e5e182d5 100644 --- a/plugins/Watrack/myshows/myshows.pas +++ b/plugins/Watrack/myshows/myshows.pas @@ -27,8 +27,10 @@ type end; var msh_tries, +// msh_timeout, msh_scrobpos:integer; sic:THANDLE; +// slastinf:THANDLE; slast:THANDLE; MSData:tMyShowsData; const @@ -90,7 +92,7 @@ begin if (msh_login <>nil) and (msh_login^ <>#0) and (msh_password<>nil) and (msh_password^<>#0) then - mir_forkthread(@ThScrobble,nil); + {CloseHandle}(mir_forkthread(@ThScrobble,nil)); end; function NewPlStatus(wParam:WPARAM;lParam:LPARAM):int;cdecl; @@ -109,6 +111,7 @@ begin begin if pSongInfo(lParam).width>0 then // for video only begin +//!! if ServiceExists(MS_JSON_GETINTERFACE)<>0 then begin timervalue:=integer(pSongInfo(lParam).total)*10*msh_scrobpos; // 1000(msec) div 100(%) if timervalue=0 then @@ -145,7 +148,8 @@ begin WAT_EVENT_PLAYERSTATUS: begin case integer(loword(lParam)) of - WAT_PLS_NOMUSIC,WAT_PLS_NOTFOUND: begin + WAT_PLS_STOPPED, + WAT_PLS_NOTFOUND: begin if hTimer<>0 then begin KillTimer(0,hTimer); @@ -254,6 +258,7 @@ end; var plStatusHook:THANDLE; + function InitProc(aGetStatus:boolean=false):integer; begin // slastinf:=CreateServiceFunction(MS_WAT_MYSHOWSINFO,@SrvMyShowsInfo); @@ -285,7 +290,9 @@ end; procedure DeInitProc(aSetDisable:boolean); begin if aSetDisable then - SetModStatus(0); + SetModStatus(0) + else +;// DestroyServiceFunction(slastinf); DestroyServiceFunction(slast); UnhookEvent(plStatusHook); @@ -320,7 +327,6 @@ begin mmyshows.Check :=nil; mmyshows.ModuleName:='MyShows.ru'; ModuleLink :=@mmyshows; - end; begin -- cgit v1.2.3