My favorites | Sign in
Project Home Downloads Wiki Issues Source
READ-ONLY: This project has been archived. For more information see this post.
Search
for
  Advanced search   Search tips   Subscriptions

Issue 12 attachment: patch_marg.diff (9.4 KB)

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
Index: fricorder/api.py
===================================================================
--- fricorder/api.py (révision 40)
+++ fricorder/api.py (copie de travail)
@@ -38,7 +38,9 @@
def isAtdRunning():
return os.path.isfile("/var/run/atd.pid")

-def runAt(stream,chaine,quality,datet,duree,destination):
+def runAt(stream,chaine,quality,datet,duree,destination, marge):
+ datet += datetime.timedelta(minutes=-marge)
+ duree += 2*marge
fin= datet+datetime.timedelta(minutes=duree)
now = datetime.datetime.now()

Index: fricorder/fricorderweb.py
===================================================================
--- fricorder/fricorderweb.py (révision 40)
+++ fricorder/fricorderweb.py (copie de travail)
@@ -249,6 +249,7 @@

#determine l'heure
debut=None
+ marge = int(data.marge)
if data.heure:
if ":" in data.heure: t = data.heure.split(":")
if "-" in data.heure: t = data.heure.split("-")
@@ -277,7 +278,7 @@
CFG.config.qualite = int(data.qualite)
CFG.config.destination =data.destination.strip()
CFG.save()
- msg=api.runAt(url,chaine,qualite,debut,duree,destination)
+ msg=api.runAt(url,chaine,qualite,debut,duree,destination,marge)
else:
msg = "Votre répertoire de destination n'existe pas"
else:
Index: fricorder/fricordergtk.py
===================================================================
--- fricorder/fricordergtk.py (révision 40)
+++ fricorder/fricordergtk.py (copie de travail)
@@ -284,11 +284,12 @@
if not os.path.isdir(destination):
MessageBox(self.main_widget,"Le répertoire de destination n'existe pas")
else:
+ marge = int(self.sb_marg.get_text())
debut = datetime.datetime(self.date.year,self.date.month,self.date.day,int(self.sb_heure.get_value()),int(self.sb_min.get_value()),0)
debut= debut+datetime.timedelta(days=self.cb_jour.get_active())
duree = int(self.sb_time.get_text())

- err=api.runAt(stream,chaine,quality,debut,duree,destination)
+ err=api.runAt(stream,chaine,quality,debut,duree,destination,marge)
if not err:
time.sleep(1)
self.fillAt()
Index: data/fricorder.glade
===================================================================
--- data/fricorder.glade (révision 40)
+++ data/fricorder.glade (copie de travail)
@@ -26,8 +26,8 @@
</widget>
<packing>
<property name="right_attach">2</property>
- <property name="top_attach">8</property>
- <property name="bottom_attach">9</property>
+ <property name="top_attach">9</property>
+ <property name="bottom_attach">10</property>
<property name="x_options">GTK_FILL</property>
<property name="y_options"></property>
</packing>
@@ -65,8 +65,8 @@
<packing>
<property name="left_attach">1</property>
<property name="right_attach">2</property>
- <property name="top_attach">10</property>
- <property name="bottom_attach">11</property>
+ <property name="top_attach">11</property>
+ <property name="bottom_attach">12</property>
<property name="x_options">GTK_FILL</property>
<property name="y_options">GTK_FILL</property>
</packing>
@@ -89,8 +89,8 @@
</widget>
<packing>
<property name="right_attach">2</property>
- <property name="top_attach">9</property>
- <property name="bottom_attach">10</property>
+ <property name="top_attach">10</property>
+ <property name="bottom_attach">11</property>
</packing>
</child>
<child>
@@ -100,8 +100,8 @@
</widget>
<packing>
<property name="right_attach">2</property>
- <property name="top_attach">7</property>
- <property name="bottom_attach">8</property>
+ <property name="top_attach">8</property>
+ <property name="bottom_attach">9</property>
<property name="x_options">GTK_FILL</property>
<property name="y_options">GTK_FILL</property>
</packing>
@@ -125,8 +125,8 @@
<packing>
<property name="left_attach">1</property>
<property name="right_attach">2</property>
- <property name="top_attach">6</property>
- <property name="bottom_attach">7</property>
+ <property name="top_attach">7</property>
+ <property name="bottom_attach">8</property>
<property name="x_options">GTK_FILL</property>
<property name="y_options">GTK_FILL</property>
</packing>
@@ -160,8 +160,8 @@
<packing>
<property name="left_attach">1</property>
<property name="right_attach">2</property>
- <property name="top_attach">5</property>
- <property name="bottom_attach">6</property>
+ <property name="top_attach">6</property>
+ <property name="bottom_attach">7</property>
<property name="x_options">GTK_FILL</property>
<property name="y_options">GTK_FILL</property>
</packing>
@@ -382,15 +382,63 @@
<property name="y_options">GTK_FILL</property>
</packing>
</child>
+
+
<child>
+ <widget class="GtkHBox" id="hbox2">
+ <property name="visible">True</property>
+ <child>
+ <widget class="GtkSpinButton" id="sb_marg">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="adjustment">5 0 60 1 10 10</property>
+ <property name="climb_rate">1</property>
+ <property name="numeric">True</property>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkLabel" id="label19">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">min</property>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkLabel" id="label16">
+ <property name="visible">True</property>
+ </widget>
+ <packing>
+ <property name="position">2</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ <property name="top_attach">5</property>
+ <property name="bottom_attach">6</property>
+ <property name="x_options">GTK_SHRINK | GTK_FILL</property>
+ <property name="y_options">GTK_FILL</property>
+ </packing>
+ </child>
+
+ <child>
<widget class="GtkLabel" id="label7">
<property name="visible">True</property>
<property name="xalign">0</property>
<property name="label" translatable="yes">Destination</property>
</widget>
<packing>
- <property name="top_attach">5</property>
- <property name="bottom_attach">6</property>
+ <property name="top_attach">6</property>
+ <property name="bottom_attach">7</property>
<property name="x_options">GTK_FILL</property>
<property name="y_options"></property>
</packing>
@@ -409,6 +457,19 @@
</packing>
</child>
<child>
+ <widget class="GtkLabel" id="label9">
+ <property name="visible">True</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">Marge</property>
+ </widget>
+ <packing>
+ <property name="top_attach">5</property>
+ <property name="bottom_attach">6</property>
+ <property name="x_options">GTK_FILL</property>
+ <property name="y_options"></property>
+ </packing>
+ </child>
+ <child>
<widget class="GtkLabel" id="label2">
<property name="visible">True</property>
<property name="xalign">0</property>
Index: data/templates/index.html
===================================================================
--- data/templates/index.html (révision 40)
+++ data/templates/index.html (copie de travail)
@@ -82,6 +82,14 @@
</tr>
<tr>
<td>
+ Marge
+ </td>
+ <td>
+ <input type='text' name='marge' size="3" maxlength="2" value="5"/> <i>minutes</i>
+ </td>
+ </tr>
+ <tr>
+ <td>
Destination
</td>
<td>
Powered by Google Project Hosting