Merge lp:~nik90/podbird/5-auto-download-option into lp:podbird
- 5-auto-download-option
- Merge into trunk
Status: | Merged | ||||
---|---|---|---|---|---|
Merged at revision: | 43 | ||||
Proposed branch: | lp:~nik90/podbird/5-auto-download-option | ||||
Merge into: | lp:podbird | ||||
Prerequisite: | lp:~nik90/podbird/4-add-welcome-wizard | ||||
Diff against target: |
767 lines (+400/-231) 10 files modified
Podbird.apparmor (+3/-2) app/CMakeLists.txt (+1/-0) app/podbird.qml (+40/-3) app/settings/CMakeLists.txt (+7/-0) app/settings/CleanSetting.qml (+65/-0) app/settings/DownloadSetting.qml (+64/-0) app/settings/ThemeSetting.qml (+63/-0) app/ui/ExpandableListItem.qml (+0/-87) app/ui/SettingsPage.qml (+72/-90) po/com.mikeasoft.podbird.pot (+85/-49) |
||||
To merge this branch: | bzr merge lp:~nik90/podbird/5-auto-download-option | ||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Michael Sheldon | Approve | ||
Review via email: mp+254652@code.launchpad.net |
Commit message
Description of the change
This branch adds the most requested feature which is auto-download new episodes on app startup. By default this is disabled, but can be easily enabled from the settings page. It also now provides a settings option to only download when on wifi.
Please test this on your BQ device with 3G only and wifi only to see if the settings options are obeyed.
I also cleaned up the settings page which now looks way better in my opinion.
- 49. By Nekhelesh Ramananthan
-
First sort episode list by desc published date before proceeding to download the most recent one
- 50. By Nekhelesh Ramananthan
-
Removed left-over code in settings.qml and also changed days to months/year appropriately
- 51. By Nekhelesh Ramananthan
-
Merged prerequisite lp:~nik90/podbird/4-add-welcome-wizard
- 52. By Nekhelesh Ramananthan
-
Added more log statements to allow for easier debugging
- 53. By Nekhelesh Ramananthan
-
Dynamically load/unload the settings page to optimize app startup time
- 54. By Nekhelesh Ramananthan
-
Disable autodownload on wifi option until user enabled autodownload itself
- 55. By Nekhelesh Ramananthan
-
merged prerequisite
- 56. By Nekhelesh Ramananthan
-
Removed dividers from the settings listitems
- 57. By Nekhelesh Ramananthan
-
merged prerequisite fix
- 58. By Nekhelesh Ramananthan
-
merged trunk
- 59. By Nekhelesh Ramananthan
-
merged lp:podbird
- 60. By Nekhelesh Ramananthan
-
Removed expandable list item component since we dont use it anymore in Podbird
Michael Sheldon (michael-sheldon) wrote : | # |
Looks like there's already a bug open for this here: https:/
Michael Sheldon (michael-sheldon) wrote : | # |
I think we should probably just hide the "Wifi only" option until this is fixed in the connectivity API, at least that way we aren't promising the user something we can't offer.
Michael Sheldon (michael-sheldon) wrote : | # |
Added missing inline comment
- 61. By Nekhelesh Ramananthan
-
Removed the limited bandwidth detection as it is not working on krillin. Also fixed log statement
- 62. By Nekhelesh Ramananthan
-
Fixed a string not being internationalized
- 63. By Nekhelesh Ramananthan
-
merged lp:podbird
Michael Sheldon (michael-sheldon) wrote : | # |
Looks good!
Preview Diff
1 | === modified file 'Podbird.apparmor' |
2 | --- Podbird.apparmor 2015-01-30 00:16:10 +0000 |
3 | +++ Podbird.apparmor 2015-04-16 10:24:04 +0000 |
4 | @@ -1,7 +1,8 @@ |
5 | { |
6 | "policy_groups": [ |
7 | "networking", |
8 | - "audio" |
9 | + "audio", |
10 | + "connectivity" |
11 | ], |
12 | "policy_version": 1.2 |
13 | -} |
14 | \ No newline at end of file |
15 | +} |
16 | |
17 | === modified file 'app/CMakeLists.txt' |
18 | --- app/CMakeLists.txt 2015-03-29 22:42:48 +0000 |
19 | +++ app/CMakeLists.txt 2015-04-16 10:24:04 +0000 |
20 | @@ -13,3 +13,4 @@ |
21 | add_subdirectory(themes) |
22 | add_subdirectory(welcomewizard) |
23 | add_subdirectory(graphics) |
24 | +add_subdirectory(settings) |
25 | |
26 | === modified file 'app/podbird.qml' |
27 | --- app/podbird.qml 2015-04-11 01:22:32 +0000 |
28 | +++ app/podbird.qml 2015-04-16 10:24:04 +0000 |
29 | @@ -19,6 +19,7 @@ |
30 | import QtQuick 2.3 |
31 | import Podbird 1.0 |
32 | import QtMultimedia 5.0 |
33 | +import Ubuntu.Connectivity 1.0 |
34 | import Qt.labs.settings 1.0 |
35 | import Ubuntu.Components 1.1 |
36 | import QtQuick.LocalStorage 2.0 |
37 | @@ -49,10 +50,17 @@ |
38 | var today = new Date() |
39 | // Only perform cleanup of old episodes once a day |
40 | if (Math.floor((today - settings.lastCheck)/86400000) >= 1 && settings.retentionDays !== -1) { |
41 | - console.log("[LOG]: Starting cleanup of old episodes..") |
42 | cleanUp(today, settings.retentionDays) |
43 | settings.lastCheck = today |
44 | } |
45 | + |
46 | + if (!NetworkingStatus.online || settings.maxEpisodeDownload === -1) { |
47 | + console.log("[LOG]: Skipped autodownloading of new episodes...") |
48 | + console.log("[LOG]: Online connectivity: " + NetworkingStatus.online) |
49 | + console.log("[LOG]: User settings (maxEpisodeDownload): " + settings.maxEpisodeDownload) |
50 | + } else { |
51 | + autoDownloadEpisodes(settings.maxEpisodeDownload) |
52 | + } |
53 | } |
54 | |
55 | property string currentName |
56 | @@ -74,6 +82,7 @@ |
57 | property int retentionDays: -1 |
58 | property var lastCheck: new Date() |
59 | property bool firstRun: true |
60 | + property int maxEpisodeDownload: -1 |
61 | } |
62 | |
63 | FileManager { |
64 | @@ -163,9 +172,18 @@ |
65 | objectName: "searchTab" |
66 | } |
67 | |
68 | - SettingsTab { |
69 | + Tab { |
70 | id: settingsTab |
71 | - objectName: "settingsTab" |
72 | + |
73 | + title: i18n.tr("Settings") |
74 | + |
75 | + page: Loader { |
76 | + parent: settingsTab |
77 | + anchors.left: parent.left |
78 | + anchors.right: parent.right |
79 | + anchors.bottom: parent.bottom |
80 | + source: (tabs.selectedTab === settingsTab) ? Qt.resolvedUrl("ui/SettingsPage.qml") : "" |
81 | + } |
82 | } |
83 | } |
84 | } |
85 | @@ -199,6 +217,7 @@ |
86 | } |
87 | |
88 | function cleanUp(today, retentionDays) { |
89 | + console.log("[LOG]: Cleaning up old episodes") |
90 | var dayToMs = 86400000; //1 * 24 * 60 * 60 * 1000 |
91 | var db = Podcasts.init() |
92 | db.transaction(function (tx) { |
93 | @@ -216,4 +235,22 @@ |
94 | } |
95 | }); |
96 | } |
97 | + |
98 | + function autoDownloadEpisodes(maxEpisodeDownload) { |
99 | + console.log("[LOG]: Auto-downloading new episodes") |
100 | + var db = Podcasts.init() |
101 | + db.transaction(function (tx) { |
102 | + var rs = tx.executeSql("SELECT rowid, * FROM Podcast ORDER BY name ASC"); |
103 | + for (var i=0; i < rs.rows.length; i++) { |
104 | + var podcast = rs.rows.item(i); |
105 | + var rs2 = tx.executeSql("SELECT rowid, * FROM Episode WHERE podcast=? ORDER BY published DESC", [rs.rows.item(i).rowid]); |
106 | + var loopCount = maxEpisodeDownload > rs2.rows.length ? rs2.rows.length : maxEpisodeDownload |
107 | + for (var j=0; j < loopCount; j++) { |
108 | + if (!rs2.rows.item(j).downloadedfile && !rs2.rows.item(j).listened) { |
109 | + downloader.addDownload(rs2.rows.item(j).guid, rs2.rows.item(j).audiourl) |
110 | + } |
111 | + } |
112 | + } |
113 | + }); |
114 | + } |
115 | } |
116 | |
117 | === added directory 'app/settings' |
118 | === added file 'app/settings/CMakeLists.txt' |
119 | --- app/settings/CMakeLists.txt 1970-01-01 00:00:00 +0000 |
120 | +++ app/settings/CMakeLists.txt 2015-04-16 10:24:04 +0000 |
121 | @@ -0,0 +1,7 @@ |
122 | +file(GLOB SETTING_FILES *.qml) |
123 | + |
124 | +# Make the files visible in the qtcreator tree |
125 | +add_custom_target(podbird_SETTINGFiles ALL SOURCES ${SETTING_FILES}) |
126 | + |
127 | +install(FILES ${SETTING_FILES} DESTINATION ${PODBIRD_DIR}/settings) |
128 | + |
129 | |
130 | === added file 'app/settings/CleanSetting.qml' |
131 | --- app/settings/CleanSetting.qml 1970-01-01 00:00:00 +0000 |
132 | +++ app/settings/CleanSetting.qml 2015-04-16 10:24:04 +0000 |
133 | @@ -0,0 +1,65 @@ |
134 | +/* |
135 | + * Copyright 2015 Podbird Team |
136 | + * |
137 | + * This file is part of Podbird. |
138 | + * |
139 | + * Podbird is free software; you can redistribute it and/or modify |
140 | + * it under the terms of the GNU General Public License as published by |
141 | + * the Free Software Foundation; version 3. |
142 | + * |
143 | + * Podbird is distributed in the hope that it will be useful, |
144 | + * but WITHOUT ANY WARRANTY; without even the implied warranty of |
145 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
146 | + * GNU General Public License for more details. |
147 | + * |
148 | + * You should have received a copy of the GNU General Public License |
149 | + * along with this program. If not, see <http://www.gnu.org/licenses/>. |
150 | + */ |
151 | + |
152 | +import QtQuick 2.3 |
153 | +import Ubuntu.Components 1.1 |
154 | +import Ubuntu.Components.ListItems 1.0 as ListItem |
155 | + |
156 | +Page { |
157 | + id: cleanSettingPage |
158 | + |
159 | + visible: false |
160 | + title: i18n.tr("Delete older than") |
161 | + |
162 | + ListModel { |
163 | + id: cleanupModel |
164 | + Component.onCompleted: initialize() |
165 | + function initialize() { |
166 | + cleanupModel.append({ name: i18n.tr("Never"), value: -1 }) |
167 | + cleanupModel.append({ name: i18n.tr("%1 day", "%1 days", 7).arg(7), value: 7 }) |
168 | + cleanupModel.append({ name: i18n.tr("%1 month", "%1 months", 1).arg(1), value: 31 }) |
169 | + cleanupModel.append({ name: i18n.tr("%1 month", "%1 months", 3).arg(3), value: 90 }) |
170 | + cleanupModel.append({ name: i18n.tr("%1 month", "%1 months", 6).arg(6), value: 180 }) |
171 | + cleanupModel.append({ name: i18n.tr("%1 year", "%1 years", 1).arg(1), value: 360 }) |
172 | + } |
173 | + } |
174 | + |
175 | + UbuntuListView { |
176 | + id: cleanup |
177 | + |
178 | + model: cleanupModel |
179 | + anchors.fill: parent |
180 | + |
181 | + delegate: ListItem.Standard { |
182 | + text: model.name |
183 | + onClicked: { |
184 | + podbird.settings.retentionDays = model.value |
185 | + } |
186 | + |
187 | + Icon { |
188 | + width: units.gu(2) |
189 | + height: width |
190 | + name: "ok" |
191 | + visible: podbird.settings.retentionDays === model.value |
192 | + anchors.right: parent.right |
193 | + anchors.rightMargin: units.gu(3) |
194 | + anchors.verticalCenter: parent.verticalCenter |
195 | + } |
196 | + } |
197 | + } |
198 | +} |
199 | |
200 | === added file 'app/settings/DownloadSetting.qml' |
201 | --- app/settings/DownloadSetting.qml 1970-01-01 00:00:00 +0000 |
202 | +++ app/settings/DownloadSetting.qml 2015-04-16 10:24:04 +0000 |
203 | @@ -0,0 +1,64 @@ |
204 | +/* |
205 | + * Copyright 2015 Podbird Team |
206 | + * |
207 | + * This file is part of Podbird. |
208 | + * |
209 | + * Podbird is free software; you can redistribute it and/or modify |
210 | + * it under the terms of the GNU General Public License as published by |
211 | + * the Free Software Foundation; version 3. |
212 | + * |
213 | + * Podbird is distributed in the hope that it will be useful, |
214 | + * but WITHOUT ANY WARRANTY; without even the implied warranty of |
215 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
216 | + * GNU General Public License for more details. |
217 | + * |
218 | + * You should have received a copy of the GNU General Public License |
219 | + * along with this program. If not, see <http://www.gnu.org/licenses/>. |
220 | + */ |
221 | + |
222 | +import QtQuick 2.3 |
223 | +import Ubuntu.Components 1.1 |
224 | +import Ubuntu.Components.ListItems 1.0 as ListItem |
225 | + |
226 | +Page { |
227 | + id: downloadSetting |
228 | + |
229 | + visible: false |
230 | + title: i18n.tr("Download at most") |
231 | + |
232 | + ListModel { |
233 | + id: episodeDownloadNumber |
234 | + Component.onCompleted: initialize() |
235 | + function initialize() { |
236 | + episodeDownloadNumber.append({ name: i18n.tr("Never"), value: -1 }) |
237 | + episodeDownloadNumber.append({ name: i18n.tr("%1 episode", "%1 episodes", 1).arg(1), value: 1 }) |
238 | + episodeDownloadNumber.append({ name: i18n.tr("%1 episode", "%1 episodes", 3).arg(3), value: 3 }) |
239 | + episodeDownloadNumber.append({ name: i18n.tr("%1 episode", "%1 episodes", 5).arg(5), value: 5 }) |
240 | + episodeDownloadNumber.append({ name: i18n.tr("%1 episode", "%1 episodes", 10).arg(10), value: 10 }) |
241 | + } |
242 | + } |
243 | + |
244 | + UbuntuListView { |
245 | + id: download |
246 | + |
247 | + model: episodeDownloadNumber |
248 | + anchors.fill: parent |
249 | + |
250 | + delegate: ListItem.Standard { |
251 | + text: model.name |
252 | + onClicked: { |
253 | + podbird.settings.maxEpisodeDownload = model.value |
254 | + } |
255 | + |
256 | + Icon { |
257 | + width: units.gu(2) |
258 | + height: width |
259 | + name: "ok" |
260 | + visible: podbird.settings.maxEpisodeDownload === model.value |
261 | + anchors.right: parent.right |
262 | + anchors.rightMargin: units.gu(3) |
263 | + anchors.verticalCenter: parent.verticalCenter |
264 | + } |
265 | + } |
266 | + } |
267 | +} |
268 | |
269 | === added file 'app/settings/ThemeSetting.qml' |
270 | --- app/settings/ThemeSetting.qml 1970-01-01 00:00:00 +0000 |
271 | +++ app/settings/ThemeSetting.qml 2015-04-16 10:24:04 +0000 |
272 | @@ -0,0 +1,63 @@ |
273 | +/* |
274 | + * Copyright 2015 Podbird Team |
275 | + * |
276 | + * This file is part of Podbird. |
277 | + * |
278 | + * Podbird is free software; you can redistribute it and/or modify |
279 | + * it under the terms of the GNU General Public License as published by |
280 | + * the Free Software Foundation; version 3. |
281 | + * |
282 | + * Podbird is distributed in the hope that it will be useful, |
283 | + * but WITHOUT ANY WARRANTY; without even the implied warranty of |
284 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
285 | + * GNU General Public License for more details. |
286 | + * |
287 | + * You should have received a copy of the GNU General Public License |
288 | + * along with this program. If not, see <http://www.gnu.org/licenses/>. |
289 | + */ |
290 | + |
291 | +import QtQuick 2.3 |
292 | +import Ubuntu.Components 1.1 |
293 | +import Ubuntu.Components.ListItems 1.0 as ListItem |
294 | + |
295 | +Page { |
296 | + id: themeSettingPage |
297 | + |
298 | + visible: false |
299 | + title: i18n.tr("Theme") |
300 | + |
301 | + ListModel { |
302 | + id: themeModel |
303 | + Component.onCompleted: initialize() |
304 | + function initialize() { |
305 | + themeModel.append({ name: i18n.tr("Light"), file: "Light.qml" }) |
306 | + themeModel.append({ name: i18n.tr("Dark"), file: "Dark.qml" }) |
307 | + } |
308 | + } |
309 | + |
310 | + UbuntuListView { |
311 | + id: themes |
312 | + |
313 | + model: themeModel |
314 | + anchors.fill: parent |
315 | + |
316 | + delegate: ListItem.Standard { |
317 | + text: model.name |
318 | + onClicked: { |
319 | + var themeElement = model.file |
320 | + podbird.settings.themeName = themeElement |
321 | + podbird.themeManager.source = themeElement |
322 | + } |
323 | + |
324 | + Icon { |
325 | + width: units.gu(2) |
326 | + height: width |
327 | + name: "ok" |
328 | + visible: podbird.settings.themeName === model.file |
329 | + anchors.right: parent.right |
330 | + anchors.rightMargin: units.gu(3) |
331 | + anchors.verticalCenter: parent.verticalCenter |
332 | + } |
333 | + } |
334 | + } |
335 | +} |
336 | |
337 | === removed file 'app/ui/ExpandableListItem.qml' |
338 | --- app/ui/ExpandableListItem.qml 2015-03-27 15:04:39 +0000 |
339 | +++ app/ui/ExpandableListItem.qml 1970-01-01 00:00:00 +0000 |
340 | @@ -1,87 +0,0 @@ |
341 | -/* |
342 | - * Copyright 2015 Podbird Team |
343 | - * |
344 | - * This file is part of Podbird. |
345 | - * |
346 | - * Podbird is free software; you can redistribute it and/or modify |
347 | - * it under the terms of the GNU General Public License as published by |
348 | - * the Free Software Foundation; version 3. |
349 | - * |
350 | - * Podbird is distributed in the hope that it will be useful, |
351 | - * but WITHOUT ANY WARRANTY; without even the implied warranty of |
352 | - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
353 | - * GNU General Public License for more details. |
354 | - * |
355 | - * You should have received a copy of the GNU General Public License |
356 | - * along with this program. If not, see <http://www.gnu.org/licenses/>. |
357 | - */ |
358 | - |
359 | -import QtQuick 2.3 |
360 | -import Ubuntu.Components 1.1 |
361 | -import Ubuntu.Components.ListItems 1.0 as ListItem |
362 | - |
363 | -ListItem.Expandable { |
364 | - id: expandableListItem |
365 | - |
366 | - property ListModel model |
367 | - property Component delegate |
368 | - property alias text: expandableHeader.text |
369 | - property alias subText: expandableHeader.subText |
370 | - property alias listViewHeight: expandableList.height |
371 | - |
372 | - anchors { |
373 | - left: parent.left |
374 | - right: parent.right |
375 | - margins: units.gu(-2) |
376 | - } |
377 | - |
378 | - collapseOnClick: true |
379 | - expandedHeight: contentColumn.height + units.gu(1) |
380 | - |
381 | - Column { |
382 | - id: contentColumn |
383 | - |
384 | - anchors { |
385 | - left: parent.left |
386 | - right: parent.right |
387 | - } |
388 | - |
389 | - Item { |
390 | - width: parent.width |
391 | - height: expandableListItem.collapsedHeight |
392 | - |
393 | - ListItem.Subtitled { |
394 | - id: expandableHeader |
395 | - |
396 | - onClicked: expandableListItem.expanded = true |
397 | - |
398 | - Icon { |
399 | - id: arrow |
400 | - |
401 | - width: units.gu(2) |
402 | - height: width |
403 | - anchors.right: parent.right |
404 | - anchors.verticalCenter: parent.verticalCenter |
405 | - |
406 | - name: "go-down" |
407 | - color: "Grey" |
408 | - rotation: expandableListItem.expanded ? 180 : 0 |
409 | - |
410 | - Behavior on rotation { |
411 | - UbuntuNumberAnimation {} |
412 | - } |
413 | - } |
414 | - } |
415 | - } |
416 | - |
417 | - ListView { |
418 | - id: expandableList |
419 | - |
420 | - height: units.gu(11) |
421 | - width: parent.width |
422 | - interactive: false |
423 | - model: expandableListItem.model |
424 | - delegate: expandableListItem.delegate |
425 | - } |
426 | - } |
427 | -} |
428 | |
429 | === renamed file 'app/ui/SettingsTab.qml' => 'app/ui/SettingsPage.qml' |
430 | --- app/ui/SettingsTab.qml 2015-03-27 15:38:43 +0000 |
431 | +++ app/ui/SettingsPage.qml 2015-04-16 10:24:04 +0000 |
432 | @@ -20,98 +20,80 @@ |
433 | import Ubuntu.Components 1.1 |
434 | import Ubuntu.Components.ListItems 1.0 as ListItem |
435 | |
436 | -Tab { |
437 | - id: tab |
438 | - |
439 | - title: i18n.tr("Settings") |
440 | - |
441 | - page: Page { |
442 | - id: settingsPage |
443 | - |
444 | - ListModel { |
445 | - id: themeModel |
446 | - Component.onCompleted: initialize() |
447 | - function initialize() { |
448 | - themeModel.append({ name: i18n.tr("Light"), file: "Light.qml" }) |
449 | - themeModel.append({ name: i18n.tr("Dark"), file: "Dark.qml" }) |
450 | - } |
451 | - } |
452 | - |
453 | - ListModel { |
454 | - id: cleanupModel |
455 | - Component.onCompleted: initialize() |
456 | - function initialize() { |
457 | - cleanupModel.append({ name: i18n.tr("Never"), value: -1 }) |
458 | - cleanupModel.append({ name: i18n.tr("7 days"), value: 7 }) |
459 | - cleanupModel.append({ name: i18n.tr("31 days"), value: 31 }) |
460 | - cleanupModel.append({ name: i18n.tr("90 days"), value: 90 }) |
461 | - cleanupModel.append({ name: i18n.tr("180 days"), value: 180 }) |
462 | - cleanupModel.append({ name: i18n.tr("360 days"), value: 360 }) |
463 | - } |
464 | - } |
465 | - |
466 | - Column { |
467 | - id: settingsColumn |
468 | - |
469 | - anchors.fill: parent |
470 | - |
471 | - ExpandableListItem { |
472 | - id: themeSetting |
473 | - |
474 | - model: themeModel |
475 | - text: i18n.tr("Theme") |
476 | - subText: podbird.settings.themeName.split(".qml")[0] |
477 | - |
478 | - delegate: ListItem.Standard { |
479 | - text: model.name |
480 | - |
481 | - onClicked: { |
482 | - var themeElement = model.file |
483 | - podbird.settings.themeName = themeElement |
484 | - podbird.themeManager.source = themeElement |
485 | - themeSetting.expanded = false |
486 | - } |
487 | - |
488 | - Icon { |
489 | - width: units.gu(2) |
490 | - height: width |
491 | - name: "ok" |
492 | - visible: podbird.settings.themeName === model.file |
493 | - anchors.right: parent.right |
494 | - anchors.rightMargin: units.gu(2) |
495 | - anchors.verticalCenter: parent.verticalCenter |
496 | - } |
497 | - } |
498 | - } |
499 | - |
500 | - ExpandableListItem { |
501 | - id: cleanupSetting |
502 | - |
503 | - listViewHeight: units.gu(36) |
504 | - model: cleanupModel |
505 | - text: i18n.tr("Remove episodes older than") |
506 | - subText: podbird.settings.retentionDays === -1 ? i18n.tr("Never") |
507 | - : i18n.tr("%1 days").arg(podbird.settings.retentionDays) |
508 | - |
509 | - delegate: ListItem.Standard { |
510 | - text: model.name |
511 | - |
512 | - onClicked: { |
513 | - podbird.settings.retentionDays = model.value |
514 | - cleanupSetting.expanded = false |
515 | - } |
516 | - |
517 | - Icon { |
518 | - width: units.gu(2) |
519 | - height: width |
520 | - name: "ok" |
521 | - visible: podbird.settings.retentionDays === model.value |
522 | - anchors.right: parent.right |
523 | - anchors.rightMargin: units.gu(2) |
524 | - anchors.verticalCenter: parent.verticalCenter |
525 | - } |
526 | +Page { |
527 | + id: settingsPage |
528 | + |
529 | + Column { |
530 | + id: settingsColumn |
531 | + |
532 | + anchors.fill: parent |
533 | + |
534 | + ListItem.Header { |
535 | + text: i18n.tr("General Settings") |
536 | + } |
537 | + |
538 | + ListItem.SingleValue { |
539 | + progression: true |
540 | + showDivider: false |
541 | + text: i18n.tr("Theme") |
542 | + value: podbird.settings.themeName.split(".qml")[0] === "Light" ? i18n.tr("Light") : i18n.tr("Dark") |
543 | + onClicked: mainStack.push(Qt.resolvedUrl("../settings/ThemeSetting.qml")) |
544 | + } |
545 | + |
546 | + ListItem.Header { |
547 | + text: i18n.tr("Podcast Episode Settings") |
548 | + } |
549 | + |
550 | + ListItem.Base { |
551 | + height: units.gu(10) |
552 | + progression: true |
553 | + showDivider: false |
554 | + onClicked: mainStack.push(Qt.resolvedUrl("../settings/CleanSetting.qml")) |
555 | + Column { |
556 | + anchors.verticalCenter: parent.verticalCenter |
557 | + anchors.right: parent.right |
558 | + anchors.left: parent.left |
559 | + Label { |
560 | + width: parent.width |
561 | + wrapMode: Text.WordWrap |
562 | + text: i18n.tr("Automatically delete old episodes") |
563 | + } |
564 | + |
565 | + Label { |
566 | + fontSize: "small" |
567 | + color: podbird.theme.baseSubText |
568 | + width: parent.width |
569 | + wrapMode: Text.WordWrap |
570 | + text: i18n.tr("Delete episodes that are older than a given number of days for each podcast") |
571 | + } |
572 | + } |
573 | + } |
574 | + |
575 | + ListItem.Base { |
576 | + height: units.gu(10) |
577 | + progression: true |
578 | + showDivider: false |
579 | + onClicked: mainStack.push(Qt.resolvedUrl("../settings/DownloadSetting.qml")) |
580 | + Column { |
581 | + anchors.verticalCenter: parent.verticalCenter |
582 | + anchors.right: parent.right |
583 | + anchors.left: parent.left |
584 | + Label { |
585 | + width: parent.width |
586 | + wrapMode: Text.WordWrap |
587 | + text: i18n.tr("Automatically download new episodes") |
588 | + } |
589 | + |
590 | + Label { |
591 | + fontSize: "small" |
592 | + color: podbird.theme.baseSubText |
593 | + width: parent.width |
594 | + wrapMode: Text.WordWrap |
595 | + text: i18n.tr("Default number of new episodes to download for each podcast") |
596 | } |
597 | } |
598 | } |
599 | } |
600 | } |
601 | + |
602 | + |
603 | |
604 | === modified file 'po/com.mikeasoft.podbird.pot' |
605 | --- po/com.mikeasoft.podbird.pot 2015-04-15 21:52:55 +0000 |
606 | +++ po/com.mikeasoft.podbird.pot 2015-04-16 10:24:04 +0000 |
607 | @@ -8,7 +8,7 @@ |
608 | msgstr "" |
609 | "Project-Id-Version: \n" |
610 | "Report-Msgid-Bugs-To: \n" |
611 | -"POT-Creation-Date: 2015-04-15 22:50+0100\n" |
612 | +"POT-Creation-Date: 2015-04-16 12:16+0200\n" |
613 | "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" |
614 | "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" |
615 | "Language-Team: LANGUAGE <LL@li.org>\n" |
616 | @@ -18,6 +18,66 @@ |
617 | "Content-Transfer-Encoding: 8bit\n" |
618 | "Plural-Forms: nplurals=INTEGER; plural=EXPRESSION;\n" |
619 | |
620 | +#: ../app/podbird.qml:178 |
621 | +msgid "Settings" |
622 | +msgstr "" |
623 | + |
624 | +#: ../app/settings/CleanSetting.qml:27 |
625 | +msgid "Delete older than" |
626 | +msgstr "" |
627 | + |
628 | +#: ../app/settings/CleanSetting.qml:33 ../app/settings/DownloadSetting.qml:33 |
629 | +msgid "Never" |
630 | +msgstr "" |
631 | + |
632 | +#: ../app/settings/CleanSetting.qml:34 |
633 | +#, qt-format |
634 | +msgid "%1 day" |
635 | +msgid_plural "%1 days" |
636 | +msgstr[0] "" |
637 | +msgstr[1] "" |
638 | + |
639 | +#: ../app/settings/CleanSetting.qml:35 ../app/settings/CleanSetting.qml:36 |
640 | +#: ../app/settings/CleanSetting.qml:37 |
641 | +#, qt-format |
642 | +msgid "%1 month" |
643 | +msgid_plural "%1 months" |
644 | +msgstr[0] "" |
645 | +msgstr[1] "" |
646 | + |
647 | +#: ../app/settings/CleanSetting.qml:38 |
648 | +#, qt-format |
649 | +msgid "%1 year" |
650 | +msgid_plural "%1 years" |
651 | +msgstr[0] "" |
652 | +msgstr[1] "" |
653 | + |
654 | +#: ../app/settings/DownloadSetting.qml:27 |
655 | +msgid "Download at most" |
656 | +msgstr "" |
657 | + |
658 | +#: ../app/settings/DownloadSetting.qml:34 |
659 | +#: ../app/settings/DownloadSetting.qml:35 |
660 | +#: ../app/settings/DownloadSetting.qml:36 |
661 | +#: ../app/settings/DownloadSetting.qml:37 |
662 | +#, qt-format |
663 | +msgid "%1 episode" |
664 | +msgid_plural "%1 episodes" |
665 | +msgstr[0] "" |
666 | +msgstr[1] "" |
667 | + |
668 | +#: ../app/settings/ThemeSetting.qml:27 ../app/ui/SettingsPage.qml:38 |
669 | +msgid "Theme" |
670 | +msgstr "" |
671 | + |
672 | +#: ../app/settings/ThemeSetting.qml:33 ../app/ui/SettingsPage.qml:39 |
673 | +msgid "Light" |
674 | +msgstr "" |
675 | + |
676 | +#: ../app/settings/ThemeSetting.qml:34 ../app/ui/SettingsPage.qml:39 |
677 | +msgid "Dark" |
678 | +msgstr "" |
679 | + |
680 | #: ../app/ui/EpisodesPage.qml:85 |
681 | msgid "Search Episode" |
682 | msgstr "" |
683 | @@ -160,53 +220,29 @@ |
684 | msgid "Subscribe" |
685 | msgstr "" |
686 | |
687 | -#: ../app/ui/SettingsTab.qml:26 |
688 | -msgid "Settings" |
689 | -msgstr "" |
690 | - |
691 | -#: ../app/ui/SettingsTab.qml:35 |
692 | -msgid "Light" |
693 | -msgstr "" |
694 | - |
695 | -#: ../app/ui/SettingsTab.qml:36 |
696 | -msgid "Dark" |
697 | -msgstr "" |
698 | - |
699 | -#: ../app/ui/SettingsTab.qml:44 ../app/ui/SettingsTab.qml:93 |
700 | -msgid "Never" |
701 | -msgstr "" |
702 | - |
703 | -#: ../app/ui/SettingsTab.qml:45 |
704 | -msgid "7 days" |
705 | -msgstr "" |
706 | - |
707 | -#: ../app/ui/SettingsTab.qml:46 |
708 | -msgid "31 days" |
709 | -msgstr "" |
710 | - |
711 | -#: ../app/ui/SettingsTab.qml:47 |
712 | -msgid "90 days" |
713 | -msgstr "" |
714 | - |
715 | -#: ../app/ui/SettingsTab.qml:48 |
716 | -msgid "180 days" |
717 | -msgstr "" |
718 | - |
719 | -#: ../app/ui/SettingsTab.qml:49 |
720 | -msgid "360 days" |
721 | -msgstr "" |
722 | - |
723 | -#: ../app/ui/SettingsTab.qml:62 |
724 | -msgid "Theme" |
725 | -msgstr "" |
726 | - |
727 | -#: ../app/ui/SettingsTab.qml:92 |
728 | -msgid "Remove episodes older than" |
729 | -msgstr "" |
730 | - |
731 | -#: ../app/ui/SettingsTab.qml:94 |
732 | -#, qt-format |
733 | -msgid "%1 days" |
734 | +#: ../app/ui/SettingsPage.qml:32 |
735 | +msgid "General Settings" |
736 | +msgstr "" |
737 | + |
738 | +#: ../app/ui/SettingsPage.qml:44 |
739 | +msgid "Podcast Episode Settings" |
740 | +msgstr "" |
741 | + |
742 | +#: ../app/ui/SettingsPage.qml:59 |
743 | +msgid "Automatically delete old episodes" |
744 | +msgstr "" |
745 | + |
746 | +#: ../app/ui/SettingsPage.qml:67 |
747 | +msgid "" |
748 | +"Delete episodes that are older than a given number of days for each podcast" |
749 | +msgstr "" |
750 | + |
751 | +#: ../app/ui/SettingsPage.qml:84 |
752 | +msgid "Automatically download new episodes" |
753 | +msgstr "" |
754 | + |
755 | +#: ../app/ui/SettingsPage.qml:92 |
756 | +msgid "Default number of new episodes to download for each podcast" |
757 | msgstr "" |
758 | |
759 | #: ../app/ui/Walkthrough.qml:87 |
760 | @@ -287,6 +323,6 @@ |
761 | msgid "Finish" |
762 | msgstr "" |
763 | |
764 | -#: /home/mike/src/build-podbird-Ubuntu_Device3_GCC_armhf_ubuntu_sdk_14_10_utopic-Default/po/Podbird.desktop.in.h:1 |
765 | +#: /home/krnekhelesh/Documents/Ubuntu-Projects/MP-Reviews/builddir/build-5-auto-download-option-UbuntuSDK_for_armhf_GCC_ubuntu_sdk_14_10_utopic-Default/po/Podbird.desktop.in.h:1 |
766 | msgid "Podbird" |
767 | msgstr "" |
NetworkingStatu s.limitedBandwi th is always returning false for me regardless of whether I'm on wifi or 3G, looks like this might need a work around until that's fixed. I'll try to investigate this a bit more tomorrow, file a bug against the connectivity api and see what we can do about it.
There's also one inline comment about a slightly ambiguous log message.
Other than those issues this is looking good.