Mailing List archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[vdr] Re: epg2timers, start_time_safety_margin added
upps - you should delete the line fprintf(stderr,.... it was just for
debugging :-)
M.
On Sun, Oct 14, 2001 at 08:49:34PM +0200, Matthias Weingart wrote:
> I did some changes in epg2timers, a safety_time for the starttime
> and some new channels.
>
> enjoy
>
> Matthias
>
> --- ../VDR/Tools/epg2timers/epg2timers.cxx Sun Sep 16 01:09:48 2001
> +++ epg2timers.cxx Sun Oct 14 20:35:02 2001
> @@ -29,9 +29,9 @@
> #include <unistd.h>
>
> // User-configurable options.
> -
> +static const int start_time_safety_margin = 2; //sub 2 min before start time
> static const int stop_time_safety_margin = 10; // add 10 minutes to stop time in case start was delayed
> static const int recording_lifetime = 98; // vdr recording life time setting for all timer entries generated
>
>
> @@ -94,6 +94,8 @@
> {"Premiere SCI-FI", 41},
> {"Premiere Star", 9},
> {"PREMIERE WORLD", 8},
> + {"Premiere One", 51},
> + {"Premiere X-Action",50},
> {"ProSieben", 898},
> {"RTL", 12003},
> {"RTL2", 12020},
> @@ -578,10 +580,30 @@
> next_day = day == month_lengths[month-1]? 1 : day + 1;
> }
> else if (strncmp(line, start_time_line, sizeof(start_time_line)-1) == 0)
> - start_time = (line[sizeof(start_time_line) - 1] - '0') * 1000 +
> + {
> + int start_hour,start_minute;
> +
> + start_hour = (line[sizeof(start_time_line) - 1] - '0') * 10 +
> + (line[sizeof(start_time_line) ] - '0');
> + start_minute = (line[sizeof(start_time_line) + 2] - '0') * 10 +
> + (line[sizeof(start_time_line) + 3] - '0') -
> + start_time_safety_margin;
> + if (start_minute < 0)
> + {
> + start_minute += 60;
> + if (start_hour == -1)
> + start_hour = 23;
> + else
> + start_hour--;
> + }
> + start_time = start_hour * 100 + start_minute;
> +/*(line[sizeof(start_time_line) - 1] - '0') * 1000 +
> (line[sizeof(start_time_line) ] - '0') * 100 +
> (line[sizeof(start_time_line) + 2] - '0') * 10 +
> - (line[sizeof(start_time_line) + 3] - '0');
> + (line[sizeof(start_time_line) + 3] - '0') -
> + start_time_safety_margin ; */
> +fprintf(stderr," %i %i %i\n",start_time,start_hour,start_minute);
> + }
> else if (strncmp(line, stop_time_line, sizeof(stop_time_line)-1) == 0)
> {
> stop_hour = (line[sizeof(stop_time_line) - 1] - '0') * 10 +
>
>
Home |
Main Index |
Thread Index