diff options
author | Alexey Kulakov <panda75@bk.ru> | 2014-01-16 03:11:48 +0000 |
---|---|---|
committer | Alexey Kulakov <panda75@bk.ru> | 2014-01-16 03:11:48 +0000 |
commit | de34b251b442cdf72b13c407d6b60c343c123bb3 (patch) | |
tree | a2e05db9606405b78b949ccc67860bb2096f1f5e /plugins/Watrack/myshows/myshows.pas | |
parent | 74220939c1156067d46ccb85cbc307737cd5a244 (diff) |
sync
git-svn-id: http://svn.miranda-ng.org/main/trunk@7674 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/Watrack/myshows/myshows.pas')
-rw-r--r-- | plugins/Watrack/myshows/myshows.pas | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/plugins/Watrack/myshows/myshows.pas b/plugins/Watrack/myshows/myshows.pas index 5715c530d9..a26c7dd4ae 100644 --- a/plugins/Watrack/myshows/myshows.pas +++ b/plugins/Watrack/myshows/myshows.pas @@ -28,6 +28,7 @@ type var
msh_tries,
msh_scrobpos:integer;
+ sic:THANDLE;
slast:THANDLE;
MSData:tMyShowsData;
const
@@ -108,7 +109,6 @@ 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
@@ -252,6 +252,8 @@ begin result:=0;
end;
+var
+ plStatusHook:THANDLE;
function InitProc(aGetStatus:boolean=false):integer;
begin
// slastinf:=CreateServiceFunction(MS_WAT_MYSHOWSINFO,@SrvMyShowsInfo);
@@ -275,9 +277,9 @@ begin slast:=CreateServiceFunction(MS_WAT_MYSHOWS,@SrvMyShows);
if hMenuMyShows=0 then
CreateMenus;
- HookEvent(ME_SKIN2_ICONSCHANGED,@IconChanged);
+ sic:=HookEvent(ME_SKIN2_ICONSCHANGED,@IconChanged);
if (msh_on and 4)=0 then
- HookEvent(ME_WAT_NEWSTATUS,@NewPlStatus);
+ plStatusHook:=HookEvent(ME_WAT_NEWSTATUS,@NewPlStatus);
end;
procedure DeInitProc(aSetDisable:boolean);
@@ -286,6 +288,8 @@ begin SetModStatus(0);
DestroyServiceFunction(slast);
+ UnhookEvent(plStatusHook);
+ UnhookEvent(sic);
if hTimer<>0 then
begin
@@ -313,6 +317,7 @@ begin mmyshows.Init :=@InitProc;
mmyshows.DeInit :=@DeInitProc;
mmyshows.AddOption :=@AddOptionsPage;
+ mmyshows.Check :=nil;
mmyshows.ModuleName:='MyShows.ru';
ModuleLink :=@mmyshows;
|