Changeset 38317
- Timestamp:
- 08/24/16 14:39:56 (7 years ago)
- Location:
- titan/titan
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
titan/titan/global.h
r37445 r38317 7628 7628 } 7629 7629 7630 int checkshutdown(int flag) 7631 { 7632 int i = 0; 7633 7634 //check if record running 7635 if((flag == 1 || flag == 2 || flag == 3 || flag == 4 || flag == 5) && (status.streaming > 0 || status.recording > 0 || getrectimerbytimediff(300) != NULL)) 7636 { 7637 if(flag == 4 && status.fixpowerofftime > 1) 7638 { 7639 status.fixpowerofftime = time(NULL) + 900; //check powerofftimer again in 15min 7640 return 1; 7641 } 7642 if(flag == 5 && status.sd_timer != NULL && status.sd_timer->active) 7643 { 7644 status.sd_timer->shutdown_time = time(NULL) + 900; //check powerofftimer again in 15min 7645 return 1; 7646 } 7647 7648 if(textbox(_("Message"), _("Found running record\nor record is starting in next time.\nReally shutdown ?"), _("OK"), getrcconfigint("rcok", NULL), _("EXIT"), getrcconfigint("rcexit", NULL), NULL, 0, NULL, 0, 600, 200, 15, 0) != 1) 7649 return 1; 7650 } 7651 7652 //check if download is running 7653 for(i = 0; i < MAXBGDOWNLOAD; i++) 7654 { 7655 if(bgdownload[i] != NULL && bgdownload[i]->ret == -1) 7656 { 7657 if(textbox(_("Message"), _("Found running download\nReally shutdown ?"), _("OK"), getrcconfigint("rcok", NULL), _("EXIT"), getrcconfigint("rcexit", NULL), NULL, 0, NULL, 0, 600, 200, 15, 0) != 1) 7658 return 1; 7659 break; 7660 } 7661 } 7662 7663 return 0; 7664 } 7665 7630 7666 #endif -
titan/titan/header.h
r37785 r38317 589 589 struct rectimer* addrectimernode(char* line, struct rectimer* last); 590 590 int checkrectimerconflict(struct rectimer* recnode); 591 struct rectimer* getrectimerbytimediff(time_t timediff); 591 592 592 593 //dvb.h -
titan/titan/titan.c
r37977 r38317 249 249 #endif 250 250 251 #define TIMECODE "14 69471993"251 #define TIMECODE "1472042241" 252 252 253 253 // mipsel start … … 330 330 timeshiftstop(3); 331 331 332 //check if record running 333 if((flag == 1 || flag == 2 || flag == 3 || flag == 4 || flag == 5) && (status.streaming > 0 || status.recording > 0 || getrectimerbytimediff(300) != NULL)) 334 { 335 if(flag == 4 && status.fixpowerofftime > 1) 336 { 337 status.fixpowerofftime = time(NULL) + 900; //check powerofftimer again in 15min 338 return; 339 } 340 if(flag == 5 && status.sd_timer != NULL && status.sd_timer->active) 341 { 342 status.sd_timer->shutdown_time = time(NULL) + 900; //check powerofftimer again in 15min 343 return; 344 } 345 346 if(textbox(_("Message"), _("Found running record\nor record is starting in next time.\nReally shutdown ?"), _("OK"), getrcconfigint("rcok", NULL), _("EXIT"), getrcconfigint("rcexit", NULL), NULL, 0, NULL, 0, 600, 200, 15, 0) != 1) 347 return; 348 } 349 350 //check if download is running 351 for(i = 0; i < MAXBGDOWNLOAD; i++) 352 { 353 if(bgdownload[i] != NULL && bgdownload[i]->ret == -1) 354 { 355 if(textbox(_("Message"), _("Found running download\nReally shutdown ?"), _("OK"), getrcconfigint("rcok", NULL), _("EXIT"), getrcconfigint("rcexit", NULL), NULL, 0, NULL, 0, 600, 200, 15, 0) != 1) 356 return; 357 break; 358 } 359 } 332 ret = checkshutdown(flag); 333 if(ret == 1) return; 360 334 361 335 ret = servicestop(status.aktservice, 1, 1);
Note: See TracChangeset
for help on using the changeset viewer.