Ticket #4530: filter_watched.patch

File filter_watched.patch, 27.6 KB (added by Donald R. Huettl <drhuettl@…>, 18 years ago)
Line 
1Index: mythtv.new/i18n/mythfrontend_zh_tw.ts
2===================================================================
3--- mythtv.new/i18n/mythfrontend_zh_tw.ts (revision 15597)
4+++ mythtv.new/i18n/mythfrontend_zh_tw.ts (working copy)
5@@ -1086,6 +1086,10 @@
6 <translation type="unfinished"></translation>
7 </message>
8 <message>
9+ <source>Unwatched</source>
10+ <translation type="unfinished"></translation>
11+ </message>
12+ <message>
13 <source>There are %1 recordings in this display group</source>
14 <translation type="unfinished"></translation>
15 </message>
16@@ -3185,6 +3189,10 @@
17 <translation type="unfinished"></translation>
18 </message>
19 <message>
20+ <source>Unwatched</source>
21+ <translation type="unfinished"></translation>
22+ </message>
23+ <message>
24 <source>Start in Title section</source>
25 <translation type="unfinished"></translation>
26 </message>
27Index: mythtv.new/i18n/mythfrontend_nb.ts
28===================================================================
29--- mythtv.new/i18n/mythfrontend_nb.ts (revision 15597)
30+++ mythtv.new/i18n/mythfrontend_nb.ts (working copy)
31@@ -1159,6 +1159,10 @@
32 <translation>Alle programmer</translation>
33 </message>
34 <message>
35+ <source>Unwatched</source>
36+ <translation type="unfinished"></translation>
37+ </message>
38+ <message>
39 <source>There are %1 recordings in this display group</source>
40 <translation>Det er %1 opptak i denne gruppen</translation>
41 </message>
42@@ -3923,6 +3927,10 @@
43 <translation>Alle programmer</translation>
44 </message>
45 <message>
46+ <source>Unwatched</source>
47+ <translation type="unfinished"></translation>
48+ </message>
49+ <message>
50 <source>Start in Title section</source>
51 <translation>Start i tittelvelgeren</translation>
52 </message>
53Index: mythtv.new/i18n/mythfrontend_pt_br.ts
54===================================================================
55--- mythtv.new/i18n/mythfrontend_pt_br.ts (revision 15597)
56+++ mythtv.new/i18n/mythfrontend_pt_br.ts (working copy)
57@@ -1271,6 +1271,10 @@
58 <translation type="unfinished">Todos Programas</translation>
59 </message>
60 <message>
61+ <source>Unwatched</source>
62+ <translation type="unfinished"></translation>
63+ </message>
64+ <message>
65 <source>There are %1 recordings in this display group</source>
66 <translation type="unfinished">Neste grupo de vídeo existem %1 gravações</translation>
67 </message>
68@@ -4174,6 +4178,10 @@
69 <translation type="unfinished">Todos Programas</translation>
70 </message>
71 <message>
72+ <source>Unwatched</source>
73+ <translation type="unfinished"></translation>
74+ </message>
75+ <message>
76 <source>Default group filter to apply on the View Recordings screen.</source>
77 <translation type="obsolete">Aplicar filtro de grupo padrão na tela de visualização de Gravações</translation>
78 </message>
79Index: mythtv.new/i18n/mythfrontend_fr.ts
80===================================================================
81--- mythtv.new/i18n/mythfrontend_fr.ts (revision 15597)
82+++ mythtv.new/i18n/mythfrontend_fr.ts (working copy)
83@@ -1289,6 +1289,10 @@
84 <translation>Toutes les émissions</translation>
85 </message>
86 <message>
87+ <source>Unwatched</source>
88+ <translation type="unfinished"></translation>
89+ </message>
90+ <message>
91 <source>You have finished watching:</source>
92 <translation type="obsolete">Vous avez terminé de visionner:</translation>
93 </message>
94@@ -4005,6 +4009,10 @@
95 <translation>Toutes émissions</translation>
96 </message>
97 <message>
98+ <source>Unwatched</source>
99+ <translation type="unfinished"></translation>
100+ </message>
101+ <message>
102 <source>Show group summary</source>
103 <translation>Voir les résumés de groupes</translation>
104 </message>
105Index: mythtv.new/i18n/mythfrontend_et.ts
106===================================================================
107--- mythtv.new/i18n/mythfrontend_et.ts (revision 15597)
108+++ mythtv.new/i18n/mythfrontend_et.ts (working copy)
109@@ -1361,6 +1361,10 @@
110 <translation>Kõik programmid</translation>
111 </message>
112 <message>
113+ <source>Unwatched</source>
114+ <translation type="unfinished"></translation>
115+ </message>
116+ <message>
117 <source>There are %1 recordings in this display group</source>
118 <translation>NÀidatavas grupis on %1 salvestist</translation>
119 </message>
120@@ -4345,6 +4349,10 @@
121 <translation>Kõik programmid</translation>
122 </message>
123 <message>
124+ <source>Unwatched</source>
125+ <translation type="unfinished"></translation>
126+ </message>
127+ <message>
128 <source>Start in Title section</source>
129 <translation>Alusta pealkirjade sektsioonis</translation>
130 </message>
131Index: mythtv.new/i18n/mythfrontend_nl.ts
132===================================================================
133--- mythtv.new/i18n/mythfrontend_nl.ts (revision 15597)
134+++ mythtv.new/i18n/mythfrontend_nl.ts (working copy)
135@@ -1172,6 +1172,10 @@
136 <translation>Alle Programma &apos;s</translation>
137 </message>
138 <message>
139+ <source>Unwatched</source>
140+ <translation type="unfinished"></translation>
141+ </message>
142+ <message>
143 <source>You have finished watching:</source>
144 <translation type="obsolete">U bent klaar met het kijken naar:</translation>
145 </message>
146@@ -3651,6 +3655,10 @@
147 <translation>Alle programma&apos;s</translation>
148 </message>
149 <message>
150+ <source>Unwatched</source>
151+ <translation type="unfinished"></translation>
152+ </message>
153+ <message>
154 <source>Commercial Skip Auto-Rewind Amount</source>
155 <translation>Hoeveel terugspringen na &quot;Reclame overslaan&quot;</translation>
156 </message>
157Index: mythtv.new/i18n/mythfrontend_en_gb.ts
158===================================================================
159--- mythtv.new/i18n/mythfrontend_en_gb.ts (revision 15597)
160+++ mythtv.new/i18n/mythfrontend_en_gb.ts (working copy)
161@@ -1106,6 +1106,10 @@
162 <translation>All Programmes</translation>
163 </message>
164 <message>
165+ <source>Unwatched</source>
166+ <translation type="unfinished"></translation>
167+ </message>
168+ <message>
169 <source>There are %1 recordings in this display group</source>
170 <translation></translation>
171 </message>
172@@ -4268,6 +4272,10 @@
173 <translation>All Programmes</translation>
174 </message>
175 <message>
176+ <source>Unwatched</source>
177+ <translation type="unfinished"></translation>
178+ </message>
179+ <message>
180 <source>Always prompt for initial group filter</source>
181 <translation></translation>
182 </message>
183Index: mythtv.new/i18n/mythfrontend_pl.ts
184===================================================================
185--- mythtv.new/i18n/mythfrontend_pl.ts (revision 15597)
186+++ mythtv.new/i18n/mythfrontend_pl.ts (working copy)
187@@ -1101,6 +1101,10 @@
188 <translation type="unfinished"></translation>
189 </message>
190 <message>
191+ <source>Unwatched</source>
192+ <translation type="unfinished"></translation>
193+ </message>
194+ <message>
195 <source>There are %1 recordings in this display group</source>
196 <translation type="unfinished"></translation>
197 </message>
198@@ -4318,6 +4322,10 @@
199 <translation type="unfinished"></translation>
200 </message>
201 <message>
202+ <source>Unwatched</source>
203+ <translation type="unfinished"></translation>
204+ </message>
205+ <message>
206 <source>Always prompt for initial group filter</source>
207 <translation type="unfinished"></translation>
208 </message>
209Index: mythtv.new/i18n/mythfrontend_it.ts
210===================================================================
211--- mythtv.new/i18n/mythfrontend_it.ts (revision 15597)
212+++ mythtv.new/i18n/mythfrontend_it.ts (working copy)
213@@ -1134,6 +1134,10 @@
214 <translation>Tutte le Reg.</translation>
215 </message>
216 <message>
217+ <source>Unwatched</source>
218+ <translation type="unfinished"></translation>
219+ </message>
220+ <message>
221 <source>% used</source>
222 <translation>% usato</translation>
223 </message>
224@@ -3555,6 +3559,10 @@
225 <translation type="unfinished">Tutte le Reg.</translation>
226 </message>
227 <message>
228+ <source>Unwatched</source>
229+ <translation type="unfinished"></translation>
230+ </message>
231+ <message>
232 <source>Commercial Skip Auto-Rewind Amount</source>
233 <translation type="unfinished"></translation>
234 </message>
235Index: mythtv.new/i18n/mythfrontend_cz.ts
236===================================================================
237--- mythtv.new/i18n/mythfrontend_cz.ts (revision 15597)
238+++ mythtv.new/i18n/mythfrontend_cz.ts (working copy)
239@@ -1309,6 +1309,10 @@
240 <translation>Všechny programy</translation>
241 </message>
242 <message>
243+ <source>Unwatched</source>
244+ <translation type="unfinished"></translation>
245+ </message>
246+ <message>
247 <source>There are %1 recordings in this display group</source>
248 <translation>V této skupině zobrazení je %1 nahrávek</translation>
249 </message>
250@@ -4068,6 +4072,10 @@
251 <translation>Všechny programy</translation>
252 </message>
253 <message>
254+ <source>Unwatched</source>
255+ <translation type="unfinished"></translation>
256+ </message>
257+ <message>
258 <source>Start in Title section</source>
259 <translation type="unfinished"></translation>
260 </message>
261Index: mythtv.new/i18n/mythfrontend_ca.ts
262===================================================================
263--- mythtv.new/i18n/mythfrontend_ca.ts (revision 15597)
264+++ mythtv.new/i18n/mythfrontend_ca.ts (working copy)
265@@ -1097,6 +1097,10 @@
266 <translation>Tots</translation>
267 </message>
268 <message>
269+ <source>Unwatched</source>
270+ <translation type="unfinished"></translation>
271+ </message>
272+ <message>
273 <source>You have finished watching:</source>
274 <translation type="obsolete">Heu acavat de veure:</translation>
275 </message>
276@@ -3490,6 +3494,10 @@
277 <translation type="unfinished">Tots</translation>
278 </message>
279 <message>
280+ <source>Unwatched</source>
281+ <translation type="unfinished"></translation>
282+ </message>
283+ <message>
284 <source>Commercial Skip Auto-Rewind Amount</source>
285 <translation type="unfinished"></translation>
286 </message>
287Index: mythtv.new/i18n/mythfrontend_pt.ts
288===================================================================
289--- mythtv.new/i18n/mythfrontend_pt.ts (revision 15597)
290+++ mythtv.new/i18n/mythfrontend_pt.ts (working copy)
291@@ -1097,6 +1097,10 @@
292 <translation>Todos os Programas</translation>
293 </message>
294 <message>
295+ <source>Unwatched</source>
296+ <translation type="unfinished"></translation>
297+ </message>
298+ <message>
299 <source>You have finished watching:</source>
300 <translation type="obsolete">Acabou de ver:</translation>
301 </message>
302@@ -3478,6 +3482,10 @@
303 <translation type="unfinished">Todos os Programas</translation>
304 </message>
305 <message>
306+ <source>Unwatched</source>
307+ <translation type="unfinished"></translation>
308+ </message>
309+ <message>
310 <source>Commercial Skip Auto-Rewind Amount</source>
311 <translation type="unfinished"></translation>
312 </message>
313Index: mythtv.new/i18n/mythfrontend_tr.ts
314===================================================================
315--- mythtv.new/i18n/mythfrontend_tr.ts (revision 15597)
316+++ mythtv.new/i18n/mythfrontend_tr.ts (working copy)
317@@ -1315,6 +1315,10 @@
318 <translation>TÃŒm Programlar</translation>
319 </message>
320 <message>
321+ <source>Unwatched</source>
322+ <translation type="unfinished"></translation>
323+ </message>
324+ <message>
325 <source>There are %1 recordings in this display group</source>
326 <translation>Bu gösterge grubunda %1 kayıt var</translation>
327 </message>
328@@ -4765,6 +4769,10 @@
329 <translation>TÃŒm Programlar</translation>
330 </message>
331 <message>
332+ <source>Unwatched</source>
333+ <translation type="unfinished"></translation>
334+ </message>
335+ <message>
336 <source>Default group filter to apply on the View Recordings screen.</source>
337 <translation type="obsolete">Kayıtları GörÌntÌle ekranında uygulanacak varsayılan grup filtresi.</translation>
338 </message>
339Index: mythtv.new/i18n/mythfrontend_de.ts
340===================================================================
341--- mythtv.new/i18n/mythfrontend_de.ts (revision 15597)
342+++ mythtv.new/i18n/mythfrontend_de.ts (working copy)
343@@ -1328,6 +1328,10 @@
344 <translation>Alle Sendungen</translation>
345 </message>
346 <message>
347+ <source>Unwatched</source>
348+ <translation type="unfinished"></translation>
349+ </message>
350+ <message>
351 <source>You have finished watching:</source>
352 <translation type="obsolete">Wiedergabe beendet von:</translation>
353 </message>
354@@ -3850,6 +3854,10 @@
355 <translation>Alle Sendungen</translation>
356 </message>
357 <message>
358+ <source>Unwatched</source>
359+ <translation type="unfinished"></translation>
360+ </message>
361+ <message>
362 <source>Commercial Skip Auto-Rewind Amount</source>
363 <translation type="unfinished">Werbeblock SprunglÀnge</translation>
364 </message>
365Index: mythtv.new/i18n/mythfrontend_sv.ts
366===================================================================
367--- mythtv.new/i18n/mythfrontend_sv.ts (revision 15597)
368+++ mythtv.new/i18n/mythfrontend_sv.ts (working copy)
369@@ -1097,6 +1097,10 @@
370 <translation>Alla program</translation>
371 </message>
372 <message>
373+ <source>Unwatched</source>
374+ <translation type="unfinished"></translation>
375+ </message>
376+ <message>
377 <source>Are you sure you want to delete:</source>
378 <translation>Är du sÀker pÃ¥ att du vill ta bort:</translation>
379 </message>
380@@ -3436,6 +3440,10 @@
381 <translation>Alla program</translation>
382 </message>
383 <message>
384+ <source>Unwatched</source>
385+ <translation type="unfinished"></translation>
386+ </message>
387+ <message>
388 <source>Commercial Skip Auto-Rewind Amount</source>
389 <translation>Tillbakaspolning vid reklamöverhoppning</translation>
390 </message>
391Index: mythtv.new/i18n/mythfrontend_ja.ts
392===================================================================
393--- mythtv.new/i18n/mythfrontend_ja.ts (revision 15597)
394+++ mythtv.new/i18n/mythfrontend_ja.ts (working copy)
395@@ -1277,6 +1277,10 @@
396 <translation>å…
397šç•ªçµ„</translation>
398 </message>
399 <message>
400+ <source>Unwatched</source>
401+ <translation type="unfinished"></translation>
402+ </message>
403+ <message>
404 <source>You have finished watching:</source>
405 <translation type="obsolete">枈み:</translation>
406 </message>
407@@ -3817,6 +3821,10 @@
408 <translation>å…
409šç•ªçµ„</translation>
410 </message>
411 <message>
412+ <source>Unwatched</source>
413+ <translation type="unfinished"></translation>
414+ </message>
415+ <message>
416 <source>Commercial Skip Auto-Rewind Amount</source>
417 <translation>CMスキップ自動巻き戻し量</translation>
418 </message>
419Index: mythtv.new/i18n/mythfrontend_fi.ts
420===================================================================
421--- mythtv.new/i18n/mythfrontend_fi.ts (revision 15597)
422+++ mythtv.new/i18n/mythfrontend_fi.ts (working copy)
423@@ -1297,6 +1297,10 @@
424 <translation>Kaikki Ohjelmat</translation>
425 </message>
426 <message>
427+ <source>Unwatched</source>
428+ <translation type="unfinished"></translation>
429+ </message>
430+ <message>
431 <source>You have finished watching:</source>
432 <translation type="obsolete">Katsomasi ohjelma on loppunut:</translation>
433 </message>
434@@ -3834,6 +3838,10 @@
435 <translation>Kaikki Ohjelmat</translation>
436 </message>
437 <message>
438+ <source>Unwatched</source>
439+ <translation type="unfinished"></translation>
440+ </message>
441+ <message>
442 <source>Commercial Skip Auto-Rewind Amount</source>
443 <translation>Mainosten Ohituksen Automaattisenkelauksen MÀÀrÀ</translation>
444 </message>
445Index: mythtv.new/i18n/mythfrontend_dk.ts
446===================================================================
447--- mythtv.new/i18n/mythfrontend_dk.ts (revision 15597)
448+++ mythtv.new/i18n/mythfrontend_dk.ts (working copy)
449@@ -1329,6 +1329,10 @@
450 <translation>Alle programmer</translation>
451 </message>
452 <message>
453+ <source>Unwatched</source>
454+ <translation type="unfinished"></translation>
455+ </message>
456+ <message>
457 <source>You have finished watching:</source>
458 <translation type="obsolete">Du er fÊrdig med at se:</translation>
459 </message>
460@@ -3852,6 +3856,10 @@
461 <translation>Alle programmer</translation>
462 </message>
463 <message>
464+ <source>Unwatched</source>
465+ <translation type="unfinished"></translation>
466+ </message>
467+ <message>
468 <source>Commercial Skip Auto-Rewind Amount</source>
469 <translation>Reklame skip Auto-Tilbage mÊngde</translation>
470 </message>
471Index: mythtv.new/i18n/mythfrontend_es.ts
472===================================================================
473--- mythtv.new/i18n/mythfrontend_es.ts (revision 15597)
474+++ mythtv.new/i18n/mythfrontend_es.ts (working copy)
475@@ -1342,6 +1342,10 @@
476 <translation>Todas</translation>
477 </message>
478 <message>
479+ <source>Unwatched</source>
480+ <translation type="unfinished"></translation>
481+ </message>
482+ <message>
483 <source>You have finished watching:</source>
484 <translation type="obsolete">Ha acabado de ver:</translation>
485 </message>
486@@ -3878,6 +3882,10 @@
487 <translation>Todas</translation>
488 </message>
489 <message>
490+ <source>Unwatched</source>
491+ <translation type="unfinished"></translation>
492+ </message>
493+ <message>
494 <source>Commercial Skip Auto-Rewind Amount</source>
495 <translation>Cantidad de salto atrás después del salto de anuncios</translation>
496 </message>
497Index: mythtv.new/i18n/mythfrontend_is.ts
498===================================================================
499--- mythtv.new/i18n/mythfrontend_is.ts (revision 15597)
500+++ mythtv.new/i18n/mythfrontend_is.ts (working copy)
501@@ -1305,6 +1305,10 @@
502 <translation>Allir dagskrárliðir</translation>
503 </message>
504 <message>
505+ <source>Unwatched</source>
506+ <translation type="unfinished"></translation>
507+ </message>
508+ <message>
509 <source>You have finished watching:</source>
510 <translation type="obsolete">Þú hefur lokið að horfa á:</translation>
511 </message>
512@@ -3805,6 +3809,10 @@
513 <translation>Alle programmer</translation>
514 </message>
515 <message>
516+ <source>Unwatched</source>
517+ <translation type="unfinished"></translation>
518+ </message>
519+ <message>
520 <source>Commercial Skip Auto-Rewind Amount</source>
521 <translation type="unfinished"></translation>
522 </message>
523Index: mythtv.new/i18n/mythfrontend_si.ts
524===================================================================
525--- mythtv.new/i18n/mythfrontend_si.ts (revision 15597)
526+++ mythtv.new/i18n/mythfrontend_si.ts (working copy)
527@@ -1259,6 +1259,10 @@
528 <translation>Vsi programi</translation>
529 </message>
530 <message>
531+ <source>Unwatched</source>
532+ <translation type="unfinished"></translation>
533+ </message>
534+ <message>
535 <source>There are %1 recordings in this display group</source>
536 <translation>Samo 1% posnetkov je v tej skupini</translation>
537 </message>
538@@ -3460,6 +3464,10 @@
539 <translation>Vsi programi</translation>
540 </message>
541 <message>
542+ <source>Unwatched</source>
543+ <translation type="unfinished"></translation>
544+ </message>
545+ <message>
546 <source>Start in Title section</source>
547 <translation>Začni z naslovom</translation>
548 </message>
549Index: mythtv.new/i18n/mythfrontend_ru.ts
550===================================================================
551--- mythtv.new/i18n/mythfrontend_ru.ts (revision 15597)
552+++ mythtv.new/i18n/mythfrontend_ru.ts (working copy)
553@@ -1167,6 +1167,10 @@
554 <translation>Все прПграЌЌы</translation>
555 </message>
556 <message>
557+ <source>Unwatched</source>
558+ <translation type="unfinished"></translation>
559+ </message>
560+ <message>
561 <source>There are %1 recordings in this display group</source>
562 <translation>%1 запОсей в этПй группе</translation>
563 </message>
564@@ -4517,6 +4521,10 @@
565 <translation>ВсеЌ прПграЌЌаЌ</translation>
566 </message>
567 <message>
568+ <source>Unwatched</source>
569+ <translation type="unfinished"></translation>
570+ </message>
571+ <message>
572 <source>Default group filter to apply on the View Recordings screen.</source>
573 <translation type="obsolete">ЀОльтр пП уЌПлчаМОю Ўля группы прОЌеМяеЌый Ма экраМе ПрПсЌПтр запОсей.</translation>
574 </message>
575Index: mythtv.new/libs/libmythtv/programinfo.cpp
576===================================================================
577--- mythtv.new/libs/libmythtv/programinfo.cpp (revision 15597)
578+++ mythtv.new/libs/libmythtv/programinfo.cpp (working copy)
579@@ -4031,7 +4031,7 @@
580 {
581 QString result = QString("");
582
583- if (group == "All Programs")
584+ if ((group == "All Programs") || (group == "Unwatched"))
585 {
586 result = gContext->GetSetting("AllRecGroupPassword");
587 }
588Index: mythtv.new/programs/mythfrontend/playbackbox.cpp
589===================================================================
590--- mythtv.new/programs/mythfrontend/playbackbox.cpp (revision 15597)
591+++ mythtv.new/programs/mythfrontend/playbackbox.cpp (working copy)
592@@ -336,7 +336,8 @@
593 if ((recGroup == "All Programs") ||
594 (recGroup == "Default") ||
595 (recGroup == "LiveTV") ||
596- (recGroup == "Deleted"))
597+ (recGroup == "Deleted") ||
598+ (recGroup == "Unwatched"))
599 {
600 groupDisplayName = tr(recGroup);
601 }
602@@ -1842,12 +1843,14 @@
603 {
604 progsInDB++;
605 p = *i;
606+ bool watched = (p->programflags & FL_WATCHED);
607+ bool allUnwatched = ((recGroup == "Unwatched") && !watched);
608
609 if (p->title == "")
610 p->title = tr("_NO_TITLE_");
611
612 if ((((p->recgroup == recGroup) ||
613- ((recGroup == "All Programs") &&
614+ (((recGroup == "All Programs") || allUnwatched) &&
615 (p->recgroup != "Deleted") &&
616 (p->recgroup != "LiveTV" || LiveTVInAllPrograms))) &&
617 (recGroupPassword == curGroupPassword)) ||
618@@ -1868,7 +1871,7 @@
619 if ((viewMask & VIEW_TITLES) && // Show titles
620 ((p->recgroup != "LiveTV") ||
621 (recGroup == "LiveTV") ||
622- ((recGroup == "All Programs") &&
623+ (((recGroup == "All Programs") || allUnwatched) &&
624 ((viewMask & VIEW_LIVETVGRP) == 0))))
625 {
626 sTitle = sortTitle(p->title, viewMask, titleSort,
627@@ -1909,7 +1912,7 @@
628 }
629
630 if ((LiveTVInAllPrograms) &&
631- (recGroup == "All Programs") &&
632+ ((recGroup == "All Programs") || allUnwatched) &&
633 (viewMask & VIEW_LIVETVGRP) &&
634 (p->recgroup == "LiveTV"))
635 {
636@@ -1927,7 +1930,7 @@
637 VERBOSE(VB_FILE, QString("Auto-expire off: %1")
638 .arg(p->title));
639 }
640- else if (p->programflags & FL_WATCHED)
641+ else if (watched)
642 {
643 p->recpriority2 = wlWatched;
644 VERBOSE(VB_FILE, QString("Marked as 'watched': %1")
645@@ -4957,7 +4960,7 @@
646 SLOT(toggleSearchView(bool)));
647 recGroupPopup->addWidget(checkBox, false);
648
649- if ((recGroup == "All Programs") &&
650+ if (((recGroup == "All Programs") || (recGroup == "Unwatched"))&&
651 (gContext->GetNumSetting("LiveTVInAllPrograms",0)))
652 {
653 checkBox = new MythCheckBox(tr("Show LiveTV as a Group"),
654@@ -5018,6 +5021,7 @@
655 QString saveRecGroup = recGroup;
656 int items;
657 int totalItems = 0;
658+ int unwatched = 0;
659 bool liveTVInAll = gContext->GetNumSetting("LiveTVInAllPrograms",0);
660
661 recGroupType.clear();
662@@ -5026,7 +5030,7 @@
663
664 // Find each recording group, and the number of recordings in each
665 query.prepare(
666- "SELECT recgroup, COUNT(title) "
667+ "SELECT recgroup, COUNT(title), SUM(watched) "
668 "FROM recorded "
669 "WHERE deletepending = 0 "
670 "GROUP BY recgroup");
671@@ -5042,6 +5046,8 @@
672 (dispGroup != "Deleted"))
673 totalItems += items;
674
675+ unwatched += (items - query.value(2).toInt());
676+
677 dispGroup = (dispGroup == "Default") ? tr("Default") : dispGroup;
678 dispGroup = (dispGroup == "Deleted") ? tr("Deleted") : dispGroup;
679 dispGroup = (dispGroup == "LiveTV") ? tr("LiveTV") : dispGroup;
680@@ -5059,6 +5065,12 @@
681 .arg(totalItems).arg(itemStr));
682 recGroupType["All Programs"] = "recgroup";
683
684+ // Create and add the "Unwatched" entry
685+ itemStr = (unwatched == 1) ? tr("item") : tr("items");
686+ recGroupListBox->insertItem(QString("%1 [%2 %3]").arg(tr("Unwatched"))
687+ .arg(unwatched).arg(itemStr));
688+ recGroupType["Unwatched"] = "recgroup";
689+
690 // Add the group entries
691 recGroupListBox->insertItem(QString("------- %1 -------")
692 .arg(tr("Groups")));
693@@ -5130,6 +5142,8 @@
694 dispGroup = tr("LiveTV");
695 else if (recGroup == "Deleted")
696 dispGroup = tr("Deleted");
697+ else if (recGroup == "Unwatched")
698+ dispGroup = tr("Unwatched");
699 else
700 dispGroup = recGroup;
701
702@@ -5198,6 +5212,8 @@
703 recGroup = "LiveTV";
704 else if (recGroup == tr("Deleted"))
705 recGroup = "Deleted";
706+ else if (recGroup == tr("Unwatched"))
707+ recGroup = "Unwatched";
708
709 recGroupPassword = getRecGroupPassword(recGroup);
710
711@@ -5586,7 +5602,8 @@
712 grid->addWidget(label, 0, 0, Qt::AlignLeft);
713
714 if ((recGroup == "Default") || (recGroup == "All Programs") ||
715- (recGroup == "LiveTV") || (recGroup == "Deleted"))
716+ (recGroup == "LiveTV") || (recGroup == "Deleted") ||
717+ (recGroup == "Unwatched"))
718 label = new QLabel(tr(recGroup), recGroupPopup);
719 else
720 label = new QLabel(recGroup, recGroupPopup);
721@@ -5659,7 +5676,7 @@
722 return;
723 }
724
725- if (recGroup == "All Programs")
726+ if ((recGroup == "All Programs") || (recGroup == "Unwatched"))
727 {
728 gContext->SaveSetting("AllRecGroupPassword", newPassword);
729 }
730Index: mythtv.new/programs/mythfrontend/globalsettings.cpp
731===================================================================
732--- mythtv.new/programs/mythfrontend/globalsettings.cpp (revision 15597)
733+++ mythtv.new/programs/mythfrontend/globalsettings.cpp (working copy)
734@@ -251,6 +251,7 @@
735 gc->setLabel(QObject::tr("Default group filter to apply"));
736
737 gc->addSelection(QObject::tr("All Programs"), QString("All Programs"));
738+ gc->addSelection(QObject::tr("Unwatched"), QString("Unwatched"));
739 gc->addSelection(QObject::tr("Default"), QString("Default"));
740
741 MSqlQuery query(MSqlQuery::InitCon());