diff options
author | George Hazan <ghazan@miranda.im> | 2016-11-27 21:02:54 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2016-11-27 21:02:54 +0300 |
commit | 0ebb1294ecaf4d62ad6b3e911be6275248c05354 (patch) | |
tree | 5560ce9ecc74ab5357279cd15aa9704d4d9d8c30 /plugins/Watrack/myshows | |
parent | c6b6e8a4b79e906f77b1f3be43e939316e1d912f (diff) |
correct type for ServiceExists() - bool
Diffstat (limited to 'plugins/Watrack/myshows')
-rw-r--r-- | plugins/Watrack/myshows/i_myshows_api.inc | 21 | ||||
-rw-r--r-- | plugins/Watrack/myshows/myshows.pas | 11 |
2 files changed, 7 insertions, 25 deletions
diff --git a/plugins/Watrack/myshows/i_myshows_api.inc b/plugins/Watrack/myshows/i_myshows_api.inc index f753da56f4..25593311d7 100644 --- a/plugins/Watrack/myshows/i_myshows_api.inc +++ b/plugins/Watrack/myshows/i_myshows_api.inc @@ -36,7 +36,7 @@ begin end;
StrCopyW(StrCopyEW(buf,'MyShows: '),TranslateW(ppc));
- if ServiceExists(MS_POPUP_SHOWMESSAGEW)<>0 then
+ if ServiceExists(MS_POPUP_SHOWMESSAGEW) then
CallService(MS_POPUP_SHOWMESSAGEW,TWPARAM(@buf),SM_WARNING)
else
MessageBoxW(0,@buf,'ERROR',MB_ICONERROR)
@@ -195,23 +195,11 @@ begin begin
// Episode check
StrCopy(StrCopyE(buf,API_URL+'profile/episodes/check/'),epId);
-// json_free(epId); // !! cause memory error (no need for GetName?)
- // StrCopy(request,API_URL+'profile/shows/');
+
if SendMSRequest(buf,show) then
begin
-{
- if si.cover=nil then
- begin
- jn:=json_get(jroot,'show');
- img:=json_as_string(json_get(jn,'image'));
- si:=pointer(CallService(MS_WAT_RETURNGLOBAL,WAT_INF_UNICODE,0));
- FastAnsiToWide(img,pSongInfoW(si)^.cover);
- json_free(img);
- end;
-}
-
//!! add option to show it??
- if ServiceExists(MS_POPUP_SHOWMESSAGEW)<>0 then
+ if ServiceExists(MS_POPUP_SHOWMESSAGEW) then
begin
jn:=json_get(jroot,'show');
shId:=json_as_string(json_get(jn,'title'));
@@ -232,9 +220,6 @@ begin '" checked');
CallService(MS_POPUP_SHOWMESSAGEW,TWPARAM(pc),SM_NOTIFY);
mFreeMem(pc);
-
- {!!json_free(shId);} mir_free(shId);
- {!!json_free(epId);} mir_free(epId);
end;
result:=true;
end;
diff --git a/plugins/Watrack/myshows/myshows.pas b/plugins/Watrack/myshows/myshows.pas index 53925f857b..cc89e9be16 100644 --- a/plugins/Watrack/myshows/myshows.pas +++ b/plugins/Watrack/myshows/myshows.pas @@ -109,13 +109,10 @@ 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
- timervalue:=DefTimerValue;
- hTimer:=SetTimer(0,0,timervalue,@TimerProc);
- end;
+ timervalue:=integer(pSongInfo(lParam).total)*10*msh_scrobpos; // 1000(msec) div 100(%)
+ if timervalue=0 then
+ timervalue:=DefTimerValue;
+ hTimer:=SetTimer(0,0,timervalue,@TimerProc);
end;
end;
end;
|