Ignore:
Timestamp:
01/07/14 12:54:02 (10 years ago)
Author:
gost
Message:

[tsSchnitt] use the first and last marker

File:
1 edited

Legend:

Unmodified
Added
Removed
  • titan/plugins/tsSchnitt/tsSchnitt.c

    r25462 r25497  
    8080                                        mtime = time;
    8181                                }
    82                                 if(z == 1)
    83                                 {
    84                                         tmpstr = ostrcat(tmpstr, " -t ", 0, 0);
    85                                         tmpstr = ostrcat(tmpstr, convert_timesec(time - mtime), 0, 0);
    86                                         zielsec= time - mtime;
    87                                         tmpstr = ostrcat(tmpstr, " \"", 0, 0);
    88                                         tmpstr = ostrcat(tmpstr, cutfile, 0, 0);
    89                                         tmpstr = ostrcat(tmpstr, "\"",0, 0);
    90                                 }
    9182                                z = z + 1;
     83                        }
     84                        if(z > 1)
     85                        {
     86                                tmpstr = ostrcat(tmpstr, " -t ", 0, 0);
     87                                tmpstr = ostrcat(tmpstr, convert_timesec(time - mtime), 0, 0);
     88                                zielsec= time - mtime;
     89                                tmpstr = ostrcat(tmpstr, " \"", 0, 0);
     90                                tmpstr = ostrcat(tmpstr, cutfile, 0, 0);
     91                                tmpstr = ostrcat(tmpstr, "\"",0, 0);
    9292                        }       
    9393                        fclose(datei); 
     
    101101                if(ischnitt == 1)
    102102                {
    103                         printf(" +++ %s +++\n",tmpstr);
    104                         rc = system(tmpstr);
    105                         free(tmpstr);tmpstr= NULL;
    106                         if(rc == 0)
    107                         {
    108                                 ischnitt = 2;
    109                                 tmpstr = ostrcat(tmpstr, "cp \"", 0, 0);
    110                                 tmpstr = ostrcat(tmpstr, epgfile, 0, 0);
    111                                 tmpstr = ostrcat(tmpstr, "\" \"", 0, 0);
    112                                 tmpstr = ostrcat(tmpstr, epgcutfile, 0, 0);
    113                                 tmpstr = ostrcat(tmpstr, "\"", 0, 0);
     103                        tmpstr2 = ostrcat(tmpstr2, "weggeschnitten wird \nvon 00:00 bis ", 0, 0);
     104                        tmpstr2 = ostrcat(tmpstr2, convert_timesec(mtime), 0, 0);
     105                        tmpstr2 = ostrcat(tmpstr2, "\n von ", 0, 0);
     106                        tmpstr2 = ostrcat(tmpstr2, convert_timesec(time), 0, 0);
     107                        tmpstr2 = ostrcat(tmpstr2, " bis ende", 0, 0);
     108                        if(textbox(_("Information"), tmpstr2, _("OK"), getrcconfigint("rcok", NULL), _("EXIT"), getrcconfigint("rcexit", NULL), NULL, 0, NULL, 0, 600, 200, 0, 0) == 1)
     109                        {
     110                                printf(" +++ %s +++\n",tmpstr);
    114111                                rc = system(tmpstr);
    115112                                free(tmpstr);tmpstr= NULL;
    116                                 textbox(_("INFO"), _("Schnitt erfolgreich beendet"), _("OK"), getrcconfigint("rcok", NULL), _("EXIT"), getrcconfigint("rcexit", NULL), NULL, 0, NULL, 0, 600, 200, 0, 0);
    117                         }
    118                         else
    119                         {
    120                                 remove(cutfile);
    121                                 ischnitt = 3;
    122                                 textbox(_("ERROR"), _("Schnitt endet mit Fehler !!!!!"), _("OK"), getrcconfigint("rcok", NULL), _("EXIT"), getrcconfigint("rcexit", NULL), NULL, 0, NULL, 0, 600, 200, 0, 0);
    123                         }
     113                                if(rc == 0)
     114                                {
     115                                        ischnitt = 2;
     116                                        tmpstr = ostrcat(tmpstr, "cp \"", 0, 0);
     117                                        tmpstr = ostrcat(tmpstr, epgfile, 0, 0);
     118                                        tmpstr = ostrcat(tmpstr, "\" \"", 0, 0);
     119                                        tmpstr = ostrcat(tmpstr, epgcutfile, 0, 0);
     120                                        tmpstr = ostrcat(tmpstr, "\"", 0, 0);
     121                                        rc = system(tmpstr);
     122                                        free(tmpstr);tmpstr= NULL;
     123                                        textbox(_("INFO"), _("Schnitt erfolgreich beendet"), _("OK"), getrcconfigint("rcok", NULL), _("EXIT"), getrcconfigint("rcexit", NULL), NULL, 0, NULL, 0, 600, 200, 0, 0);
     124                                }
     125                                else
     126                                {
     127                                        remove(cutfile);
     128                                        ischnitt = 3;
     129                                        textbox(_("ERROR"), _("Schnitt endet mit Fehler !!!!!"), _("OK"), getrcconfigint("rcok", NULL), _("EXIT"), getrcconfigint("rcexit", NULL), NULL, 0, NULL, 0, 600, 200, 0, 0);
     130                                }
     131                        }
     132                        free(tmpstr2);tmpstr2=NULL;
    124133                }
    125134                free(tmpstr); tmpstr = NULL;
Note: See TracChangeset for help on using the changeset viewer.