Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

[httpapi] depracate TakeScreenshot that has paramaters

  • Loading branch information...
commit 0f12c02ccb8953163d3eb02d1c9976e1fe5ca899 1 parent 581fe30
Jonathan Marshall authored

Showing 1 changed file with 1 addition and 72 deletions. Show diff stats Hide diff stats

  1. +1 72 xbmc/interfaces/http-api/XBMChttp.cpp
73 xbmc/interfaces/http-api/XBMChttp.cpp
@@ -26,7 +26,6 @@
26 26 #include "video/VideoDatabase.h"
27 27 #include "guilib/GUIButtonControl.h"
28 28 #include "GUIInfoManager.h"
29   -#include "pictures/Picture.h"
30 29 #include "music/tags/MusicInfoTagLoaderFactory.h"
31 30 #include "music/infoscanner/MusicInfoScraper.h"
32 31 #include "addons/AddonManager.h"
@@ -2860,77 +2859,7 @@ int CXbmcHttp::xbmcTakeScreenshot(int numParas, CStdString paras[])
2860 2859 if (numParas<1)
2861 2860 CUtil::TakeScreenshot();
2862 2861 else
2863   - {
2864   - CStdString filepath;
2865   - if (paras[0]=="")
2866   - filepath = "special://temp/screenshot.jpg";
2867   - else
2868   - filepath = paras[0];
2869   - if (numParas>5)
2870   - {
2871   - CStdString tmpFile = "special://temp/temp.png";
2872   - CUtil::TakeScreenshot(tmpFile, true);
2873   - int height, width;
2874   - if (paras[4]=="")
2875   - if (paras[3]=="")
2876   - {
2877   - return SetResponse(openTag+"Error:Both height and width parameters cannot be absent");
2878   - }
2879   - else
2880   - {
2881   - width=atoi(paras[3]);
2882   - height=-1;
2883   - }
2884   - else
2885   - if (paras[3]=="")
2886   - {
2887   - height=atoi(paras[4]);
2888   - width=-1;
2889   - }
2890   - else
2891   - {
2892   - width=atoi(paras[3]);
2893   - height=atoi(paras[4]);
2894   - }
2895   - int ret = CPicture::ConvertFile(tmpFile, filepath, (float) atof(paras[2]), width, height, atoi(paras[5]));
2896   - if (ret == 0)
2897   - {
2898   - CFile::Delete(tmpFile);
2899   - if (numParas>6)
2900   - if (paras[6].ToLower()=="true")
2901   - {
2902   - CStdString b64="";
2903   - int linesize=80;
2904   - bool bImgTag=false;
2905   - // only allow the old GetThumb command to accept "imgtag"
2906   - if (numParas==8 && paras[7].Equals("imgtag"))
2907   - {
2908   - bImgTag=true;
2909   - b64="<img src=\"data:image/jpg;base64,";
2910   - linesize=0;
2911   - }
2912   - b64+=encodeFileToBase64(filepath,linesize);
2913   - if (filepath == "special://temp/screenshot.jpg")
2914   - CFile::Delete(filepath);
2915   - if (bImgTag)
2916   - {
2917   - b64+="\" alt=\"Your browser doesnt support this\" title=\"";
2918   - b64+=paras[0];
2919   - b64+="\">";
2920   - }
2921   - return SetResponse(b64) ;
2922   - }
2923   - }
2924   - else
2925   - {
2926   - CStdString strInt;
2927   - strInt.Format("%", ret);
2928   - return SetResponse(openTag+"Error:Could not convert image, error: " + strInt );
2929   - }
2930   - }
2931   - else
2932   - return SetResponse(openTag+"Error:Missing parameters");
2933   - }
  2862 + return SetResponse(openTag+"Error: xbmcTakeScreenshot with params depracated");
2934 2863 return SetResponse(openTag+"OK");
2935 2864 }
2936 2865

0 comments on commit 0f12c02

Please sign in to comment.
Something went wrong with that request. Please try again.