Changeset 28322
- Timestamp:
- 04/02/14 17:50:06 (10 years ago)
- Location:
- titan/plugins
- Files:
-
- 14 edited
Legend:
- Unmodified
- Added
- Removed
-
titan/plugins/Makefile.am
r28321 r28322 3 3 SUBDIRS = \ 4 4 autotimer \ 5 browser \ 6 callmonitor1 \ 5 7 catcatch \ 6 8 dlna \ 9 dvdplayer \ 10 facebook \ 11 filemanager \ 7 12 gmediarender \ 13 hbbtv \ 8 14 hello \ 9 15 imdb \ 10 16 imdbapi \ 17 instar \ 11 18 keylock \ 12 19 lcdpearl1 \ 13 20 lcdsamsung \ 14 21 mboxinfo \ 22 mc \ 15 23 networkbrowser \ 16 24 optimize \ 25 panel \ 17 26 permtime \ 27 readerconfig \ 18 28 rgui \ 19 29 scriptexec \ 20 30 stock \ 31 stopifnotused \ 21 32 streaminfo \ 22 33 tinews \ 34 tithek \ 23 35 tsSchnitt \ 36 tmc \ 24 37 tmdb \ 25 38 TopfieldVFD \ -
titan/plugins/callmonitor1/callmonitor1.c
r24056 r28322 2 2 #include "../../titan/debug.h" 3 3 #include "../../titan/header.h" 4 #include "../../titan/list.h"5 4 #include "callmon_main.h" 6 5 -
titan/plugins/configure.ac
r28321 r28322 33 33 Makefile 34 34 autotimer/Makefile 35 browser/Makefile 36 callmonitor1/Makefile 35 37 catcatch/Makefile 36 38 dlna/Makefile 39 dvdplayer/Makefile 40 facebook/Makefile 41 filemanager/Makefile 37 42 gmediarender/Makefile 43 hbbtv/Makefile 38 44 hello/Makefile 39 45 imdb/Makefile 40 46 imdbapi/Makefile 47 instar/Makefile 41 48 keylock/Makefile 42 49 lcdpearl1/Makefile 43 50 lcdsamsung/Makefile 44 51 mboxinfo/Makefile 52 mc/Makefile 45 53 networkbrowser/Makefile 46 54 optimize/Makefile 55 panel/Makefile 47 56 permtime/Makefile 57 readerconfig/Makefile 48 58 rgui/Makefile 49 59 scriptexec/Makefile 50 60 stock/Makefile 61 stopifnotused/Makefile 51 62 streaminfo/Makefile 52 63 tinews/Makefile 64 tithek/Makefile 65 tmc/Makefile 53 66 tmdb/Makefile 54 67 TopfieldVFD/Makefile -
titan/plugins/filemanager/filemanager.h
r27740 r28322 163 163 if(rcret == getrcconfigint("rcexit", NULL)) break; 164 164 165 if(status.security == 1) 166 { 167 if((rcret == getrcconfigint("rcgreen", NULL) || rcret == getrcconfigint("rcyellow", NULL)) && tmpfilelist->select != NULL && ostrcmp(tmpfilelist->select->text, "..") != 0) //copy - move 168 { 165 if((rcret == getrcconfigint("rcgreen", NULL) || rcret == getrcconfigint("rcyellow", NULL)) && tmpfilelist->select != NULL && ostrcmp(tmpfilelist->select->text, "..") != 0) //copy - move 166 { 167 if(aktfilelist == 0) 168 file1 = createpath(filelistpath1->text, filelist1->select->text); 169 else 170 file1 = createpath(filelistpath2->text, filelist2->select->text); 171 172 if(file1 != NULL) 173 { 174 int copy = 1; 175 176 if(rcret == getrcconfigint("rcgreen", NULL)) 177 { 178 tmpstr = ostrcat(tmpstr, _("Really copy this file/dir?"), 1, 0); 179 copy = 1; 180 //not need with screencopy start 181 //cmd = ostrcat(cmd, "cp -r ", 1, 0); 182 //not need with screencopy end 183 } 184 if(rcret == getrcconfigint("rcyellow", NULL)) 185 { 186 tmpstr = ostrcat(tmpstr, _("Really move this file/dir?"), 1, 0); 187 copy = 0; 188 //not need with screencopy start 189 //cmd = ostrcat(cmd, "mv -f ", 1, 0); 190 //not need with screencopy end 191 } 192 193 tmpstr = ostrcat(tmpstr, "\n\n", 1, 0); 194 tmpstr = ostrcat(tmpstr, _("From"), 1, 0); 195 tmpstr = ostrcat(tmpstr, ": ", 1, 0); 196 tmpstr = ostrcat(tmpstr, file1, 1, 0); 197 tmpstr = ostrcat(tmpstr, "\n", 1, 0); 198 tmpstr = ostrcat(tmpstr, _("To"), 1, 0); 199 tmpstr = ostrcat(tmpstr, ": ", 1, 0); 200 169 201 if(aktfilelist == 0) 170 file1 = createpath(filelistpath1->text, filelist1->select->text);202 tmpstr = ostrcat(tmpstr, filelistpath2->text, 1, 0); 171 203 else 172 file1 = createpath(filelistpath2->text, filelist2->select->text); 173 174 if(file1 != NULL) 204 tmpstr = ostrcat(tmpstr, filelistpath1->text, 1, 0); 205 206 ret = textbox(_("Message"), tmpstr, _("OK"), getrcconfigint("rcok", NULL), _("EXIT"), getrcconfigint("rcexit", NULL), NULL, 0, NULL, 0, 1000, 300, 0, 0); 207 208 209 if(ret == 1) 175 210 { 176 int copy = 1; 177 178 if(rcret == getrcconfigint("rcgreen", NULL)) 211 if(copy == 0) 179 212 { 180 tmpstr = ostrcat(tmpstr, _("Really copy this file/dir?"), 1, 0); 181 copy = 1; 182 //not need with screencopy start 183 //cmd = ostrcat(cmd, "cp -r ", 1, 0); 184 //not need with screencopy end 185 } 186 if(rcret == getrcconfigint("rcyellow", NULL)) 187 { 188 tmpstr = ostrcat(tmpstr, _("Really move this file/dir?"), 1, 0); 189 copy = 0; 190 //not need with screencopy start 191 //cmd = ostrcat(cmd, "mv -f ", 1, 0); 192 //not need with screencopy end 193 } 194 195 tmpstr = ostrcat(tmpstr, "\n\n", 1, 0); 196 tmpstr = ostrcat(tmpstr, _("From"), 1, 0); 197 tmpstr = ostrcat(tmpstr, ": ", 1, 0); 198 tmpstr = ostrcat(tmpstr, file1, 1, 0); 199 tmpstr = ostrcat(tmpstr, "\n", 1, 0); 200 tmpstr = ostrcat(tmpstr, _("To"), 1, 0); 201 tmpstr = ostrcat(tmpstr, ": ", 1, 0); 202 203 if(aktfilelist == 0) 204 tmpstr = ostrcat(tmpstr, filelistpath2->text, 1, 0); 205 else 206 tmpstr = ostrcat(tmpstr, filelistpath1->text, 1, 0); 207 208 ret = textbox(_("Message"), tmpstr, _("OK"), getrcconfigint("rcok", NULL), _("EXIT"), getrcconfigint("rcexit", NULL), NULL, 0, NULL, 0, 1000, 300, 0, 0); 209 210 211 if(ret == 1) 212 { 213 if(copy == 0) 213 if(aktfilelist == 0) 214 214 { 215 if(aktfilelist == 0) 216 { 217 file2 = createpath(filelistpath2->text, filelist1->select->text); 218 if(rename(file1, file2) != 0) 219 screencopy(_("Move File"), file1, filelistpath2->text, 1); 220 free(file2); file2 = NULL; 221 } 222 else 223 { 224 file2 = createpath(filelistpath1->text, filelist2->select->text); 225 if(rename(file1, file2) != 0) 226 screencopy(_("Move File"), file1, filelistpath1->text, 1); 227 free(file2); file2 = NULL; 228 } 215 file2 = createpath(filelistpath2->text, filelist1->select->text); 216 if(rename(file1, file2) != 0) 217 screencopy(_("Move File"), file1, filelistpath2->text, 1); 218 free(file2); file2 = NULL; 229 219 } 230 220 else 231 221 { 232 if(aktfilelist == 0)233 screencopy(_("Copy File"), file1, filelistpath2->text, 0);234 else235 screencopy(_("Copy File"), file1, filelistpath1->text, 0);222 file2 = createpath(filelistpath1->text, filelist2->select->text); 223 if(rename(file1, file2) != 0) 224 screencopy(_("Move File"), file1, filelistpath1->text, 1); 225 free(file2); file2 = NULL; 236 226 } 237 227 } 238 239 free(tmpstr); tmpstr = NULL;240 241 //not need with screencopy start242 /*243 cmd = ostrcat(cmd, "\"", 1, 0);244 cmd = ostrcat(cmd, file1, 1, 0);245 cmd = ostrcat(cmd, "\" \"", 1, 0);246 if(aktfilelist == 0)247 cmd = ostrcat(cmd, filelistpath2->text, 1, 0);248 228 else 249 cmd = ostrcat(cmd, filelistpath1->text, 1, 0); 250 cmd = ostrcat(cmd, "\"", 1, 0); 251 if(ret == 1) system(cmd); 252 free(cmd); cmd = NULL; 253 */ 254 //not need with screencopy end 255 } 256 free(file1); file1 = NULL; 257 258 if(ret == 1) 259 { 260 delmarkedscreennodes(filemanager1, FILELISTDELMARK); 261 delmarkedscreennodes(filemanager2, FILELISTDELMARK); 262 createfilelist(filemanager1, filelist1, 0); 263 createfilelist(filemanager2, filelist2, 0); 264 } 265 drawscreen(filemanager, 0, 1); 266 drawscreen(filemanager1, 0, 1); 267 drawscreen(filemanager2, 0, 0); 268 } 229 { 230 if(aktfilelist == 0) 231 screencopy(_("Copy File"), file1, filelistpath2->text, 0); 232 else 233 screencopy(_("Copy File"), file1, filelistpath1->text, 0); 234 } 235 } 236 237 free(tmpstr); tmpstr = NULL; 238 239 //not need with screencopy start 240 /* 241 cmd = ostrcat(cmd, "\"", 1, 0); 242 cmd = ostrcat(cmd, file1, 1, 0); 243 cmd = ostrcat(cmd, "\" \"", 1, 0); 244 if(aktfilelist == 0) 245 cmd = ostrcat(cmd, filelistpath2->text, 1, 0); 246 else 247 cmd = ostrcat(cmd, filelistpath1->text, 1, 0); 248 cmd = ostrcat(cmd, "\"", 1, 0); 249 if(ret == 1) system(cmd); 250 free(cmd); cmd = NULL; 251 */ 252 //not need with screencopy end 253 } 254 free(file1); file1 = NULL; 269 255 270 if(rcret == getrcconfigint("rcred", NULL) && tmpfilelist->select != NULL && ostrcmp(tmpfilelist->select->text, "..") != 0) //delete 271 { 272 if(aktfilelist == 0) 273 file1 = createpath(filelistpath1->text, filelist1->select->text); 274 else 275 file1 = createpath(filelistpath2->text, filelist2->select->text); 276 if(file1 != NULL) 277 { 278 tmpstr = ostrcat(tmpstr, _("Really delete this file/dir?"), 1, 0); 279 tmpstr = ostrcat(tmpstr, "\n\n", 1, 0); 280 tmpstr = ostrcat(tmpstr, file1, 1, 0); 281 ret = textbox(_("Message"), tmpstr, _("OK"), getrcconfigint("rcok", NULL), _("EXIT"), getrcconfigint("rcexit", NULL), NULL, 0, NULL, 0, 1000, 200, 0, 0); 282 free(tmpstr); tmpstr = NULL; 283 284 cmd = ostrcat(cmd, "rm -rf ", 1, 0); 285 cmd = ostrcat(cmd, "\"", 1, 0); 286 cmd = ostrcat(cmd, file1, 1, 0); 287 cmd = ostrcat(cmd, "\"", 1, 0); 288 if(ret == 1) 289 { 290 if(system(cmd) != 0) 291 textbox(_("Message"), _("Can't remove file/dir !"), _("OK"), getrcconfigint("rcok", NULL), _("EXIT"), getrcconfigint("rcexit", NULL), NULL, 0, NULL, 0, 600, 200, 0, 0); 292 } 293 free(cmd); cmd = NULL; 294 } 295 free(file1); file1 = NULL; 296 297 if(ret == 1) 298 { 299 delmarkedscreennodes(filemanager1, FILELISTDELMARK); 300 delmarkedscreennodes(filemanager2, FILELISTDELMARK); 301 createfilelist(filemanager1, filelist1, 0); 302 createfilelist(filemanager2, filelist2, 0); 303 } 304 drawscreen(filemanager, 0, 1); 305 drawscreen(filemanager1, 0, 1); 306 drawscreen(filemanager2, 0, 0); 307 } 308 309 if(rcret == getrcconfigint("rcblue", NULL) && tmpfilelist->select != NULL && ostrcmp(tmpfilelist->select->text, "..") != 0) //view 310 { 311 if(aktfilelist == 0) 312 file1 = createpath(filelistpath1->text, filelist1->select->text); 313 else 314 file1 = createpath(filelistpath2->text, filelist2->select->text); 315 316 if(getfilesize(file1) < 1048576 && (cmpfilenameext(file1, ".txt") == 0 || cmpfilenameext(file1, ".sh") == 0 || cmpfilenameext(file1, ".cfg") == 0 || cmpfilenameext(file1, ".conf") == 0)) 317 { 318 tmpstr = readfiletomem(file1, 0); 319 if(tmpstr != NULL) 320 { 321 textbox(file1, tmpstr, _("OK"), getrcconfigint("rcok", NULL), _("EXIT"), getrcconfigint("rcexit", NULL), NULL, 0, NULL, 0, 1000, 600, 0, 0); 322 323 drawscreen(filemanager, 0, 1); 324 drawscreen(filemanager1, 0, 1); 325 drawscreen(filemanager2, 0, 0); 326 } 327 free(tmpstr); tmpstr = NULL; 328 } 329 else 330 { 331 textbox(_("Message"), _("Can't show this file!"), _("OK"), getrcconfigint("rcok", NULL), _("EXIT"), getrcconfigint("rcexit", NULL), NULL, 0, NULL, 0, 600, 200, 10, 0); 332 333 drawscreen(filemanager, 0, 1); 334 drawscreen(filemanager1, 0, 1); 335 drawscreen(filemanager2, 0, 0); 336 } 337 free(file1); file1 = NULL; 338 } 339 340 if(rcret == getrcconfigint("rcmenu", NULL)) //menu 341 { 342 filemanagermenu(aktfilelist, filelist1, filelistpath1, filelist2, filelistpath2); 343 256 if(ret == 1) 257 { 344 258 delmarkedscreennodes(filemanager1, FILELISTDELMARK); 345 259 delmarkedscreennodes(filemanager2, FILELISTDELMARK); 346 260 createfilelist(filemanager1, filelist1, 0); 347 261 createfilelist(filemanager2, filelist2, 0); 348 262 } 263 drawscreen(filemanager, 0, 1); 264 drawscreen(filemanager1, 0, 1); 265 drawscreen(filemanager2, 0, 0); 266 } 267 268 if(rcret == getrcconfigint("rcred", NULL) && tmpfilelist->select != NULL && ostrcmp(tmpfilelist->select->text, "..") != 0) //delete 269 { 270 if(aktfilelist == 0) 271 file1 = createpath(filelistpath1->text, filelist1->select->text); 272 else 273 file1 = createpath(filelistpath2->text, filelist2->select->text); 274 if(file1 != NULL) 275 { 276 tmpstr = ostrcat(tmpstr, _("Really delete this file/dir?"), 1, 0); 277 tmpstr = ostrcat(tmpstr, "\n\n", 1, 0); 278 tmpstr = ostrcat(tmpstr, file1, 1, 0); 279 ret = textbox(_("Message"), tmpstr, _("OK"), getrcconfigint("rcok", NULL), _("EXIT"), getrcconfigint("rcexit", NULL), NULL, 0, NULL, 0, 1000, 200, 0, 0); 280 free(tmpstr); tmpstr = NULL; 281 282 cmd = ostrcat(cmd, "rm -rf ", 1, 0); 283 cmd = ostrcat(cmd, "\"", 1, 0); 284 cmd = ostrcat(cmd, file1, 1, 0); 285 cmd = ostrcat(cmd, "\"", 1, 0); 286 if(ret == 1) 287 { 288 if(system(cmd) != 0) 289 textbox(_("Message"), _("Can't remove file/dir !"), _("OK"), getrcconfigint("rcok", NULL), _("EXIT"), getrcconfigint("rcexit", NULL), NULL, 0, NULL, 0, 600, 200, 0, 0); 290 } 291 free(cmd); cmd = NULL; 292 } 293 free(file1); file1 = NULL; 294 295 if(ret == 1) 296 { 297 delmarkedscreennodes(filemanager1, FILELISTDELMARK); 298 delmarkedscreennodes(filemanager2, FILELISTDELMARK); 299 createfilelist(filemanager1, filelist1, 0); 300 createfilelist(filemanager2, filelist2, 0); 301 } 302 drawscreen(filemanager, 0, 1); 303 drawscreen(filemanager1, 0, 1); 304 drawscreen(filemanager2, 0, 0); 305 } 306 307 if(rcret == getrcconfigint("rcblue", NULL) && tmpfilelist->select != NULL && ostrcmp(tmpfilelist->select->text, "..") != 0) //view 308 { 309 if(aktfilelist == 0) 310 file1 = createpath(filelistpath1->text, filelist1->select->text); 311 else 312 file1 = createpath(filelistpath2->text, filelist2->select->text); 313 314 if(getfilesize(file1) < 1048576 && (cmpfilenameext(file1, ".txt") == 0 || cmpfilenameext(file1, ".sh") == 0 || cmpfilenameext(file1, ".cfg") == 0 || cmpfilenameext(file1, ".conf") == 0)) 315 { 316 tmpstr = readfiletomem(file1, 0); 317 if(tmpstr != NULL) 318 { 319 textbox(file1, tmpstr, _("OK"), getrcconfigint("rcok", NULL), _("EXIT"), getrcconfigint("rcexit", NULL), NULL, 0, NULL, 0, 1000, 600, 0, 0); 320 321 drawscreen(filemanager, 0, 1); 322 drawscreen(filemanager1, 0, 1); 323 drawscreen(filemanager2, 0, 0); 324 } 325 free(tmpstr); tmpstr = NULL; 326 } 327 else 328 { 329 textbox(_("Message"), _("Can't show this file!"), _("OK"), getrcconfigint("rcok", NULL), _("EXIT"), getrcconfigint("rcexit", NULL), NULL, 0, NULL, 0, 600, 200, 10, 0); 330 349 331 drawscreen(filemanager, 0, 1); 350 332 drawscreen(filemanager1, 0, 1); 351 333 drawscreen(filemanager2, 0, 0); 352 334 } 353 } 354 else 355 textbox(_("Message"), _("Registration needed, please contact Atemio !"), _("OK"), getrcconfigint("rcok", NULL), _("EXIT"), getrcconfigint("rcexit", NULL), NULL, 0, NULL, 0, 800, 200, 0, 0); 335 free(file1); file1 = NULL; 336 } 337 338 if(rcret == getrcconfigint("rcmenu", NULL)) //menu 339 { 340 filemanagermenu(aktfilelist, filelist1, filelistpath1, filelist2, filelistpath2); 341 342 delmarkedscreennodes(filemanager1, FILELISTDELMARK); 343 delmarkedscreennodes(filemanager2, FILELISTDELMARK); 344 createfilelist(filemanager1, filelist1, 0); 345 createfilelist(filemanager2, filelist2, 0); 346 347 drawscreen(filemanager, 0, 1); 348 drawscreen(filemanager1, 0, 1); 349 drawscreen(filemanager2, 0, 0); 350 } 356 351 357 352 if(rcret == getrcconfigint("rcff", NULL) || rcret == getrcconfigint("rcfr", NULL)) //change filelist -
titan/plugins/instar/instar.c
r24056 r28322 2 2 #include "../../titan/debug.h" 3 3 #include "../../titan/header.h" 4 #include "../../titan/list.h"5 4 6 5 #include "instar.h" -
titan/plugins/lcdpearl1/lcdpearl1.c
r24737 r28322 168 168 put = 0; 169 169 170 if(status.s ecurity == 1)171 { 172 if( status.standby > 0 && standby== 0)170 if(status.standby > 0 && standby == 0) 171 { 172 if(ostrcmp(getconfig("lcd_pearl1_plugin_standby", NULL), "yes") == 0) 173 173 { 174 if(ostrcmp(getconfig("lcd_pearl1_plugin_standby", NULL), "yes") == 0) 174 standby = 2; 175 put = 1; 176 } 177 else { 178 system("killall lcd4linux"); 179 standby = 1; 180 } 181 } 182 if(status.standby == 0 && standby > 0) 183 { 184 if(standby == 1) 185 system(startlcd); 186 standby = 0; 187 put = 1; 188 } 189 190 if(weatherthread == NULL && weatherwrite == 0) 191 { 192 if(file_exist("/tmp/lcdweather")) 193 put = 1; 194 } 195 196 if(ostrcmp(tmpstr, timemerk) != 0) 197 { 198 free(timemerk);timemerk=NULL; 199 timemerk = ostrcat(tmpstr, "", 0, 0); 200 put = 1; 201 } 202 203 if(standby == 0) 204 { 205 if(type == 1) 206 { 207 if(ostrcmp(tmpstr2, sendermerk) != 0) 175 208 { 176 standby = 2; 209 free(sendermerk);sendermerk=NULL; 210 sendermerk = ostrcat(tmpstr2, "", 0, 0); 211 put = 1; 212 } 213 if(tmpstr3 == NULL && recmerk != NULL) 214 { 215 put = 1; 216 free(recmerk);recmerk=NULL; 217 } 218 else if(tmpstr3 != NULL && recmerk == NULL) 219 { 220 free(recmerk);recmerk=NULL; 221 recmerk = ostrcat(tmpstr3, "", 0, 0); 177 222 put = 1; 178 223 } 179 else { 180 system("killall lcd4linux"); 181 standby = 1; 224 } 225 else if(type == 2) 226 { 227 if(loopcount >= 15) 228 { 229 put = 1; 230 loopcount = 0; 182 231 } 183 } 184 if(status.standby == 0 && standby > 0) 185 { 186 if(standby == 1) 187 system(startlcd); 188 standby = 0; 189 put = 1; 190 } 191 192 if(weatherthread == NULL && weatherwrite == 0) 193 { 194 if(file_exist("/tmp/lcdweather")) 195 put = 1; 196 } 232 } 197 233 198 if(ostrcmp(tmpstr, timemerk) != 0) 199 { 200 free(timemerk);timemerk=NULL; 201 timemerk = ostrcat(tmpstr, "", 0, 0); 202 put = 1; 203 } 204 205 if(standby == 0) 234 if(put == 1) 206 235 { 207 236 if(type == 1) 208 237 { 209 if(ostrcmp(tmpstr2, sendermerk) != 0) 238 // Wettervorhersage 239 if(ostrcmp(getconfig("lcd_pearl1_plugin_wetter", NULL), "yes") == 0) 210 240 { 211 free(sendermerk);sendermerk=NULL; 212 sendermerk = ostrcat(tmpstr2, "", 0, 0); 213 put = 1; 214 } 215 if(tmpstr3 == NULL && recmerk != NULL) 216 { 217 put = 1; 218 free(recmerk);recmerk=NULL; 241 if(weatherwrite == 0) 242 { 243 if(weatherthread == NULL) 244 { 245 if(!file_exist("/tmp/lcdweather")) 246 weatherthread = addtimer(&lcd_writeweather, START, 10000, 1, NULL, NULL, NULL); 247 else 248 { 249 fileline = malloc(256); 250 if(fileline != NULL) 251 { 252 fd = fopen("/tmp/lcdweather", "r"); 253 if(fd != NULL) 254 { 255 weather_getline(fd, fileline);weather_getline(fd, fileline);weather_getline(fd, fileline); 256 weather_getline(fd, fileline); 257 changetext(day0_t, fileline); 258 weather_getline(fd, fileline); 259 weather_getline(fd, fileline); 260 changepic(day0_i, fileline); 261 262 weather_getline(fd, fileline);weather_getline(fd, fileline); 263 weather_getline(fd, fileline); 264 changetext(day1_t, fileline); 265 weather_getline(fd, fileline); 266 weather_getline(fd, fileline); 267 changepic(day1_i, fileline); 268 269 weather_getline(fd, fileline);weather_getline(fd, fileline); 270 weather_getline(fd, fileline); 271 changetext(day2_t, fileline); 272 weather_getline(fd, fileline); 273 weather_getline(fd, fileline); 274 changepic(day2_i, fileline); 275 276 weather_getline(fd, fileline);weather_getline(fd, fileline); 277 weather_getline(fd, fileline); 278 changetext(day3_t, fileline); 279 weather_getline(fd, fileline); 280 weather_getline(fd, fileline); 281 changepic(day3_i, fileline); 282 fclose(fd); 283 } 284 free(fileline); fileline=NULL; 285 } 286 weatherwrite = 1; 287 } 288 } 289 } 219 290 } 220 else if(tmpstr3 != NULL && recmerk == NULL) 221 { 222 free(recmerk);recmerk=NULL; 223 recmerk = ostrcat(tmpstr3, "", 0, 0); 224 put = 1; 225 } 291 292 changetext(akttime, tmpstr); 293 drawscreen(LCD_Pearl1, 0, 0); 294 295 //system(fbgrab); 296 //system("mv /tmp/.titanlcd1.png /tmp/titanlcd.png"); 297 298 //system("/var/bin/fbgrab -f /tmp/titanlcd.raw -w 320 -h 240 -b 32 -i /tmp/titanlcd.png > /dev/null"); 299 //system("xloadimage /tmp/titanlcd.png > /dev/null &"); 300 226 301 } 227 302 else if(type == 2) 228 303 { 229 if(loopcount >= 15) 304 if(status.mcaktiv == 1) 305 playertype = 0; 306 else 307 playertype = getconfigint("playertype", NULL); 308 309 if(playertype == 1) 230 310 { 231 put = 1; 232 loopcount = 0; 311 unsigned long long int startpos = 0; 312 playergetinfots(&len, &startpos, NULL, &pos, NULL, 0); 313 len = len / 90000; 314 pos = (pos - startpos) / 90000; 233 315 } 234 } 235 236 if(put == 1) 237 { 238 if(type == 1) 316 else 239 317 { 240 // Wettervorhersage 241 if(ostrcmp(getconfig("lcd_pearl1_plugin_wetter", NULL), "yes") == 0) 242 { 243 if(weatherwrite == 0) 244 { 245 if(weatherthread == NULL) 246 { 247 if(!file_exist("/tmp/lcdweather")) 248 weatherthread = addtimer(&lcd_writeweather, START, 10000, 1, NULL, NULL, NULL); 249 else 250 { 251 fileline = malloc(256); 252 if(fileline != NULL) 253 { 254 fd = fopen("/tmp/lcdweather", "r"); 255 if(fd != NULL) 256 { 257 weather_getline(fd, fileline);weather_getline(fd, fileline);weather_getline(fd, fileline); 258 weather_getline(fd, fileline); 259 changetext(day0_t, fileline); 260 weather_getline(fd, fileline); 261 weather_getline(fd, fileline); 262 changepic(day0_i, fileline); 263 264 weather_getline(fd, fileline);weather_getline(fd, fileline); 265 weather_getline(fd, fileline); 266 changetext(day1_t, fileline); 267 weather_getline(fd, fileline); 268 weather_getline(fd, fileline); 269 changepic(day1_i, fileline); 270 271 weather_getline(fd, fileline);weather_getline(fd, fileline); 272 weather_getline(fd, fileline); 273 changetext(day2_t, fileline); 274 weather_getline(fd, fileline); 275 weather_getline(fd, fileline); 276 changepic(day2_i, fileline); 277 278 weather_getline(fd, fileline);weather_getline(fd, fileline); 279 weather_getline(fd, fileline); 280 changetext(day3_t, fileline); 281 weather_getline(fd, fileline); 282 weather_getline(fd, fileline); 283 changepic(day3_i, fileline); 284 fclose(fd); 285 } 286 free(fileline); fileline=NULL; 287 } 288 weatherwrite = 1; 289 } 290 } 291 } 292 } 293 294 changetext(akttime, tmpstr); 295 drawscreen(LCD_Pearl1, 0, 0); 296 297 //system(fbgrab); 298 //system("mv /tmp/.titanlcd1.png /tmp/titanlcd.png"); 299 300 //system("/var/bin/fbgrab -f /tmp/titanlcd.raw -w 320 -h 240 -b 32 -i /tmp/titanlcd.png > /dev/null"); 301 //system("xloadimage /tmp/titanlcd.png > /dev/null &"); 302 318 pos = playergetpts() / 90000; 319 len = playergetlength(); 303 320 } 304 else if(type == 2) 305 { 306 if(status.mcaktiv == 1) 307 playertype = 0; 308 else 309 playertype = getconfigint("playertype", NULL); 310 311 if(playertype == 1) 312 { 313 unsigned long long int startpos = 0; 314 playergetinfots(&len, &startpos, NULL, &pos, NULL, 0); 315 len = len / 90000; 316 pos = (pos - startpos) / 90000; 317 } 318 else 319 { 320 pos = playergetpts() / 90000; 321 len = playergetlength(); 322 } 323 if(pos < 0) pos = 0; 324 reverse = len - pos; 325 if(len == 0) 326 sprogress->progresssize = 0; 327 else 328 sprogress->progresssize = pos * 100 / len; 329 330 tmpstr2 = convert_timesec(pos); 331 changetext(spos, tmpstr2); 332 free(tmpstr2); tmpstr2 = NULL; 333 334 tmpstr2 = convert_timesec(len); 335 changetext(slen, tmpstr2); 336 free(tmpstr2); tmpstr2 = NULL; 337 338 tmpstr2 = convert_timesec(reverse); 339 changetext(sreverse, tmpstr2); 340 free(tmpstr2); tmpstr2 = NULL; 341 342 changetext(akttimeplay, tmpstr); 343 changetext(stitle, basename(status.playfile)); 344 drawscreen(LCD_Play, 0, 0); 345 346 //else if(type == 999 && status.mcaktiv == 1) 347 //else if(type == 999) 348 //{ 349 //changetext(akttimemc1, tmpstr); 350 //drawscreen(LCD_MC_Menu, 0, 3); 351 //} 352 } 321 if(pos < 0) pos = 0; 322 reverse = len - pos; 323 if(len == 0) 324 sprogress->progresssize = 0; 325 else 326 sprogress->progresssize = pos * 100 / len; 327 328 tmpstr2 = convert_timesec(pos); 329 changetext(spos, tmpstr2); 330 free(tmpstr2); tmpstr2 = NULL; 331 332 tmpstr2 = convert_timesec(len); 333 changetext(slen, tmpstr2); 334 free(tmpstr2); tmpstr2 = NULL; 335 336 tmpstr2 = convert_timesec(reverse); 337 changetext(sreverse, tmpstr2); 338 free(tmpstr2); tmpstr2 = NULL; 339 340 changetext(akttimeplay, tmpstr); 341 changetext(stitle, basename(status.playfile)); 342 drawscreen(LCD_Play, 0, 0); 343 344 //else if(type == 999 && status.mcaktiv == 1) 345 //else if(type == 999) 346 //{ 347 //changetext(akttimemc1, tmpstr); 348 //drawscreen(LCD_MC_Menu, 0, 3); 349 //} 353 350 } 354 351 } 355 else 356 { 357 if(standby == 2) 352 } 353 else 354 { 355 if(standby == 2) 356 { 357 if(put == 1) 358 358 { 359 if(put == 1) 360 { 361 changetext(akttime_Standby, tmpstr); 362 drawscreen(LCD_Pearl1_Standby, 0, 0); 363 put = 0; 364 } 359 changetext(akttime_Standby, tmpstr); 360 drawscreen(LCD_Pearl1_Standby, 0, 0); 361 put = 0; 365 362 } 366 363 } 367 364 } 365 368 366 free(tmpstr); tmpstr = NULL; 369 367 free(tmpstr2); tmpstr2 = NULL; -
titan/plugins/lcdsamsung/lcdsamsung.c
r24709 r28322 466 466 put = 0; 467 467 468 if(status.security == 1) 469 { 470 if(status.standby > 0 && standby == 0) 468 if(status.standby > 0 && standby == 0) 469 { 470 if(ostrcmp(getconfig("lcd_samsung_plugin_standby", NULL), "yes") == 0) 471 standby = 2; 472 else 471 473 { 472 if(ostrcmp(getconfig("lcd_samsung_plugin_standby", NULL), "yes") == 0) 473 standby = 2; 474 else 474 tmpstr = createpluginpath("/lcdsamsung/standby.jpg", 0); 475 tmpstr = ostrcat("cp ", tmpstr, 0, 1); 476 tmpstr = ostrcat(tmpstr, " /tmp/titanlcd.png", 1, 0); 477 system(tmpstr); 478 free(tmpstr); tmpstr=NULL; 479 sleep(3); 480 481 tmpstr = createpluginpath("/lcdsamsung/black.jpg", 0); 482 tmpstr = ostrcat("cp ", tmpstr, 0, 1); 483 tmpstr = ostrcat(tmpstr, " /tmp/titanlcd.png", 1, 0); 484 system(tmpstr); 485 sleep(2); 486 system("killall fbread"); 487 standby = 1; 488 } 489 } 490 if(status.standby == 0 && standby > 0) 491 { 492 if(standby == 1) 493 system(startlcd); 494 standby = 0; 495 put = 1; 496 } 497 498 if(weatherthread == NULL && weatherwrite == 0) 499 { 500 if(file_exist("/tmp/lcdweather")) 501 put = 1; 502 } 503 if(ostrcmp(tmpstr, timemerk) != 0) 504 { 505 free(timemerk);timemerk=NULL; 506 timemerk = ostrcat(tmpstr, "", 0, 0); 507 put = 1; 508 } 509 510 if(standby == 0 || standby == 2 ) 511 { 512 if(type == 1 && standby == 0) 513 { 514 if(ostrcmp(tmpstr2, sendermerk) != 0) 475 515 { 476 tmpstr = createpluginpath("/lcdsamsung/standby.jpg", 0);477 tmpstr = ostrcat("cp ", tmpstr, 0, 1);478 tmpstr = ostrcat(tmpstr, " /tmp/titanlcd.png", 1, 0);479 system(tmpstr);480 free(tmpstr); tmpstr=NULL;481 sleep(3);482 483 tmpstr = createpluginpath("/lcdsamsung/black.jpg", 0);484 tmpstr = ostrcat("cp ", tmpstr, 0, 1);485 tmpstr = ostrcat(tmpstr, " /tmp/titanlcd.png", 1, 0);486 system(tmpstr);487 sleep(2);488 system("killall fbread");489 standby= 1;516 free(sendermerk);sendermerk=NULL; 517 sendermerk = ostrcat(tmpstr2, "", 0, 0); 518 put = 1; 519 } 520 if(tmpstr3 == NULL && recmerk != NULL) 521 { 522 put = 1; 523 free(recmerk);recmerk=NULL; 524 } 525 else if(tmpstr3 != NULL && recmerk == NULL) 526 { 527 free(recmerk);recmerk=NULL; 528 recmerk = ostrcat(tmpstr3, "", 0, 0); 529 put = 1; 490 530 } 491 531 } 492 if(status.standby == 0 && standby > 0)532 else if(type == 2) 493 533 { 494 if(standby == 1) 495 system(startlcd); 496 standby = 0; 497 put = 1; 498 } 499 500 if(weatherthread == NULL && weatherwrite == 0) 501 { 502 if(file_exist("/tmp/lcdweather")) 503 put = 1; 504 } 505 if(ostrcmp(tmpstr, timemerk) != 0) 534 if(loopcount >= 15) 535 { 536 put = 1; 537 loopcount = 0; 538 } 539 } 540 541 if(put == 1) 506 542 { 507 free(timemerk);timemerk=NULL; 508 timemerk = ostrcat(tmpstr, "", 0, 0); 509 put = 1; 510 } 511 512 if(standby == 0 || standby == 2 ) 513 { 514 if(type == 1 && standby == 0) 543 if(type == 1) 515 544 { 516 if(ostrcmp(tmpstr2, sendermerk) != 0) 545 // Wettervorhersage 546 if(ostrcmp(getconfig("lcd_samsung_plugin_wetter", NULL), "yes") == 0) 517 547 { 518 free(sendermerk);sendermerk=NULL; 519 sendermerk = ostrcat(tmpstr2, "", 0, 0); 520 put = 1; 548 if(weatherwrite == 0) 549 { 550 if(weatherthread == NULL) 551 { 552 if(!file_exist("/tmp/lcdweather")) 553 weatherthread = addtimer(&lcd_writeweather, START, 10000, 1, NULL, NULL, NULL); 554 else 555 { 556 fileline = malloc(256); 557 if(fileline != NULL) 558 { 559 fd = fopen("/tmp/lcdweather", "r"); 560 if(fd != NULL) 561 { 562 if(ostrcmp(getconfig("lcd_samsung_plugin_standby", NULL), "yes") == 0) 563 { 564 weather_getline(fd, fileline);weather_getline(fd, fileline); 565 changetext(day0_d, fileline); 566 changetext(sday0_d, fileline); 567 weather_getline(fd, fileline);weather_getline(fd, fileline); 568 changetext(day0_t, fileline); 569 changetext(sday0_t, fileline); 570 weather_getline(fd, fileline); 571 weather_getline(fd, fileline); 572 changepic(day0_i, fileline); 573 changepic(sday0_i, fileline); 574 575 weather_getline(fd, fileline); 576 changetext(day1_d, fileline); 577 changetext(sday1_d, fileline); 578 weather_getline(fd, fileline);weather_getline(fd, fileline); 579 changetext(day1_t, fileline); 580 changetext(sday1_t, fileline); 581 weather_getline(fd, fileline); 582 weather_getline(fd, fileline); 583 changepic(day1_i, fileline); 584 changepic(sday1_i, fileline); 585 586 weather_getline(fd, fileline); 587 changetext(day2_d, fileline); 588 changetext(sday2_d, fileline); 589 weather_getline(fd, fileline);weather_getline(fd, fileline); 590 changetext(day2_t, fileline); 591 changetext(sday2_t, fileline); 592 weather_getline(fd, fileline); 593 weather_getline(fd, fileline); 594 changepic(day2_i, fileline); 595 changepic(sday2_i, fileline); 596 597 weather_getline(fd, fileline); 598 changetext(day3_d, fileline); 599 changetext(sday3_d, fileline); 600 weather_getline(fd, fileline);weather_getline(fd, fileline); 601 changetext(day3_t, fileline); 602 changetext(sday3_t, fileline); 603 weather_getline(fd, fileline); 604 weather_getline(fd, fileline); 605 changepic(day3_i, fileline); 606 changepic(sday3_i, fileline); 607 } 608 else 609 { 610 weather_getline(fd, fileline);weather_getline(fd, fileline); 611 changetext(day0_d, fileline); 612 weather_getline(fd, fileline);weather_getline(fd, fileline); 613 changetext(day0_t, fileline); 614 weather_getline(fd, fileline); 615 weather_getline(fd, fileline); 616 changepic(day0_i, fileline); 617 618 weather_getline(fd, fileline); 619 changetext(day1_d, fileline); 620 weather_getline(fd, fileline);weather_getline(fd, fileline); 621 changetext(day1_t, fileline); 622 weather_getline(fd, fileline); 623 weather_getline(fd, fileline); 624 changepic(day1_i, fileline); 625 626 weather_getline(fd, fileline); 627 changetext(day2_d, fileline); 628 weather_getline(fd, fileline);weather_getline(fd, fileline); 629 changetext(day2_t, fileline); 630 weather_getline(fd, fileline); 631 weather_getline(fd, fileline); 632 changepic(day2_i, fileline); 633 634 weather_getline(fd, fileline); 635 changetext(day3_d, fileline); 636 weather_getline(fd, fileline);weather_getline(fd, fileline); 637 changetext(day3_t, fileline); 638 weather_getline(fd, fileline); 639 weather_getline(fd, fileline); 640 changepic(day3_i, fileline); 641 } 642 fclose(fd); 643 } 644 free(fileline); fileline=NULL; 645 } 646 weatherwrite = 1; 647 } 648 } 649 } 650 } 651 if(standby == 0) 652 { 653 if(akttime != NULL) 654 changetext(akttime, tmpstr); 655 if(n_minute != NULL && digitaluhr == 0) 656 { 657 free(tmpstr);tmpstr=NULL; 658 tmpstr = ostrcat("min_",gettime(NULL, "%M"), 0, 0); 659 free(n_minute->pic); 660 n_minute->pic = string_replace("min_mm", tmpstr, picmin, 0); 661 free(tmpstr);tmpstr=NULL; 662 } 663 if(n_stunde != NULL && digitaluhr == 0) 664 { 665 free(tmpstr);tmpstr=NULL; 666 if(hr >= 12) 667 hr = hr - 12; 668 if(hr < 10) 669 tmpstr = ostrcat("hr_0",oitoa(hr), 0, 1); 670 else 671 tmpstr = ostrcat("hr_",oitoa(hr), 0, 1); 672 if(min < 12) 673 tmpstr = ostrcat(tmpstr,"00", 0, 0); 674 else if(min < 24) 675 tmpstr = ostrcat(tmpstr,"12", 0, 0); 676 else if(min < 36) 677 tmpstr = ostrcat(tmpstr,"24", 0, 0); 678 else if(min < 48) 679 tmpstr = ostrcat(tmpstr,"36", 0, 0); 680 else if(min < 60) 681 tmpstr = ostrcat(tmpstr,"48", 0, 0); 682 free(n_stunde->pic); 683 n_stunde->pic = string_replace("hr_hhmm", tmpstr, pichr, 0); 684 free(tmpstr);tmpstr=NULL; 685 } 686 if(digitaluhr == 1) 687 { 688 free(tmpstr);tmpstr=NULL; 689 tmpstr = ostrcat("wert_",oitoa(hr/10), 0, 1); 690 n_stunde->pic = string_replace("wert_w", tmpstr, pichr, 0); 691 free(tmpstr);tmpstr=NULL; 692 tmpstr = ostrcat("wert_",oitoa(hr%10), 0, 1); 693 n_stunde2->pic = string_replace("wert_w", tmpstr, pichr2, 0); 694 free(tmpstr);tmpstr=NULL; 695 tmpstr = ostrcat("wert_",oitoa(min/10), 0, 1); 696 n_minute->pic = string_replace("wert_w", tmpstr, picmin, 0); 697 free(tmpstr);tmpstr=NULL; 698 tmpstr = ostrcat("wert_",oitoa(min%10), 0, 1); 699 n_minute2->pic = string_replace("wert_w", tmpstr, picmin2, 0); 700 free(tmpstr);tmpstr=NULL; 701 } 702 703 704 if(drawscreen(LCD_Samsung1, 0, 0) == -2) 705 printf("nicht genug Speicher fuer drawscreen\n"); 706 } 707 else if(standby == 2) 708 { 709 if(akttime_Standby != NULL) 710 changetext(akttime_Standby, tmpstr); 711 if(n_minute_standby != NULL && digitaluhr_standby == 0) 712 { 713 free(tmpstr);tmpstr=NULL; 714 tmpstr = ostrcat("min_",gettime(NULL, "%M"), 0, 0); 715 free(n_minute_standby->pic); 716 n_minute_standby->pic = string_replace("min_mm", tmpstr, picmin_standby, 0); 717 free(tmpstr);tmpstr=NULL; 718 } 719 if(n_stunde_standby != NULL && digitaluhr_standby == 0) 720 { 721 free(tmpstr);tmpstr=NULL; 722 if(hr >= 12) 723 hr = hr - 12; 724 if(hr < 10) 725 tmpstr = ostrcat("hr_0",oitoa(hr), 0, 1); 726 else 727 tmpstr = ostrcat("hr_",oitoa(hr), 0, 1); 728 if(min < 12) 729 tmpstr = ostrcat(tmpstr,"00", 0, 0); 730 else if(min < 24) 731 tmpstr = ostrcat(tmpstr,"12", 0, 0); 732 else if(min < 36) 733 tmpstr = ostrcat(tmpstr,"24", 0, 0); 734 else if(min < 48) 735 tmpstr = ostrcat(tmpstr,"36", 0, 0); 736 else if(min < 60) 737 tmpstr = ostrcat(tmpstr,"48", 0, 0); 738 free(n_stunde_standby->pic); 739 n_stunde_standby->pic = string_replace("hr_hhmm", tmpstr, pichr_standby, 0); 740 free(tmpstr);tmpstr=NULL; 741 } 742 if(digitaluhr_standby == 1) 743 { 744 free(tmpstr);tmpstr=NULL; 745 tmpstr = ostrcat("wert_",oitoa(hr/10), 0, 1); 746 n_stunde_standby->pic = string_replace("wert_w", tmpstr, pichr_standby, 0); 747 free(tmpstr);tmpstr=NULL; 748 tmpstr = ostrcat("wert_",oitoa(hr%10), 0, 1); 749 n_stunde2_standby->pic = string_replace("wert_w", tmpstr, pichr2_standby, 0); 750 free(tmpstr);tmpstr=NULL; 751 tmpstr = ostrcat("wert_",oitoa(min/10), 0, 1); 752 n_minute_standby->pic = string_replace("wert_w", tmpstr, picmin_standby, 0); 753 free(tmpstr);tmpstr=NULL; 754 tmpstr = ostrcat("wert_",oitoa(min%10), 0, 1); 755 n_minute2_standby->pic = string_replace("wert_w", tmpstr, picmin2_standby, 0); 756 free(tmpstr);tmpstr=NULL; 757 } 758 759 drawscreen(LCD_Standby, 0, 0); 760 put = 0; 521 761 } 522 if(tmpstr3 == NULL && recmerk != NULL)523 {524 put = 1;525 free(recmerk);recmerk=NULL;526 }527 else if(tmpstr3 != NULL && recmerk == NULL)528 {529 free(recmerk);recmerk=NULL;530 recmerk = ostrcat(tmpstr3, "", 0, 0);531 put = 1;532 }533 762 } 534 763 else if(type == 2) 535 764 { 536 if(loopcount >= 15) 765 if(status.mcaktiv == 1) 766 playertype = 0; 767 else 768 playertype = getconfigint("playertype", NULL); 769 770 if(playertype == 1) 537 771 { 538 put = 1; 539 loopcount = 0; 772 unsigned long long int startpos = 0; 773 playergetinfots(&len, &startpos, NULL, &pos, NULL, 0); 774 len = len / 90000; 775 pos = (pos - startpos) / 90000; 540 776 } 541 } 542 543 if(put == 1) 544 { 545 if(type == 1) 777 else 546 778 { 547 // Wettervorhersage 548 if(ostrcmp(getconfig("lcd_samsung_plugin_wetter", NULL), "yes") == 0) 549 { 550 if(weatherwrite == 0) 551 { 552 if(weatherthread == NULL) 553 { 554 if(!file_exist("/tmp/lcdweather")) 555 weatherthread = addtimer(&lcd_writeweather, START, 10000, 1, NULL, NULL, NULL); 556 else 557 { 558 fileline = malloc(256); 559 if(fileline != NULL) 560 { 561 fd = fopen("/tmp/lcdweather", "r"); 562 if(fd != NULL) 563 { 564 if(ostrcmp(getconfig("lcd_samsung_plugin_standby", NULL), "yes") == 0) 565 { 566 weather_getline(fd, fileline);weather_getline(fd, fileline); 567 changetext(day0_d, fileline); 568 changetext(sday0_d, fileline); 569 weather_getline(fd, fileline);weather_getline(fd, fileline); 570 changetext(day0_t, fileline); 571 changetext(sday0_t, fileline); 572 weather_getline(fd, fileline); 573 weather_getline(fd, fileline); 574 changepic(day0_i, fileline); 575 changepic(sday0_i, fileline); 576 577 weather_getline(fd, fileline); 578 changetext(day1_d, fileline); 579 changetext(sday1_d, fileline); 580 weather_getline(fd, fileline);weather_getline(fd, fileline); 581 changetext(day1_t, fileline); 582 changetext(sday1_t, fileline); 583 weather_getline(fd, fileline); 584 weather_getline(fd, fileline); 585 changepic(day1_i, fileline); 586 changepic(sday1_i, fileline); 587 588 weather_getline(fd, fileline); 589 changetext(day2_d, fileline); 590 changetext(sday2_d, fileline); 591 weather_getline(fd, fileline);weather_getline(fd, fileline); 592 changetext(day2_t, fileline); 593 changetext(sday2_t, fileline); 594 weather_getline(fd, fileline); 595 weather_getline(fd, fileline); 596 changepic(day2_i, fileline); 597 changepic(sday2_i, fileline); 598 599 weather_getline(fd, fileline); 600 changetext(day3_d, fileline); 601 changetext(sday3_d, fileline); 602 weather_getline(fd, fileline);weather_getline(fd, fileline); 603 changetext(day3_t, fileline); 604 changetext(sday3_t, fileline); 605 weather_getline(fd, fileline); 606 weather_getline(fd, fileline); 607 changepic(day3_i, fileline); 608 changepic(sday3_i, fileline); 609 } 610 else 611 { 612 weather_getline(fd, fileline);weather_getline(fd, fileline); 613 changetext(day0_d, fileline); 614 weather_getline(fd, fileline);weather_getline(fd, fileline); 615 changetext(day0_t, fileline); 616 weather_getline(fd, fileline); 617 weather_getline(fd, fileline); 618 changepic(day0_i, fileline); 619 620 weather_getline(fd, fileline); 621 changetext(day1_d, fileline); 622 weather_getline(fd, fileline);weather_getline(fd, fileline); 623 changetext(day1_t, fileline); 624 weather_getline(fd, fileline); 625 weather_getline(fd, fileline); 626 changepic(day1_i, fileline); 627 628 weather_getline(fd, fileline); 629 changetext(day2_d, fileline); 630 weather_getline(fd, fileline);weather_getline(fd, fileline); 631 changetext(day2_t, fileline); 632 weather_getline(fd, fileline); 633 weather_getline(fd, fileline); 634 changepic(day2_i, fileline); 635 636 weather_getline(fd, fileline); 637 changetext(day3_d, fileline); 638 weather_getline(fd, fileline);weather_getline(fd, fileline); 639 changetext(day3_t, fileline); 640 weather_getline(fd, fileline); 641 weather_getline(fd, fileline); 642 changepic(day3_i, fileline); 643 } 644 fclose(fd); 645 } 646 free(fileline); fileline=NULL; 647 } 648 weatherwrite = 1; 649 } 650 } 651 } 652 } 653 if(standby == 0) 654 { 655 if(akttime != NULL) 656 changetext(akttime, tmpstr); 657 if(n_minute != NULL && digitaluhr == 0) 658 { 659 free(tmpstr);tmpstr=NULL; 660 tmpstr = ostrcat("min_",gettime(NULL, "%M"), 0, 0); 661 free(n_minute->pic); 662 n_minute->pic = string_replace("min_mm", tmpstr, picmin, 0); 663 free(tmpstr);tmpstr=NULL; 664 } 665 if(n_stunde != NULL && digitaluhr == 0) 666 { 667 free(tmpstr);tmpstr=NULL; 668 if(hr >= 12) 669 hr = hr - 12; 670 if(hr < 10) 671 tmpstr = ostrcat("hr_0",oitoa(hr), 0, 1); 672 else 673 tmpstr = ostrcat("hr_",oitoa(hr), 0, 1); 674 if(min < 12) 675 tmpstr = ostrcat(tmpstr,"00", 0, 0); 676 else if(min < 24) 677 tmpstr = ostrcat(tmpstr,"12", 0, 0); 678 else if(min < 36) 679 tmpstr = ostrcat(tmpstr,"24", 0, 0); 680 else if(min < 48) 681 tmpstr = ostrcat(tmpstr,"36", 0, 0); 682 else if(min < 60) 683 tmpstr = ostrcat(tmpstr,"48", 0, 0); 684 free(n_stunde->pic); 685 n_stunde->pic = string_replace("hr_hhmm", tmpstr, pichr, 0); 686 free(tmpstr);tmpstr=NULL; 687 } 688 if(digitaluhr == 1) 689 { 690 free(tmpstr);tmpstr=NULL; 691 tmpstr = ostrcat("wert_",oitoa(hr/10), 0, 1); 692 n_stunde->pic = string_replace("wert_w", tmpstr, pichr, 0); 693 free(tmpstr);tmpstr=NULL; 694 tmpstr = ostrcat("wert_",oitoa(hr%10), 0, 1); 695 n_stunde2->pic = string_replace("wert_w", tmpstr, pichr2, 0); 696 free(tmpstr);tmpstr=NULL; 697 tmpstr = ostrcat("wert_",oitoa(min/10), 0, 1); 698 n_minute->pic = string_replace("wert_w", tmpstr, picmin, 0); 699 free(tmpstr);tmpstr=NULL; 700 tmpstr = ostrcat("wert_",oitoa(min%10), 0, 1); 701 n_minute2->pic = string_replace("wert_w", tmpstr, picmin2, 0); 702 free(tmpstr);tmpstr=NULL; 703 } 704 705 706 if(drawscreen(LCD_Samsung1, 0, 0) == -2) 707 printf("nicht genug Speicher fuer drawscreen\n"); 708 } 709 else if(standby == 2) 710 { 711 if(akttime_Standby != NULL) 712 changetext(akttime_Standby, tmpstr); 713 if(n_minute_standby != NULL && digitaluhr_standby == 0) 714 { 715 free(tmpstr);tmpstr=NULL; 716 tmpstr = ostrcat("min_",gettime(NULL, "%M"), 0, 0); 717 free(n_minute_standby->pic); 718 n_minute_standby->pic = string_replace("min_mm", tmpstr, picmin_standby, 0); 719 free(tmpstr);tmpstr=NULL; 720 } 721 if(n_stunde_standby != NULL && digitaluhr_standby == 0) 722 { 723 free(tmpstr);tmpstr=NULL; 724 if(hr >= 12) 725 hr = hr - 12; 726 if(hr < 10) 727 tmpstr = ostrcat("hr_0",oitoa(hr), 0, 1); 728 else 729 tmpstr = ostrcat("hr_",oitoa(hr), 0, 1); 730 if(min < 12) 731 tmpstr = ostrcat(tmpstr,"00", 0, 0); 732 else if(min < 24) 733 tmpstr = ostrcat(tmpstr,"12", 0, 0); 734 else if(min < 36) 735 tmpstr = ostrcat(tmpstr,"24", 0, 0); 736 else if(min < 48) 737 tmpstr = ostrcat(tmpstr,"36", 0, 0); 738 else if(min < 60) 739 tmpstr = ostrcat(tmpstr,"48", 0, 0); 740 free(n_stunde_standby->pic); 741 n_stunde_standby->pic = string_replace("hr_hhmm", tmpstr, pichr_standby, 0); 742 free(tmpstr);tmpstr=NULL; 743 } 744 if(digitaluhr_standby == 1) 745 { 746 free(tmpstr);tmpstr=NULL; 747 tmpstr = ostrcat("wert_",oitoa(hr/10), 0, 1); 748 n_stunde_standby->pic = string_replace("wert_w", tmpstr, pichr_standby, 0); 749 free(tmpstr);tmpstr=NULL; 750 tmpstr = ostrcat("wert_",oitoa(hr%10), 0, 1); 751 n_stunde2_standby->pic = string_replace("wert_w", tmpstr, pichr2_standby, 0); 752 free(tmpstr);tmpstr=NULL; 753 tmpstr = ostrcat("wert_",oitoa(min/10), 0, 1); 754 n_minute_standby->pic = string_replace("wert_w", tmpstr, picmin_standby, 0); 755 free(tmpstr);tmpstr=NULL; 756 tmpstr = ostrcat("wert_",oitoa(min%10), 0, 1); 757 n_minute2_standby->pic = string_replace("wert_w", tmpstr, picmin2_standby, 0); 758 free(tmpstr);tmpstr=NULL; 759 } 760 761 drawscreen(LCD_Standby, 0, 0); 762 put = 0; 763 } 779 pos = playergetpts() / 90000; 780 len = playergetlength(); 764 781 } 765 else if(type == 2) 766 { 767 if(status.mcaktiv == 1) 768 playertype = 0; 769 else 770 playertype = getconfigint("playertype", NULL); 771 772 if(playertype == 1) 773 { 774 unsigned long long int startpos = 0; 775 playergetinfots(&len, &startpos, NULL, &pos, NULL, 0); 776 len = len / 90000; 777 pos = (pos - startpos) / 90000; 778 } 779 else 780 { 781 pos = playergetpts() / 90000; 782 len = playergetlength(); 783 } 784 if(pos < 0) pos = 0; 785 reverse = len - pos; 786 if(len == 0) 787 sprogress->progresssize = 0; 788 else 789 sprogress->progresssize = pos * 100 / len; 790 791 tmpstr2 = convert_timesec(pos); 792 changetext(spos, tmpstr2); 793 free(tmpstr2); tmpstr2 = NULL; 794 795 tmpstr2 = convert_timesec(len); 796 changetext(slen, tmpstr2); 797 free(tmpstr2); tmpstr2 = NULL; 798 799 tmpstr2 = convert_timesec(reverse); 800 changetext(sreverse, tmpstr2); 801 free(tmpstr2); tmpstr2 = NULL; 802 803 changetext(akttimeplay, tmpstr); 804 changetext(stitle, basename(status.playfile)); 805 if(drawscreen(LCD_Play, 0, 0) == -2) 806 printf("nicht genug Speicher fuer drawscreen\n"); 807 } 782 if(pos < 0) pos = 0; 783 reverse = len - pos; 784 if(len == 0) 785 sprogress->progresssize = 0; 786 else 787 sprogress->progresssize = pos * 100 / len; 788 789 tmpstr2 = convert_timesec(pos); 790 changetext(spos, tmpstr2); 791 free(tmpstr2); tmpstr2 = NULL; 792 793 tmpstr2 = convert_timesec(len); 794 changetext(slen, tmpstr2); 795 free(tmpstr2); tmpstr2 = NULL; 796 797 tmpstr2 = convert_timesec(reverse); 798 changetext(sreverse, tmpstr2); 799 free(tmpstr2); tmpstr2 = NULL; 800 801 changetext(akttimeplay, tmpstr); 802 changetext(stitle, basename(status.playfile)); 803 if(drawscreen(LCD_Play, 0, 0) == -2) 804 printf("nicht genug Speicher fuer drawscreen\n"); 808 805 } 809 806 } 810 else 811 { 812 if(standby == 2) 807 } 808 else 809 { 810 if(standby == 2) 811 { 812 if(put == 1) 813 813 { 814 if(put == 1) 815 { 816 changetext(akttime_Standby, tmpstr); 817 drawscreen(LCD_Standby, 0, 0); 818 put = 0; 819 } 814 changetext(akttime_Standby, tmpstr); 815 drawscreen(LCD_Standby, 0, 0); 816 put = 0; 820 817 } 821 } 822 } 818 } 819 } 820 823 821 free(tmpstr); tmpstr = NULL; 824 822 free(tmpstr2); tmpstr2 = NULL; -
titan/plugins/mc/mc_dateibrowser.h
r21546 r28322 4 4 void screenmc_dateibrowser() 5 5 { 6 // if(status.security == 1) 7 // { 8 int treffer = 0; 9 struct skin* pluginnode = NULL; 10 void (*startplugin)(void); 11 struct skin* plugin = getscreen("plugin"); 12 struct skin* child = plugin->child; 6 int treffer = 0; 7 struct skin* pluginnode = NULL; 8 void (*startplugin)(void); 9 struct skin* plugin = getscreen("plugin"); 10 struct skin* child = plugin->child; 13 11 14 while(child != NULL) 12 while(child != NULL) 13 { 14 if(child->del == PLUGINDELMARK) 15 15 { 16 if(child->del == PLUGINDELMARK) 16 if(ostrcmp(child->name, "File Manager") == 0) 17 treffer = 1; 18 } 19 child = child->next; 20 } 21 22 if(treffer == 1) 23 { 24 pluginnode = getplugin("File Manager"); 25 26 if(pluginnode != NULL) 27 { 28 startplugin = dlsym(pluginnode->pluginhandle, "start"); 29 if(startplugin != NULL) 17 30 { 18 if(ostrcmp(child->name, "File Manager") == 0) 19 treffer = 1; 20 } 21 child = child->next; 22 } 23 24 if(treffer == 1) 25 { 26 pluginnode = getplugin("File Manager"); 27 28 if(pluginnode != NULL) 29 { 30 startplugin = dlsym(pluginnode->pluginhandle, "start"); 31 if(startplugin != NULL) 32 { 33 startplugin(); 34 } 31 startplugin(); 35 32 } 36 33 } 37 else 38 textbox(_("Message"), _("Install File Manager Tpk first !"), _("OK"), getrcconfigint("rcok", NULL), _("EXIT"), getrcconfigint("rcexit", NULL), NULL, 0, NULL, 0, 1000, 200, 0, 0); 39 // } 40 // else 41 // textbox(_("Message"), _("Registration needed, please contact Atemio !"), _("OK"), getrcconfigint("rcok", NULL), _("EXIT"), getrcconfigint("rcexit", NULL), NULL, 0, NULL, 0, 1000, 200, 0, 0); 34 } 35 else 36 textbox(_("Message"), _("Install File Manager Tpk first !"), _("OK"), getrcconfigint("rcok", NULL), _("EXIT"), getrcconfigint("rcexit", NULL), NULL, 0, NULL, 0, 1000, 200, 0, 0); 42 37 } 43 38 -
titan/plugins/mc/mc_internetbrowser.h
r21546 r28322 4 4 void screenmc_internetbrowser() 5 5 { 6 if(status.security == 1) 6 int treffer = 0; 7 struct skin* pluginnode = NULL; 8 void (*startplugin)(void); 9 struct skin* plugin = getscreen("plugin"); 10 struct skin* child = plugin->child; 11 12 while(child != NULL) 7 13 { 8 int treffer = 0; 9 struct skin* pluginnode = NULL; 10 void (*startplugin)(void); 11 struct skin* plugin = getscreen("plugin"); 12 struct skin* child = plugin->child; 14 if(child->del == PLUGINDELMARK) 15 { 16 if(ostrcmp(child->name, "Internet Browser") == 0) 17 treffer = 1; 18 } 19 child = child->next; 20 } 13 21 14 while(child != NULL) 22 if(treffer == 1) 23 { 24 pluginnode = getplugin("Internet Browser"); 25 26 if(pluginnode != NULL) 15 27 { 16 if(child->del == PLUGINDELMARK) 28 startplugin = dlsym(pluginnode->pluginhandle, "start"); 29 if(startplugin != NULL) 17 30 { 18 if(ostrcmp(child->name, "Internet Browser") == 0) 19 treffer = 1; 20 } 21 child = child->next; 22 } 23 24 if(treffer == 1) 25 { 26 pluginnode = getplugin("Internet Browser"); 27 28 if(pluginnode != NULL) 29 { 30 startplugin = dlsym(pluginnode->pluginhandle, "start"); 31 if(startplugin != NULL) 32 { 33 startplugin(); 34 } 31 startplugin(); 35 32 } 36 33 } 37 else38 textbox(_("Message"), _("Install netsurf Internetbrowser Tpk first !"), _("OK"), getrcconfigint("rcok", NULL), _("EXIT"), getrcconfigint("rcexit", NULL), NULL, 0, NULL, 0, 1000, 200, 0, 0);39 34 } 40 35 else 41 textbox(_("Message"), _(" Registration needed, please contact Atemio!"), _("OK"), getrcconfigint("rcok", NULL), _("EXIT"), getrcconfigint("rcexit", NULL), NULL, 0, NULL, 0, 1000, 200, 0, 0);36 textbox(_("Message"), _("Install netsurf Internetbrowser Tpk first !"), _("OK"), getrcconfigint("rcok", NULL), _("EXIT"), getrcconfigint("rcexit", NULL), NULL, 0, NULL, 0, 1000, 200, 0, 0); 42 37 } 43 38 -
titan/plugins/mc/mc_mediathek.h
r21546 r28322 4 4 void screenmc_mediathek() 5 5 { 6 // if(status.security == 1) 7 // { 8 int treffer = 0; 9 struct skin* pluginnode = NULL; 10 void (*startplugin)(void); 11 struct skin* plugin = getscreen("plugin"); 12 struct skin* child = plugin->child; 6 int treffer = 0; 7 struct skin* pluginnode = NULL; 8 void (*startplugin)(void); 9 struct skin* plugin = getscreen("plugin"); 10 struct skin* child = plugin->child; 13 11 14 while(child != NULL) 12 while(child != NULL) 13 { 14 if(child->del == PLUGINDELMARK) 15 15 { 16 if(child->del == PLUGINDELMARK) 16 if(ostrcmp(child->name, "TiTan Mediathek") == 0) 17 treffer = 1; 18 } 19 child = child->next; 20 } 21 22 if(treffer == 1) 23 { 24 pluginnode = getplugin("TiTan Mediathek"); 25 if(pluginnode != NULL) 26 { 27 startplugin = dlsym(pluginnode->pluginhandle, "start"); 28 if(startplugin != NULL) 17 29 { 18 if(ostrcmp(child->name, "TiTan Mediathek") == 0) 19 treffer = 1; 20 } 21 child = child->next; 22 } 23 24 if(treffer == 1) 25 { 26 pluginnode = getplugin("TiTan Mediathek"); 27 if(pluginnode != NULL) 28 { 29 startplugin = dlsym(pluginnode->pluginhandle, "start"); 30 if(startplugin != NULL) 31 { 32 startplugin(); 33 } 30 startplugin(); 34 31 } 35 32 } 36 else 37 textbox(_("Message"), _("Install Tithek Tpk first !"), _("OK"), getrcconfigint("rcok", NULL), _("EXIT"), getrcconfigint("rcexit", NULL), NULL, 0, NULL, 0, 1000, 200, 0, 0); 38 // } 39 // else 40 // textbox(_("Message"), _("Registration needed, please contact Atemio !"), _("OK"), getrcconfigint("rcok", NULL), _("EXIT"), getrcconfigint("rcexit", NULL), NULL, 0, NULL, 0, 1000, 200, 0, 0); 33 } 34 else 35 textbox(_("Message"), _("Install Tithek Tpk first !"), _("OK"), getrcconfigint("rcok", NULL), _("EXIT"), getrcconfigint("rcexit", NULL), NULL, 0, NULL, 0, 1000, 200, 0, 0); 41 36 } 42 37 -
titan/plugins/mc/mc_wetterinfo.h
r21799 r28322 4 4 void screenmc_wetterinfo() 5 5 { 6 if(status.security == 1) 6 int treffer = 0; 7 struct skin* pluginnode = NULL; 8 void (*startplugin)(void); 9 struct skin* plugin = getscreen("plugin"); 10 struct skin* child = plugin->child; 11 12 while(child != NULL) 7 13 { 8 int treffer = 0; 9 struct skin* pluginnode = NULL; 10 void (*startplugin)(void); 11 struct skin* plugin = getscreen("plugin"); 12 struct skin* child = plugin->child; 14 if(child->del == PLUGINDELMARK) 15 { 16 if(ostrcmp(child->name, "Weather") == 0) 17 treffer = 1; 18 } 19 child = child->next; 20 } 13 21 14 while(child != NULL) 22 if(treffer == 1) 23 { 24 pluginnode = getplugin("Weather"); 25 26 if(pluginnode != NULL) 15 27 { 16 if(child->del == PLUGINDELMARK) 28 startplugin = dlsym(pluginnode->pluginhandle, "start"); 29 if(startplugin != NULL) 17 30 { 18 if(ostrcmp(child->name, "Weather") == 0) 19 treffer = 1; 20 } 21 child = child->next; 22 } 23 24 if(treffer == 1) 25 { 26 pluginnode = getplugin("Weather"); 27 28 if(pluginnode != NULL) 29 { 30 startplugin = dlsym(pluginnode->pluginhandle, "start"); 31 if(startplugin != NULL) 32 { 33 startplugin(); 34 } 31 startplugin(); 35 32 } 36 33 } 37 else38 textbox(_("Message"), _("Install Weather Tpk first !"), _("OK"), getrcconfigint("rcok", NULL), _("EXIT"), getrcconfigint("rcexit", NULL), NULL, 0, NULL, 0, 1000, 200, 0, 0);39 34 } 40 35 else 41 textbox(_("Message"), _(" Registration needed, please contact Atemio!"), _("OK"), getrcconfigint("rcok", NULL), _("EXIT"), getrcconfigint("rcexit", NULL), NULL, 0, NULL, 0, 1000, 200, 0, 0);36 textbox(_("Message"), _("Install Weather Tpk first !"), _("OK"), getrcconfigint("rcok", NULL), _("EXIT"), getrcconfigint("rcexit", NULL), NULL, 0, NULL, 0, 1000, 200, 0, 0); 42 37 } 43 38 -
titan/plugins/stopifnotused/stopifnotused.c
r24056 r28322 2 2 #include "../../titan/debug.h" 3 3 #include "../../titan/header.h" 4 #include "../../titan/list.h"5 4 6 5 char pluginname[] = "Stop if not used"; -
titan/plugins/tithek/tithek.h
r28061 r28322 1167 1167 { 1168 1168 int flag = 0; 1169 if(status.security == 1 || checkbox("WHITEBOX") == 1) 1170 { 1171 drawscreen(load, 0, 0); 1172 char* tmpstr = ostrcat(((struct tithek*)listbox->select->handle)->link, NULL, 0, 0); 1173 char* tmpstr1 = NULL; 1174 1175 if(((struct tithek*)listbox->select->handle)->flag == 2) 1176 { 1177 if(tmpstr != NULL) tmpstr1 = ostrcat(tmpstr, NULL, 0, 0); 1178 } 1179 else if(((struct tithek*)listbox->select->handle)->flag == 4) 1180 { 1181 if(tmpstr != NULL) tmpstr1 = youtube(tmpstr, NULL, NULL, 1); 1182 } 1183 else if(((struct tithek*)listbox->select->handle)->flag == 5) 1184 { 1185 if(tmpstr != NULL) tmpstr1 = rtl2now(tmpstr, "http://rtl2now.rtl2.de", "rtl2now", 1); 1186 } 1187 else if(((struct tithek*)listbox->select->handle)->flag == 6) 1188 { 1189 if(tmpstr != NULL) tmpstr1 = rtl2now(tmpstr, "http://www.superrtlnow.de", "superrtlnow", 1); 1190 } 1191 else if(((struct tithek*)listbox->select->handle)->flag == 7) 1192 { 1193 if(tmpstr != NULL) tmpstr1 = rtl2now(tmpstr, "http://rtl-now.rtl.de", "rtlnow", 1); 1194 } 1195 else if(((struct tithek*)listbox->select->handle)->flag == 8) 1196 { 1197 if(tmpstr != NULL) tmpstr1 = rtl2now(tmpstr, "http://www.voxnow.de", "voxnow", 1); 1198 } 1199 else if(((struct tithek*)listbox->select->handle)->flag == 12) 1200 { 1201 if(tmpstr != NULL) tmpstr1 = myvideo(tmpstr, NULL, NULL, 1); 1202 } 1203 else if(((struct tithek*)listbox->select->handle)->flag == 14) 1204 { 1205 if(tmpstr != NULL) tmpstr1 = kinox(tmpstr); 1206 } 1207 else if(((struct tithek*)listbox->select->handle)->flag == 16) 1208 { 1209 if(tmpstr != NULL) tmpstr1 = rtl2now(tmpstr, "http://www.superrtlnow.de", "superrtlnow", 1); 1210 } 1211 else if(((struct tithek*)listbox->select->handle)->flag == 17) 1212 { 1213 if(tmpstr != NULL) tmpstr1 = rtl2now(tmpstr, "http://rtl-now.rtl.de", "rtlnow", 1); 1214 } 1215 else if(((struct tithek*)listbox->select->handle)->flag == 18) 1216 { 1217 if(tmpstr != NULL) tmpstr1 = rtl2now(tmpstr, "http://www.voxnow.de", "voxnow", 1); 1218 } 1219 else if(((struct tithek*)listbox->select->handle)->flag == 19) 1220 { 1221 if(tmpstr != NULL) tmpstr1 = rtl2now(tmpstr, "http://rtl2now.rtl2.de", "rtl2now", 1); 1222 } 1223 else if(((struct tithek*)listbox->select->handle)->flag == 38) 1224 { 1225 if(tmpstr != NULL) tmpstr1 = mlehd(tmpstr); 1226 } 1227 else if(((struct tithek*)listbox->select->handle)->flag == 41) 1228 { 1229 if(tmpstr != NULL) tmpstr1 = movie4k(tmpstr); 1230 } 1231 else if(((struct tithek*)listbox->select->handle)->flag == 42) 1232 { 1233 if(tmpstr != NULL) tmpstr1 = xvideos(tmpstr); 1234 } 1235 else if(((struct tithek*)listbox->select->handle)->flag == 43) 1236 { 1237 if(tmpstr != NULL) tmpstr1 = solarmovie(tmpstr); 1238 } 1239 else if(((struct tithek*)listbox->select->handle)->flag == 45) 1240 { 1241 if(tmpstr != NULL) tmpstr1 = ard(tmpstr); 1242 } 1243 else if(((struct tithek*)listbox->select->handle)->flag == 46) 1244 { 1245 if(tmpstr != NULL) tmpstr1 = zdf(tmpstr); 1246 } 1247 else if(((struct tithek*)listbox->select->handle)->flag == 50) 1248 { 1249 if(tmpstr != NULL) tmpstr1 = beeg(tmpstr); 1250 } 1251 free(tmpstr); tmpstr = NULL; 1252 1253 if(ostrstr(title, "Internet Radio") != NULL) 1254 flag = 4; 1255 1256 if(ostrstr(tmpstr1, "&") != NULL) 1257 { 1258 printf("change streamurl from: %s\n", tmpstr1); 1259 tmpstr1 = string_replace_all("&", "&", tmpstr1, 1); 1260 printf("change streamurl to: %s\n", tmpstr1); 1261 } 1262 1263 if(tmpstr1 != NULL) 1264 { 1265 char* filename = ostrcat(title, "_", 0, 0); 1266 filename = ostrcat(filename, ((struct tithek*)listbox->select->handle)->title, 1, 0); 1267 filename = ostrcat(filename, ".mp4", 1, 0); 1268 filename = string_replace_all(" ", ".", filename, 1); 1269 filename = string_replace_all("-", "_", filename, 1); 1270 filename = string_replace_all("._.", "_", filename, 1); 1271 debug(99, "filename: %s", filename); 1272 1273 char* keyconf = NULL; 1274 char* skintitle = _("Choice Playback"); 1275 struct menulist* mlist = NULL, *mbox = NULL; 1276 1277 // needed for autopo 1278 char* tmptxt = NULL; 1279 tmptxt = ostrcat(tmptxt, _("Streaming Playback (default)"), 1, 0); 1280 tmptxt = ostrcat(tmptxt, _("Streaming Playback Caching (0.5MB)"), 1, 0); 1281 tmptxt = ostrcat(tmptxt, _("Streaming Playback Caching (1MB)"), 1, 0); 1282 tmptxt = ostrcat(tmptxt, _("Streaming Playback Caching (2MB)"), 1, 0); 1283 tmptxt = ostrcat(tmptxt, _("Streaming Playback Caching (3MB)"), 1, 0); 1284 tmptxt = ostrcat(tmptxt, _("Streaming Playback Caching (4MB)"), 1, 0); 1285 tmptxt = ostrcat(tmptxt, _("Streaming Playback Caching (5MB)"), 1, 0); 1286 tmptxt = ostrcat(tmptxt, _("Streaming Playback Caching (7.5MB)"), 1, 0); 1287 tmptxt = ostrcat(tmptxt, _("Streaming Playback Caching (10MB)"), 1, 0); 1288 tmptxt = ostrcat(tmptxt, _("File Caching Playback (10MB / 120s)"), 1, 0); 1289 tmptxt = ostrcat(tmptxt, _("File Caching Playback (20MB / 240s)"), 1, 0); 1290 tmptxt = ostrcat(tmptxt, _("File Caching Playback (30MB / 360s)"), 1, 0); 1291 tmptxt = ostrcat(tmptxt, _("Download Full File"), 1, 0); 1292 tmptxt = ostrcat(tmptxt, _("Download Full File (background)"), 1, 0); 1293 free(tmptxt), tmptxt = NULL; 1169 1170 drawscreen(load, 0, 0); 1171 char* tmpstr = ostrcat(((struct tithek*)listbox->select->handle)->link, NULL, 0, 0); 1172 char* tmpstr1 = NULL; 1173 1174 if(((struct tithek*)listbox->select->handle)->flag == 2) 1175 { 1176 if(tmpstr != NULL) tmpstr1 = ostrcat(tmpstr, NULL, 0, 0); 1177 } 1178 else if(((struct tithek*)listbox->select->handle)->flag == 4) 1179 { 1180 if(tmpstr != NULL) tmpstr1 = youtube(tmpstr, NULL, NULL, 1); 1181 } 1182 else if(((struct tithek*)listbox->select->handle)->flag == 5) 1183 { 1184 if(tmpstr != NULL) tmpstr1 = rtl2now(tmpstr, "http://rtl2now.rtl2.de", "rtl2now", 1); 1185 } 1186 else if(((struct tithek*)listbox->select->handle)->flag == 6) 1187 { 1188 if(tmpstr != NULL) tmpstr1 = rtl2now(tmpstr, "http://www.superrtlnow.de", "superrtlnow", 1); 1189 } 1190 else if(((struct tithek*)listbox->select->handle)->flag == 7) 1191 { 1192 if(tmpstr != NULL) tmpstr1 = rtl2now(tmpstr, "http://rtl-now.rtl.de", "rtlnow", 1); 1193 } 1194 else if(((struct tithek*)listbox->select->handle)->flag == 8) 1195 { 1196 if(tmpstr != NULL) tmpstr1 = rtl2now(tmpstr, "http://www.voxnow.de", "voxnow", 1); 1197 } 1198 else if(((struct tithek*)listbox->select->handle)->flag == 12) 1199 { 1200 if(tmpstr != NULL) tmpstr1 = myvideo(tmpstr, NULL, NULL, 1); 1201 } 1202 else if(((struct tithek*)listbox->select->handle)->flag == 14) 1203 { 1204 if(tmpstr != NULL) tmpstr1 = kinox(tmpstr); 1205 } 1206 else if(((struct tithek*)listbox->select->handle)->flag == 16) 1207 { 1208 if(tmpstr != NULL) tmpstr1 = rtl2now(tmpstr, "http://www.superrtlnow.de", "superrtlnow", 1); 1209 } 1210 else if(((struct tithek*)listbox->select->handle)->flag == 17) 1211 { 1212 if(tmpstr != NULL) tmpstr1 = rtl2now(tmpstr, "http://rtl-now.rtl.de", "rtlnow", 1); 1213 } 1214 else if(((struct tithek*)listbox->select->handle)->flag == 18) 1215 { 1216 if(tmpstr != NULL) tmpstr1 = rtl2now(tmpstr, "http://www.voxnow.de", "voxnow", 1); 1217 } 1218 else if(((struct tithek*)listbox->select->handle)->flag == 19) 1219 { 1220 if(tmpstr != NULL) tmpstr1 = rtl2now(tmpstr, "http://rtl2now.rtl2.de", "rtl2now", 1); 1221 } 1222 else if(((struct tithek*)listbox->select->handle)->flag == 38) 1223 { 1224 if(tmpstr != NULL) tmpstr1 = mlehd(tmpstr); 1225 } 1226 else if(((struct tithek*)listbox->select->handle)->flag == 41) 1227 { 1228 if(tmpstr != NULL) tmpstr1 = movie4k(tmpstr); 1229 } 1230 else if(((struct tithek*)listbox->select->handle)->flag == 42) 1231 { 1232 if(tmpstr != NULL) tmpstr1 = xvideos(tmpstr); 1233 } 1234 else if(((struct tithek*)listbox->select->handle)->flag == 43) 1235 { 1236 if(tmpstr != NULL) tmpstr1 = solarmovie(tmpstr); 1237 } 1238 else if(((struct tithek*)listbox->select->handle)->flag == 45) 1239 { 1240 if(tmpstr != NULL) tmpstr1 = ard(tmpstr); 1241 } 1242 else if(((struct tithek*)listbox->select->handle)->flag == 46) 1243 { 1244 if(tmpstr != NULL) tmpstr1 = zdf(tmpstr); 1245 } 1246 else if(((struct tithek*)listbox->select->handle)->flag == 50) 1247 { 1248 if(tmpstr != NULL) tmpstr1 = beeg(tmpstr); 1249 } 1250 free(tmpstr); tmpstr = NULL; 1251 1252 if(ostrstr(title, "Internet Radio") != NULL) 1253 flag = 4; 1254 1255 if(ostrstr(tmpstr1, "&") != NULL) 1256 { 1257 printf("change streamurl from: %s\n", tmpstr1); 1258 tmpstr1 = string_replace_all("&", "&", tmpstr1, 1); 1259 printf("change streamurl to: %s\n", tmpstr1); 1260 } 1294 1261 1295 addmenulist(&mlist, "Streaming Playback (default)", NULL, NULL, 0, 0); 1296 1297 if(!ostrncmp("http://", tmpstr1, 7)) 1262 if(tmpstr1 != NULL) 1263 { 1264 char* filename = ostrcat(title, "_", 0, 0); 1265 filename = ostrcat(filename, ((struct tithek*)listbox->select->handle)->title, 1, 0); 1266 filename = ostrcat(filename, ".mp4", 1, 0); 1267 filename = string_replace_all(" ", ".", filename, 1); 1268 filename = string_replace_all("-", "_", filename, 1); 1269 filename = string_replace_all("._.", "_", filename, 1); 1270 debug(99, "filename: %s", filename); 1271 1272 char* keyconf = NULL; 1273 char* skintitle = _("Choice Playback"); 1274 struct menulist* mlist = NULL, *mbox = NULL; 1275 1276 // needed for autopo 1277 char* tmptxt = NULL; 1278 tmptxt = ostrcat(tmptxt, _("Streaming Playback (default)"), 1, 0); 1279 tmptxt = ostrcat(tmptxt, _("Streaming Playback Caching (0.5MB)"), 1, 0); 1280 tmptxt = ostrcat(tmptxt, _("Streaming Playback Caching (1MB)"), 1, 0); 1281 tmptxt = ostrcat(tmptxt, _("Streaming Playback Caching (2MB)"), 1, 0); 1282 tmptxt = ostrcat(tmptxt, _("Streaming Playback Caching (3MB)"), 1, 0); 1283 tmptxt = ostrcat(tmptxt, _("Streaming Playback Caching (4MB)"), 1, 0); 1284 tmptxt = ostrcat(tmptxt, _("Streaming Playback Caching (5MB)"), 1, 0); 1285 tmptxt = ostrcat(tmptxt, _("Streaming Playback Caching (7.5MB)"), 1, 0); 1286 tmptxt = ostrcat(tmptxt, _("Streaming Playback Caching (10MB)"), 1, 0); 1287 tmptxt = ostrcat(tmptxt, _("File Caching Playback (10MB / 120s)"), 1, 0); 1288 tmptxt = ostrcat(tmptxt, _("File Caching Playback (20MB / 240s)"), 1, 0); 1289 tmptxt = ostrcat(tmptxt, _("File Caching Playback (30MB / 360s)"), 1, 0); 1290 tmptxt = ostrcat(tmptxt, _("Download Full File"), 1, 0); 1291 tmptxt = ostrcat(tmptxt, _("Download Full File (background)"), 1, 0); 1292 free(tmptxt), tmptxt = NULL; 1293 1294 addmenulist(&mlist, "Streaming Playback (default)", NULL, NULL, 0, 0); 1295 1296 if(!ostrncmp("http://", tmpstr1, 7)) 1297 { 1298 if(flag == 4) 1298 1299 { 1299 if(flag == 4)1300 {1301 1300 #ifdef EPLAYER3 1302 1303 1301 addmenulist(&mlist, "Streaming Playback Caching (0.5MB)", NULL, NULL, 0, 0); 1302 addmenulist(&mlist, "Streaming Playback Caching (1MB)", NULL, NULL, 0, 0); 1304 1303 #endif 1305 1306 1307 1304 } 1305 else if(!ostrncmp("http://", tmpstr1, 7)) 1306 { 1308 1307 #ifdef EPLAYER3 1309 1308 // addmenulist(&mlist, "Streaming Playback Caching (1MB)", NULL, NULL, 0, 0); … … 1311 1310 // addmenulist(&mlist, "Streaming Playback Caching (3MB)", NULL, NULL, 0, 0); 1312 1311 // addmenulist(&mlist, "Streaming Playback Caching (4MB)", NULL, NULL, 0, 0); 1313 1314 1315 1316 1312 if(checkbox("UFS910") == 1 && !file_exist("/var/swapdir/swapfile")) 1313 addmenulist(&mlist, "Streaming Playback Caching (5MB)", NULL, NULL, 0, 0); 1314 else 1315 { 1317 1316 // addmenulist(&mlist, "Streaming Playback Caching (7.5MB)", NULL, NULL, 0, 0); 1318 1319 1317 addmenulist(&mlist, "Streaming Playback Caching (10MB)", NULL, NULL, 0, 0); 1318 } 1320 1319 #endif 1321 1322 1320 if(file_exist(getconfig("rec_streampath", NULL)) && (status.expertmodus >= 11 || file_exist("/mnt/swapextensions/etc/.codecpack") || file_exist("/var/swap/etc/.codecpack") || file_exist("/var/etc/.codecpack"))) 1321 { 1323 1322 #ifndef EPLAYER3 1324 1325 1326 1323 addmenulist(&mlist, "File Caching Playback (10MB / 120s)", NULL, NULL, 0, 0); 1324 addmenulist(&mlist, "File Caching Playback (20MB / 240s)", NULL, NULL, 0, 0); 1325 addmenulist(&mlist, "File Caching Playback (30MB / 360s)", NULL, NULL, 0, 0); 1327 1326 #endif 1328 addmenulist(&mlist, "Download Full File", NULL, NULL, 0, 0); 1329 addmenulist(&mlist, "Download Full File (background)", NULL, NULL, 0, 0); 1330 } 1327 addmenulist(&mlist, "Download Full File", NULL, NULL, 0, 0); 1328 addmenulist(&mlist, "Download Full File (background)", NULL, NULL, 0, 0); 1331 1329 } 1332 1330 } 1333 mbox = menulistbox(mlist, NULL, skintitle, _("Choose your Streaming Playback Modus from the following list"), NULL, NULL, 1, 0); 1334 if(mbox != NULL) keyconf = mbox->name; 1335 debug(99, "tmpstr1: %s filename: %s flag: %d", tmpstr1, filename, flag); 1336 if(ostrcmp(keyconf, "Streaming Playback (default)") == 0) 1337 { 1338 addconfigtmp("playerbuffersize", "0"); 1339 screenplay(tmpstr1, filename, 2, flag); 1340 delconfigtmp("playerbuffersize"); 1331 } 1332 mbox = menulistbox(mlist, NULL, skintitle, _("Choose your Streaming Playback Modus from the following list"), NULL, NULL, 1, 0); 1333 if(mbox != NULL) keyconf = mbox->name; 1334 debug(99, "tmpstr1: %s filename: %s flag: %d", tmpstr1, filename, flag); 1335 if(ostrcmp(keyconf, "Streaming Playback (default)") == 0) 1336 { 1337 addconfigtmp("playerbuffersize", "0"); 1338 screenplay(tmpstr1, filename, 2, flag); 1339 delconfigtmp("playerbuffersize"); 1340 } 1341 else if(ostrcmp(keyconf, "Streaming Playback Caching (0.5MB)") == 0) 1342 { 1343 addconfigtmp("playerbuffersize", "524288"); 1344 screenplay(tmpstr1, filename, 2, flag); 1345 delconfigtmp("playerbuffersize"); 1346 } 1347 else if(ostrcmp(keyconf, "Streaming Playback Caching (1MB)") == 0) 1348 { 1349 addconfigtmp("playerbuffersize", "1048576"); 1350 screenplay(tmpstr1, filename, 2, flag); 1351 delconfigtmp("playerbuffersize"); 1352 } 1353 else if(ostrcmp(keyconf, "Streaming Playback Caching (2MB)") == 0) 1354 { 1355 addconfigtmp("playerbuffersize", "2097152"); 1356 screenplay(tmpstr1, filename, 2, flag); 1357 delconfigtmp("playerbuffersize"); 1358 } 1359 else if(ostrcmp(keyconf, "Streaming Playback Caching (3MB)") == 0) 1360 { 1361 addconfigtmp("playerbuffersize", "3145728"); 1362 screenplay(tmpstr1, filename, 2, flag); 1363 delconfigtmp("playerbuffersize"); 1364 } 1365 else if(ostrcmp(keyconf, "Streaming Playback Caching (4MB)") == 0) 1366 { 1367 addconfigtmp("playerbuffersize", "4194304"); 1368 screenplay(tmpstr1, filename, 2, flag); 1369 delconfigtmp("playerbuffersize"); 1370 } 1371 else if(ostrcmp(keyconf, "Streaming Playback Caching (5MB)") == 0) 1372 { 1373 addconfigtmp("playerbuffersize", "5242880"); 1374 screenplay(tmpstr1, filename, 2, flag); 1375 delconfigtmp("playerbuffersize"); 1376 } 1377 else if(ostrcmp(keyconf, "Streaming Playback Caching (7.5MB)") == 0) 1378 { 1379 addconfigtmp("playerbuffersize", "7864320"); 1380 screenplay(tmpstr1, filename, 2, flag); 1381 delconfigtmp("playerbuffersize"); 1382 } 1383 else if(ostrcmp(keyconf, "Streaming Playback Caching (10MB)") == 0) 1384 { 1385 addconfigtmp("playerbuffersize", "10485760"); 1386 screenplay(tmpstr1, filename, 2, flag); 1387 delconfigtmp("playerbuffersize"); 1388 } 1389 else if(ostrcmp(keyconf, "File Caching Playback (10MB / 120s)") == 0) 1390 { 1391 cacheplay(tmpstr1, filename, 1); 1392 } 1393 else if(ostrcmp(keyconf, "File Caching Playback (20MB / 240s)") == 0) 1394 { 1395 cacheplay(tmpstr1, filename, 2); 1396 } 1397 else if(ostrcmp(keyconf, "File Caching Playback (30MB / 360s)") == 0) 1398 { 1399 cacheplay(tmpstr1, filename, 3); 1400 } 1401 else if(ostrcmp(keyconf, "Download Full File") == 0) 1402 { 1403 char* search = textinput(_("Filename"), filename); 1404 if(search != NULL) 1405 { 1406 char* tmpstr2 = tithekdownload(tmpstr1, search, NULL, 0, 1); 1407 // drawscreen(grid, 0, 0); 1408 free(tmpstr2); tmpstr2 = NULL; 1409 1410 if(textbox(_("Message"), _("Start playback"), _("OK"), getrcconfigint("rcok", NULL), _("EXIT"), getrcconfigint("rcexit", NULL), NULL, 0, NULL, 0, 600, 200, 0, 0) == 1) 1411 { 1412 tmpstr2 = ostrcat(getconfig("rec_streampath", NULL), "/", 0, 0); 1413 tmpstr2 = ostrcat(tmpstr2, search, 1, 0); 1414 screenplay(tmpstr2, filename, 2, flag); 1415 free(tmpstr2); tmpstr2 = NULL; 1416 } 1341 1417 } 1342 else if(ostrcmp(keyconf, "Streaming Playback Caching (0.5MB)") == 0) 1343 { 1344 addconfigtmp("playerbuffersize", "524288"); 1345 screenplay(tmpstr1, filename, 2, flag); 1346 delconfigtmp("playerbuffersize"); 1347 } 1348 else if(ostrcmp(keyconf, "Streaming Playback Caching (1MB)") == 0) 1349 { 1350 addconfigtmp("playerbuffersize", "1048576"); 1351 screenplay(tmpstr1, filename, 2, flag); 1352 delconfigtmp("playerbuffersize"); 1353 } 1354 else if(ostrcmp(keyconf, "Streaming Playback Caching (2MB)") == 0) 1355 { 1356 addconfigtmp("playerbuffersize", "2097152"); 1357 screenplay(tmpstr1, filename, 2, flag); 1358 delconfigtmp("playerbuffersize"); 1359 } 1360 else if(ostrcmp(keyconf, "Streaming Playback Caching (3MB)") == 0) 1361 { 1362 addconfigtmp("playerbuffersize", "3145728"); 1363 screenplay(tmpstr1, filename, 2, flag); 1364 delconfigtmp("playerbuffersize"); 1365 } 1366 else if(ostrcmp(keyconf, "Streaming Playback Caching (4MB)") == 0) 1367 { 1368 addconfigtmp("playerbuffersize", "4194304"); 1369 screenplay(tmpstr1, filename, 2, flag); 1370 delconfigtmp("playerbuffersize"); 1371 } 1372 else if(ostrcmp(keyconf, "Streaming Playback Caching (5MB)") == 0) 1373 { 1374 addconfigtmp("playerbuffersize", "5242880"); 1375 screenplay(tmpstr1, filename, 2, flag); 1376 delconfigtmp("playerbuffersize"); 1377 } 1378 else if(ostrcmp(keyconf, "Streaming Playback Caching (7.5MB)") == 0) 1379 { 1380 addconfigtmp("playerbuffersize", "7864320"); 1381 screenplay(tmpstr1, filename, 2, flag); 1382 delconfigtmp("playerbuffersize"); 1383 } 1384 else if(ostrcmp(keyconf, "Streaming Playback Caching (10MB)") == 0) 1385 { 1386 addconfigtmp("playerbuffersize", "10485760"); 1387 screenplay(tmpstr1, filename, 2, flag); 1388 delconfigtmp("playerbuffersize"); 1389 } 1390 else if(ostrcmp(keyconf, "File Caching Playback (10MB / 120s)") == 0) 1391 { 1392 cacheplay(tmpstr1, filename, 1); 1393 } 1394 else if(ostrcmp(keyconf, "File Caching Playback (20MB / 240s)") == 0) 1395 { 1396 cacheplay(tmpstr1, filename, 2); 1397 } 1398 else if(ostrcmp(keyconf, "File Caching Playback (30MB / 360s)") == 0) 1399 { 1400 cacheplay(tmpstr1, filename, 3); 1401 } 1402 else if(ostrcmp(keyconf, "Download Full File") == 0) 1403 { 1404 char* search = textinput(_("Filename"), filename); 1405 if(search != NULL) 1406 { 1407 char* tmpstr2 = tithekdownload(tmpstr1, search, NULL, 0, 1); 1408 // drawscreen(grid, 0, 0); 1409 free(tmpstr2); tmpstr2 = NULL; 1410 1411 if(textbox(_("Message"), _("Start playback"), _("OK"), getrcconfigint("rcok", NULL), _("EXIT"), getrcconfigint("rcexit", NULL), NULL, 0, NULL, 0, 600, 200, 0, 0) == 1) 1412 { 1413 tmpstr2 = ostrcat(getconfig("rec_streampath", NULL), "/", 0, 0); 1414 tmpstr2 = ostrcat(tmpstr2, search, 1, 0); 1415 screenplay(tmpstr2, filename, 2, flag); 1416 free(tmpstr2); tmpstr2 = NULL; 1417 } 1418 } 1419 free(search), search = NULL; 1420 } 1421 else if(ostrcmp(keyconf, "Download Full File (background)") == 0) 1422 { 1423 char* search = textinput(_("Filename"), filename); 1424 if(search != NULL) 1425 backgrounddl(tmpstr1, search); 1426 free(search), search = NULL; 1427 } 1428 1429 free(filename), filename = NULL; 1430 freemenulist(mlist, 1); mlist = NULL; 1431 } 1432 else 1433 textbox(_("Message"), _("Can't get Streamurl !"), _("OK"), getrcconfigint("rcok", NULL), _("EXIT"), getrcconfigint("rcexit", NULL), NULL, 0, NULL, 0, 600, 200, 0, 0); 1434 1435 free(tmpstr1); tmpstr1 = NULL; 1418 free(search), search = NULL; 1419 } 1420 else if(ostrcmp(keyconf, "Download Full File (background)") == 0) 1421 { 1422 char* search = textinput(_("Filename"), filename); 1423 if(search != NULL) 1424 backgrounddl(tmpstr1, search); 1425 free(search), search = NULL; 1426 } 1427 1428 free(filename), filename = NULL; 1429 freemenulist(mlist, 1); mlist = NULL; 1436 1430 } 1437 1431 else 1438 textbox(_("Message"), _("Registration needed, please contact Atemio !"), _("OK"), getrcconfigint("rcok", NULL), _("EXIT"), getrcconfigint("rcexit", NULL), NULL, 0, NULL, 0, 1000, 200, 0, 0); 1432 textbox(_("Message"), _("Can't get Streamurl !"), _("OK"), getrcconfigint("rcok", NULL), _("EXIT"), getrcconfigint("rcexit", NULL), NULL, 0, NULL, 0, 600, 200, 0, 0); 1433 1434 free(tmpstr1); tmpstr1 = NULL; 1439 1435 } 1440 1436 -
titan/plugins/tmc/tmc.h
r25410 r28322 348 348 bg = savescreen(dir); 349 349 350 //if(status.expertmodus > 0 && status.security == 1)350 if(status.expertmodus >= 11 || file_exist("/mnt/swapextensions/etc/.codecpack") || file_exist("/var/swap/etc/.codecpack") || file_exist("/var/etc/.codecpack")) 351 351 formats = ostrcat(formats, "*.flac *.ogg *.mp3 *.avi *.dat *.divx *.flv *.mkv *.m4v *.mp4 *.mov *.mpg *.mpeg *.mts *.m2ts *.trp *.ts *.vdr *.vob *.wmv *.rm", 1, 0); 352 //else353 //formats = ostrcat(formats, "*.ts", 1, 0);352 else 353 formats = ostrcat(formats, "*.mp3 *.flac *.ogg *.avi *.mkv *.mpg *.mpeg *.ts", 1, 0); 354 354 355 355 ret = screendir(getconfig("rec_moviepath", NULL), formats, NULL, NULL, NULL, NULL, 0, "SELECT", getrcconfigint("rcgreen", NULL), NULL, 0, NULL, 0, dir->width, dir->prozwidth, dir->height, dir->prozheight, 0);
Note: See TracChangeset
for help on using the changeset viewer.