Changeset 35876 for titan/plugins
- Timestamp:
- 10/07/15 19:48:26 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
titan/plugins/instar/instar.h
r35872 r35876 50 50 else 51 51 tmpstr = ostrcat(cam1, "/snapshot.cgi", 0, 0); 52 if(getconfigint("instar_alterwebif", NULL) == 1) 53 tmpstr = ostrcat(cam1, " > /tmp/instar1.jpg", 0, 0); 52 54 system(tmpstr); 53 55 free(tmpstr); tmpstr = NULL; … … 63 65 else 64 66 tmpstr = ostrcat(cam2, "/snapshot.cgi", 0, 0); 67 if(getconfigint("instar_alterwebif", NULL) == 1) 68 tmpstr = ostrcat(cam2, " > /tmp/instar2.jpg", 0, 0); 65 69 system(tmpstr); 66 70 free(tmpstr); tmpstr = NULL; … … 200 204 struct skin* instar_einstellungen = getscreen("instar_einstellungen"); 201 205 struct skin* listbox = getscreennode(instar_einstellungen, "listbox"); 206 struct skin* alterwebif = getscreennode(instar_einstellungen, "alterwebif"); 202 207 struct skin* autoCam = getscreennode(instar_einstellungen, "autoCam"); 203 208 struct skin* onCam1 = getscreennode(instar_einstellungen, "onCam1"); … … 219 224 addchoicebox(autoCam, "ja", _("ja")); 220 225 setchoiceboxselection(autoCam, getlist(myconfig, "InstarCamAutostart", NULL)); 226 227 addchoicebox(alterwebif, "0", "off"); 228 addchoicebox(alterwebif, "1", "on"); 229 setchoiceboxselection(alterwebif, getconfig("instar_alterwebif", NULL)); 221 230 222 231 addchoicebox(onCam1, "aus", _("aus")); … … 281 290 addconfig("instar_1", typCam1->ret); 282 291 addconfig("instar_2", typCam2->ret); 292 addconfig("instar_alterwebif", alterwebif->ret); 283 293 if(rcret == getrcconfigint("rcblue", NULL)) 284 294 { … … 298 308 { 299 309 int rcode = 0; 300 310 301 311 instarconf = createpluginpath("/instar/instar.conf", 0); 302 312 readconfig(instarconf, myconfig); 313 314 char* CURL = NULL; 315 CURL = createpluginpath("/instar/curl", 0); 303 316 304 317 if(ostrcmp(getlist(myconfig, "InstarCamAutostart", NULL), "ja") == 0) … … 315 328 if(ostrcmp(getlist(myconfig, "InstarCam1", NULL), "ein") == 0) 316 329 { 317 cam1 = ostrcat("wget --output-document=/tmp/instar1.jpg http://", getlist(myconfig, "InstarCam1User", NULL), 0, 0); 330 if(getconfigint("instar_alterwebif", NULL) == 0) 331 cam1 = ostrcat("wget --output-document=/tmp/instar1.jpg http://", getlist(myconfig, "InstarCam1User", NULL), 0, 0); 332 else 333 { 334 cam1 = ostrcat(CURL, " http://", 0, 0); 335 cam1 = ostrcat(cam1, getlist(myconfig, "InstarCam1User", NULL), 1, 0); 336 } 318 337 cam1 = ostrcat(cam1, ":",1, 0); 319 338 cam1 = ostrcat(cam1, getlist(myconfig, "InstarCam1Pass", NULL), 1, 0); … … 340 359 if(ostrcmp(getlist(myconfig, "InstarCam2", NULL), "ein") == 0) 341 360 { 342 cam2 = ostrcat("wget --output-document=/tmp/instar2.jpg http://", getlist(myconfig, "InstarCam2User", NULL), 0, 0); 361 if(getconfigint("instar_alterwebif", NULL) == 0) 362 cam2 = ostrcat("wget --output-document=/tmp/instar2.jpg http://", getlist(myconfig, "InstarCam2User", NULL), 0, 0); 363 else 364 { 365 cam2 = ostrcat(CURL, " http://", 0, 0); 366 cam2 = ostrcat(cam1, getlist(myconfig, "InstarCam2User", NULL), 1, 0); 367 } 343 368 cam2 = ostrcat(cam2, ":",1, 0); 344 369 cam2 = ostrcat(cam2, getlist(myconfig, "InstarCam2Pass", NULL), 1, 0); … … 387 412 freelist(myconfig); 388 413 free(instarconf); instarconf = NULL; 414 free(CURL); CURL = NULL; 389 415 }
Note: See TracChangeset
for help on using the changeset viewer.