diff options
author | Alexey Kulakov <panda75@bk.ru> | 2014-04-24 14:55:20 +0000 |
---|---|---|
committer | Alexey Kulakov <panda75@bk.ru> | 2014-04-24 14:55:20 +0000 |
commit | c3a168743616db6606702db5ad0fecab4dfee3da (patch) | |
tree | 523ef1399093917f3565d769826ceecb7eb2ef6c /plugins/Watrack/myshows | |
parent | 90ad600cb38a04c9272a3599c72d6559c822b155 (diff) |
Miranda API update
Watrack refactoring, API changes
git-svn-id: http://svn.miranda-ng.org/main/trunk@9068 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/Watrack/myshows')
-rw-r--r-- | plugins/Watrack/myshows/i_myshows_api.inc | 2 | ||||
-rw-r--r-- | plugins/Watrack/myshows/i_myshows_opt.inc | 1 | ||||
-rw-r--r-- | plugins/Watrack/myshows/myshows.pas | 14 |
3 files changed, 12 insertions, 5 deletions
diff --git a/plugins/Watrack/myshows/i_myshows_api.inc b/plugins/Watrack/myshows/i_myshows_api.inc index 2e9f51773d..8a54e47e17 100644 --- a/plugins/Watrack/myshows/i_myshows_api.inc +++ b/plugins/Watrack/myshows/i_myshows_api.inc @@ -154,7 +154,7 @@ var buf:array [0..511] of AnsiChar;
// bufw:array [0..511] of WideChar;
res,pc:PAnsiChar;
- epId:pAnsiChar;
+ {img,}epId:pAnsiChar;
shId:pWideChar;
// imgw:pWideChar;
jn,jroot:PJSONNODE;
diff --git a/plugins/Watrack/myshows/i_myshows_opt.inc b/plugins/Watrack/myshows/i_myshows_opt.inc index 42b9e88cee..125d4deda5 100644 --- a/plugins/Watrack/myshows/i_myshows_opt.inc +++ b/plugins/Watrack/myshows/i_myshows_opt.inc @@ -13,6 +13,7 @@ begin DBWriteString(0,PluginShort,optLogin ,msh_login);
DBWriteByte (0,PluginShort,optTries ,msh_tries);
DBWriteByte (0,PluginShort,optScrobPos,msh_scrobpos);
+// DBWriteWord (0,PluginShort,optTries ,msh_timeout);
DBWriteByte (0,PluginShort,optScrobble,msh_on and 1);
end;
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
|