Ticket #1626: playgroup.2.patch

File playgroup.2.patch, 33.9 KB (added by derek@…, 18 years ago)

updated patch; fixes 'delete recording' regression

Line 
1Index: includes/programs.php
2===================================================================
3--- includes/programs.php       (revision 10396)
4+++ includes/programs.php       (working copy)
5@@ -275,6 +275,7 @@
6     var $is_movie;
7 
8     var $timestretch;
9+    var $playgroup;
10 
11     var $credits = array();
12 
13@@ -321,7 +322,8 @@
14             $this->recpriority     = $data[36];
15             $this->airdate         = date('Y-m-d', $data[37]);
16             $this->hasairdate      = $data[38];
17-            $this->timestretch     = $data[39];
18+            $this->playgroup       = $data[39];
19+            $this->timestretch     = '';            # Not printed by ToStringList()
20             $this->recpriority2    = $data[40];
21         // Is this a previously-recorded program?
22             if (!empty($this->filename)) {
23Index: includes/recording_schedules.php
24===================================================================
25--- includes/recording_schedules.php    (revision 10396)
26+++ includes/recording_schedules.php    (working copy)
27@@ -143,6 +143,7 @@
28     var $findid;
29     var $transcoder;
30     var $parentid;
31+    var $playgroup;
32 
33     var $texttype;
34     var $channel;
35@@ -251,7 +252,7 @@
36     // Update the type, in case it changed
37         $this->type = $new_type;
38     // Update the record
39-        $result = mysql_query('REPLACE INTO record (recordid,type,chanid,starttime,startdate,endtime,enddate,search,title,subtitle,description,profile,recpriority,category,maxnewest,inactive,maxepisodes,autoexpire,startoffset,endoffset,recgroup,dupmethod,dupin,station,seriesid,programid,autocommflag,findday,findtime,findid,autotranscode,transcoder,parentid,tsdefault,autouserjob1,autouserjob2,autouserjob3,autouserjob4) values ('
40+        $result = mysql_query('REPLACE INTO record (recordid,type,chanid,starttime,startdate,endtime,enddate,search,title,subtitle,description,profile,recpriority,category,maxnewest,inactive,maxepisodes,autoexpire,startoffset,endoffset,recgroup,dupmethod,dupin,station,seriesid,programid,autocommflag,findday,findtime,findid,autotranscode,transcoder,parentid,tsdefault,autouserjob1,autouserjob2,autouserjob3,autouserjob4,playgroup) values ('
41                                 .escape($this->recordid, true)             .','
42                                 .escape($this->type)                       .','
43                                 .escape($this->chanid)                     .','
44@@ -289,7 +290,8 @@
45                                 .escape($this->autouserjob1)               .','
46                                 .escape($this->autouserjob2)               .','
47                                 .escape($this->autouserjob3)               .','
48-                                .escape($this->autouserjob4)               .')')
49+                                .escape($this->autouserjob4)               .','
50+                               .escape($this->playgroup)                  .')')
51             or trigger_error('SQL Error: '.mysql_error(), FATAL);
52     // Get the id that was returned
53         $recordid = mysql_insert_id();
54@@ -512,4 +514,31 @@
55         echo '</select>';
56     }
57 
58+/**
59+ * prints a <select> of the various playback groups available
60+/**/
61+    function playgroup_select($this_playgroup, $name = 'playgroup', $js = '', $id = '')
62+    {
63+        static $playgroups = array();
64+        if(!sizeof($playgroups))
65+        {
66+            $res = mysql_query('SELECT name FROM playgroup');
67+            while($row = mysql_fetch_row($res))
68+                $playgroups[$row[0]] = $row[0];
69+            mysql_free_result($res);
70+        }
71 
72+        echo "<select name=\"$name\"";
73+        if(strlen($js))
74+           echo " onchange=\"$js\" id=\"playgroup_$id\" name=\"playgroup_$id\"";
75+        echo ">\n";
76+        foreach($playgroups as $playgroup)
77+        {
78+            echo "\t<option value=\"" . html_entities($playgroup) . '"';
79+            if($this_playgroup == $playgroup)
80+                echo ' SELECTED';
81+            echo '>' . html_entities($playgroup) . "</option>\n";
82+        }
83+        echo "</select>\n";
84+        return;
85+    }
86Index: includes/css.php
87===================================================================
88--- includes/css.php    (revision 10396)
89+++ includes/css.php    (working copy)
90@@ -31,14 +31,15 @@
91     // Scan the $Categories hash for any matches
92         else {
93             global $Categories;
94-            foreach ($Categories as $cat => $details) {
95-                if (!$details[1])
96-                    continue;
97-                if (preg_match('/'.$details[1].'/', $category)) {
98-                    $class[] = $cache[$category] = 'cat_'.$cat;
99-                    break;
100+            if(is_array($Categories))
101+                foreach ($Categories as $cat => $details) {
102+                    if (!$details[1])
103+                        continue;
104+                    if (preg_match('/'.$details[1].'/', $category)) {
105+                        $class[] = $cache[$category] = 'cat_'.$cat;
106+                        break;
107+                    }
108                 }
109-            }
110         }
111     // No category found?
112         if (!$cache[$category])
113Index: modules/settings/playgroup.php
114===================================================================
115--- modules/settings/playgroup.php      (revision 0)
116+++ modules/settings/playgroup.php      (revision 0)
117@@ -0,0 +1,43 @@
118+<?php
119+/**
120+ * Configure MythTV playback groups
121+ *
122+ * @url         $URL$
123+ * @date        $Date$
124+ * @version     $Revision$
125+ * @author      $Author$
126+ * @license     GPL
127+ *
128+ * @package     MythWeb
129+ * @subpackage  Settings
130+ *
131+/**/
132+// We need the list of available playgroups
133+    require_once 'includes/recording_schedules.php';
134+
135+// Load a playgroup to edit
136+    $row = array();
137+    if(isset($_GET['playgroup'])) {
138+        $sh = $db->query('SELECT * FROM playgroup WHERE name = ?', $_GET['playgroup']);
139+        if($sh->num_rows() == 1)
140+           $row = $sh->fetch_assoc();
141+    }
142+    $name        = isset($row['name']) ? $row['name'] : '';
143+    $titlematch  = isset($row['titlematch']) ? $row['titlematch'] : '';
144+    $skipahead   = isset($row['skipahead']) ? $row['skipahead'] : '';
145+    $skipback    = isset($row['skipback']) ? $row['skipback'] : '';
146+    $timestretch = isset($row['timestretch']) ? $row['timestretch'] : '';
147+    $jump        = isset($row['jump']) ? $row['jump'] : '';
148+
149+// Save changes
150+    if(isset($_POST['save']))
151+        $db->query('REPLACE INTO playgroup (name, titlematch, skipahead, skipback, timestretch, jump) VALUES (?, ?, ?, ?, ?, ?)', $_POST['name'], $_POST['titlematch'], $_POST['skipahead'], $_POST['skipback'], $_POST['timestretch'], $_POST['jump']);
152+
153+// Delete group
154+    if(isset($_POST['delete']))
155+        $db->query('DELETE FROM playgroup WHERE name = ?', $_POST['name']);
156+
157+// Load the class for this page
158+    require_once tmpl_dir.'playgroup.php';
159+
160+    exit(0);
161Index: modules/settings/init.php
162===================================================================
163--- modules/settings/init.php   (revision 10396)
164+++ modules/settings/init.php   (working copy)
165@@ -23,5 +23,6 @@
166                                                         'channels'  => t('MythTV channel info'),
167                                                         'keys'      => t('MythTV key bindings'),
168                                                         'settings'  => t('MythTV settings table'),
169+                                                       'playgroup' => t('MythTV playback group editor')
170                                                        ),
171                                 );
172Index: modules/settings/tmpl/default/playgroup.php
173===================================================================
174--- modules/settings/tmpl/default/playgroup.php (revision 0)
175+++ modules/settings/tmpl/default/playgroup.php (revision 0)
176@@ -0,0 +1,73 @@
177+<?php
178+/**
179+ * Configure MythTV playback groups
180+ *
181+ * @url         $URL$
182+ * @date        $Date$
183+ * @version     $Revision$
184+ * @author      $Author$
185+ * @license     GPL
186+ *
187+ * @package     MythWeb
188+ * @subpackage  Settings
189+ *
190+/**/
191+
192+
193+// Set the desired page title
194+    $page_title = 'MythWeb - '.t('Playback Group Editor');
195+
196+// Print the page header
197+    require 'modules/_shared/tmpl/'.tmpl.'/header.php';
198+
199+?>
200+<table align="center" width="40%" cellspacing="2" cellpadding="2">
201+<tr>
202+    <td width="50%" class="command command_border_l command_border_t command_border_b command_border_r" align="center">
203+        <form class="form" method="get" action="<?php echo root ?>settings/playgroup">
204+        <table width="100%" border="0" cellspacing="0" cellpadding="2">
205+        <tr>
206+            <td nowrap align="center"><?php echo t('Edit existing group') ?>:&nbsp;&nbsp;</td>
207+                <td><?php playgroup_select(NULL); ?></td>
208+            <td align="center"><input type="submit" class="submit" value="<?php echo t('Load Group') ?>"></td>
209+        </tr>
210+        </table>
211+        </form>
212+        </td>
213+</tr>
214+</table>
215+
216+<form class="form" method="post" action="<?php echo root ?>settings/playgroup">
217+
218+<table border="0" cellpadding="4" cellspacing="2" class="list small" align="center">
219+<tr class="menu large" align="center">
220+    <td colspan="6"><?php echo t('Playback Group Editor') ?></td>
221+</tr><tr class="menu" align="center">
222+    <td><?php echo t('Name') ?></td>
223+    <td><?php echo t('Title Match') ?></td>
224+    <td><?php echo t('Skip Ahead') ?></td>
225+    <td><?php echo t('Skip Back') ?></td>
226+    <td><?php echo t('Time Stretch') ?></td>
227+    <td><?php echo t('Jump') ?></td>
228+</tr>
229+<tr class="menu">
230+    <td><input type="text" name="name" value="<?php echo $name ?>" /></td>
231+    <td><input type="text" name="titlematch" value="<?php echo $titlematch ?>" /></td>
232+    <td><input type="text" name="skipahead" value="<?php echo $skipahead ?>" /></td>
233+    <td><input type="text" name="skipback" value="<?php echo $skipback ?>" /></td>
234+    <td><input type="text" name="timestretch" value="<?php echo $timestretch ?>" /></td>
235+    <td><input type="text" name="jump" value="<?php echo $jump ?>" /></td>
236+</tr>
237+</table>
238+
239+<p align="center">
240+<input type="submit" name="save" value="<?php echo t('Save') ?>">
241+<input type="submit" name="delete" value="<?php echo t('Delete') ?>">
242+</p>
243+
244+</form>
245+<?php
246+
247+// Print the page footer
248+    require 'modules/_shared/tmpl/'.tmpl.'/footer.php';
249+
250Index: modules/_shared/lang/English_GB.lang
251===================================================================
252--- modules/_shared/lang/English_GB.lang        (revision 10396)
253+++ modules/_shared/lang/English_GB.lang        (working copy)
254@@ -106,6 +106,7 @@
255 "Duplicates"
256 "Duration"
257 "Edit"
258+"Edit existing group"
259 "Edit keybindings on"
260 "Edit MythWeb and some MythTV settings."
261 "Edit settings for"
262@@ -182,6 +183,7 @@
263 "Listing &quot;Jump to&quot;"
264 "Listing Time Key"
265 "Listings"
266+"Load Group"
267 "Logs"
268 "Low"
269 "Manual"
270@@ -202,6 +204,7 @@
271 "MythTV channel info"
272 "MythTV global defaults"
273 "MythTV key bindings"
274+"MythTV playback group editor"
275 "MythTV settings table"
276 "MythTV Status"
277 "MythVideo Artwork Dir"
278@@ -244,6 +247,8 @@
279 "Past Year"
280 "People"
281 "People Search"
282+"Playback Group"
283+"Playback Group Editor"
284 "Please be warned that by altering this table without knowing what you are doing, you could seriously disrupt mythtv functionality."
285 "Please search for something."
286 "plot"
287@@ -414,6 +419,8 @@
288 "Showing all programs."
289     Showing all programmes.
290 "SI Units?"
291+"Skip Ahead"
292+"Skip Back"
293 "sourceid"
294 "Special Searches"
295 "Star character"
296@@ -434,10 +441,12 @@
297 "The requested recording schedule has been deleted."
298 "Thursday"
299 "Time"
300+"Time Stretch"
301 "Time Stretch Default"
302 "Timeslot size"
303 "title"
304 "Title"
305+"Title Match"
306 "Title Search"
307 "Today"
308 "Tomorrow"
309Index: modules/_shared/lang/Spanish.lang
310===================================================================
311--- modules/_shared/lang/Spanish.lang   (revision 10396)
312+++ modules/_shared/lang/Spanish.lang   (working copy)
313@@ -198,6 +198,7 @@
314     Duración
315 "Edit"
316     Editar
317+"Edit existing group"
318 "Edit keybindings on"
319     Editar Teclas en
320 "Edit MythWeb and some MythTV settings."
321@@ -332,6 +333,7 @@
322     Hora Listado
323 "Listings"
324     Listados
325+"Load Group"
326 "Logs"
327 "Low"
328     Bajo
329@@ -360,6 +362,7 @@
330 "MythTV global defaults"
331 "MythTV key bindings"
332     Vínculos Teclas MythTV
333+"MythTV playback group editor"
334 "MythTV settings table"
335 "MythTV Status"
336     Estado MythTV
337@@ -427,6 +430,8 @@
338     Gente
339 "People Search"
340     Búsqueda gente
341+"Playback Group"
342+"Playback Group Editor"
343 "Please be warned that by altering this table without knowing what you are doing, you could seriously disrupt mythtv functionality."
344     Tenga cuidado al alterar esta tabla sin saber lo que hace, puede romper el funcionamiento de MythTV
345 "Please search for something."
346@@ -654,6 +659,8 @@
347     Mostrando todos los programas
348 "SI Units?"
349     Â¿Unidades SI?
350+"Skip Ahead"
351+"Skip Back"
352 "sourceid"
353     id fuente
354 "Special Searches"
355@@ -692,6 +699,7 @@
356     Jueves
357 "Time"
358     Hora
359+"Time Stretch"
360 "Time Stretch Default"
361     Ajuste de tiempo por defecto
362 "Timeslot size"
363@@ -699,6 +707,7 @@
364     título
365 "Title"
366     Título
367+"Title Match"
368 "Title Search"
369     Buscar título
370 "Today"
371Index: modules/_shared/lang/French.lang
372===================================================================
373--- modules/_shared/lang/French.lang    (revision 10396)
374+++ modules/_shared/lang/French.lang    (working copy)
375@@ -161,6 +161,7 @@
376     Doublonner
377 "Duration"
378 "Edit"
379+"Edit existing group"
380 "Edit keybindings on"
381     Editer les touches sur
382 "Edit MythWeb and some MythTV settings."
383@@ -275,6 +276,7 @@
384     Lister Touches de temps
385 "Listings"
386     Liste
387+"Load Group"
388 "Logs"
389 "Low"
390     faible
391@@ -295,6 +297,7 @@
392 "MythTV channel info"
393 "MythTV global defaults"
394 "MythTV key bindings"
395+"MythTV playback group editor"
396 "MythTV settings table"
397 "MythTV Status"
398 "MythVideo Artwork Dir"
399@@ -347,6 +350,8 @@
400 "Past Year"
401 "People"
402 "People Search"
403+"Playback Group"
404+"Playback Group Editor"
405 "Please be warned that by altering this table without knowing what you are doing, you could seriously disrupt mythtv functionality."
406     Nous vous pr&eacute;venons que modifier les touches sans savoir ce que vous fa&icirc;tes peut s&eacute;rieusement endomager le fonctionnement de MythTV
407 "Please search for something."
408@@ -552,6 +557,8 @@
409 "Showing all programs."
410 "SI Units?"
411     Unités métriques?
412+"Skip Ahead"
413+"Skip Back"
414 "sourceid"
415 "Special Searches"
416 "Star character"
417@@ -584,12 +591,14 @@
418     Jeudi
419 "Time"
420     Heure
421+"Time Stretch"
422 "Time Stretch Default"
423 "Timeslot size"
424 "title"
425     Titre
426 "Title"
427     Titre
428+"Title Match"
429 "Title Search"
430 "Today"
431     Aujourd&acute;hui
432Index: modules/_shared/lang/Swedish.lang
433===================================================================
434--- modules/_shared/lang/Swedish.lang   (revision 10396)
435+++ modules/_shared/lang/Swedish.lang   (working copy)
436@@ -200,6 +200,7 @@
437     LÀngd
438 "Edit"
439     Redigera
440+"Edit existing group"
441 "Edit keybindings on"
442     Editera knappar pÃ¥
443 "Edit MythWeb and some MythTV settings."
444@@ -335,6 +336,7 @@
445     TV-tablÃ¥ tid
446 "Listings"
447     TV-tablÃ¥er
448+"Load Group"
449 "Logs"
450     Logg
451 "Low"
452@@ -364,6 +366,7 @@
453 "MythTV global defaults"
454 "MythTV key bindings"
455     MythTV tangentbindningar
456+"MythTV playback group editor"
457 "MythTV settings table"
458 "MythTV Status"
459     MythTV-status
460@@ -431,6 +434,8 @@
461     Person
462 "People Search"
463     Sök person
464+"Playback Group"
465+"Playback Group Editor"
466 "Please be warned that by altering this table without knowing what you are doing, you could seriously disrupt mythtv functionality."
467     OBS! Genom att Àndra dessa instÀllningar utan att veta vad du gör kan du allvarligt störa MythTVs funktionalitet.
468 "Please search for something."
469@@ -658,6 +663,8 @@
470     Visar alla program.
471 "SI Units?"
472     SI-enheter?
473+"Skip Ahead"
474+"Skip Back"
475 "sourceid"
476     kÀll-id
477 "Special Searches"
478@@ -696,6 +703,7 @@
479     Torsdag
480 "Time"
481     Tid
482+"Time Stretch"
483 "Time Stretch Default"
484     Förvalt tempo
485 "Timeslot size"
486@@ -703,6 +711,7 @@
487     titel
488 "Title"
489     Titel
490+"Title Match"
491 "Title Search"
492     Sök titel
493 "Today"
494Index: modules/_shared/lang/Danish.lang
495===================================================================
496--- modules/_shared/lang/Danish.lang    (revision 10396)
497+++ modules/_shared/lang/Danish.lang    (working copy)
498@@ -179,6 +179,7 @@
499     Varighed
500 "Edit"
501     Ã†ndre
502+"Edit existing group"
503 "Edit keybindings on"
504     Rediger tastaturgenveje for
505 "Edit MythWeb and some MythTV settings."
506@@ -295,6 +296,7 @@
507     Programoversigt tid
508 "Listings"
509     Programoversigt
510+"Load Group"
511 "Logs"
512 "Low"
513     Lav
514@@ -318,6 +320,7 @@
515 "MythTV global defaults"
516 "MythTV key bindings"
517     MythTV taste indstillinger
518+"MythTV playback group editor"
519 "MythTV settings table"
520 "MythTV Status"
521 "MythVideo Artwork Dir"
522@@ -374,6 +377,8 @@
523 "Past Year"
524 "People"
525 "People Search"
526+"Playback Group"
527+"Playback Group Editor"
528 "Please be warned that by altering this table without knowing what you are doing, you could seriously disrupt mythtv functionality."
529     BemÊrk at ved at Êndre i denne tabel uden at vide hvad du laver, kan du ÞdelÊgge mythtvs funktioner.
530 "Please search for something."
531@@ -589,6 +594,8 @@
532 "Showing all programs."
533 "SI Units?"
534     SI enheder?
535+"Skip Ahead"
536+"Skip Back"
537 "sourceid"
538 "Special Searches"
539     Specielle sÞgninger
540@@ -624,6 +631,7 @@
541     Torsdag
542 "Time"
543     Tidspunkt
544+"Time Stretch"
545 "Time Stretch Default"
546     Standard Afspilnings hastighed
547 "Timeslot size"
548@@ -631,6 +639,7 @@
549     titel
550 "Title"
551     Titel
552+"Title Match"
553 "Title Search"
554 "Today"
555     I dag
556Index: modules/_shared/lang/Dutch.lang
557===================================================================
558--- modules/_shared/lang/Dutch.lang     (revision 10396)
559+++ modules/_shared/lang/Dutch.lang     (working copy)
560@@ -200,6 +200,7 @@
561     Lengte
562 "Edit"
563     Bewerken
564+"Edit existing group"
565 "Edit keybindings on"
566     Toetsbindingen bewerken op
567 "Edit MythWeb and some MythTV settings."
568@@ -334,6 +335,7 @@
569     Weergave Tijd Gids
570 "Listings"
571     Programmagids
572+"Load Group"
573 "Logs"
574     Logboek
575 "Low"
576@@ -363,6 +365,7 @@
577 "MythTV global defaults"
578 "MythTV key bindings"
579     MythTV toetsbindingen
580+"MythTV playback group editor"
581 "MythTV settings table"
582 "MythTV Status"
583     MythTV status
584@@ -430,6 +433,8 @@
585     Personen
586 "People Search"
587     Personen zoeken
588+"Playback Group"
589+"Playback Group Editor"
590 "Please be warned that by altering this table without knowing what you are doing, you could seriously disrupt mythtv functionality."
591     Waarschuwing! Als u niet weet wat u doet, kan het veranderen van deze tabel de werking van MythTV ernstig verstoren.
592 "Please search for something."
593@@ -656,6 +661,8 @@
594     Alle programma's laten zien
595 "SI Units?"
596     SI eenheden?
597+"Skip Ahead"
598+"Skip Back"
599 "sourceid"
600     bron
601 "Special Searches"
602@@ -694,6 +701,7 @@
603     Donderdag
604 "Time"
605     Tijd
606+"Time Stretch"
607 "Time Stretch Default"
608     TimeStretch Standaard
609 "Timeslot size"
610@@ -701,6 +709,7 @@
611     titel
612 "Title"
613     Titel
614+"Title Match"
615 "Title Search"
616     Titel zoeken
617 "Today"
618Index: modules/_shared/lang/German.lang
619===================================================================
620--- modules/_shared/lang/German.lang    (revision 10396)
621+++ modules/_shared/lang/German.lang    (working copy)
622@@ -200,6 +200,7 @@
623     Dauer
624 "Edit"
625     Bearbeiten
626+"Edit existing group"
627 "Edit keybindings on"
628     Tastaturbelegung Àndern fÃŒr
629 "Edit MythWeb and some MythTV settings."
630@@ -332,6 +333,7 @@
631 "Listing Time Key"
632 "Listings"
633     TV Programm
634+"Load Group"
635 "Logs"
636     Logs
637 "Low"
638@@ -361,6 +363,7 @@
639 "MythTV global defaults"
640 "MythTV key bindings"
641     MythTV Tastaturbelegung
642+"MythTV playback group editor"
643 "MythTV settings table"
644 "MythTV Status"
645     MythTV Status
646@@ -427,6 +430,8 @@
647     Leute
648 "People Search"
649     Suche nach Darsteller
650+"Playback Group"
651+"Playback Group Editor"
652 "Please be warned that by altering this table without knowing what you are doing, you could seriously disrupt mythtv functionality."
653     Achtung! Falls diese Tabelle ohne das nötige Hintergrundwissen verÀndert wird, könnte MythTVs FunktionalitÀt nachhaltig gestört werden.
654 "Please search for something."
655@@ -654,6 +659,8 @@
656     Zeige alle Sendungen.
657 "SI Units?"
658     SI Einheiten?
659+"Skip Ahead"
660+"Skip Back"
661 "sourceid"
662     Source ID
663 "Special Searches"
664@@ -690,6 +697,7 @@
665     Donnerstag
666 "Time"
667     Zeit
668+"Time Stretch"
669 "Time Stretch Default"
670     Zeitraffer Vorgabewert
671 "Timeslot size"
672@@ -697,6 +705,7 @@
673     Titel
674 "Title"
675     Titel
676+"Title Match"
677 "Title Search"
678     Titel Suche
679 "Today"
680Index: modules/_shared/lang/Japanese.lang
681===================================================================
682--- modules/_shared/lang/Japanese.lang  (revision 10396)
683+++ modules/_shared/lang/Japanese.lang  (working copy)
684@@ -185,6 +185,7 @@
685     æ™‚é–“
686 "Edit"
687     ç·šé›†
688+"Edit existing group"
689 "Edit keybindings on"
690     ã‚­ãƒŒãƒã‚€ãƒ³ãƒ‰ç·šé›†å¯Ÿè±¡
691 "Edit MythWeb and some MythTV settings."
692@@ -312,6 +313,7 @@
693     äž€èŠ§ タむムキヌ
694 "Listings"
695     ç•ªçµ„è¡š
696+"Load Group"
697 "Logs"
698     ãƒ­ã‚°
699 "Low"
700@@ -337,6 +339,7 @@
701 "MythTV global defaults"
702 "MythTV key bindings"
703     MythTVキヌバむンド
704+"MythTV playback group editor"
705 "MythTV settings table"
706 "MythTV Status"
707     MythTVステヌタス
708@@ -399,6 +402,8 @@
709     ãƒ”ヌプル
710 "People Search"
711     ãƒ”ヌプルサヌチ
712+"Playback Group"
713+"Playback Group Editor"
714 "Please be warned that by altering this table without knowing what you are doing, you could seriously disrupt mythtv functionality."
715     èš­å®šé …目の意味がわからないずきは倉曎しないでください。MythTVが正垞に動䜜しなくなりたす。
716 "Please search for something."
717@@ -623,6 +628,8 @@
718     ã™ã¹ãŠã®ç•ªçµ„を衚瀺
719 "SI Units?"
720     SI単䜍を䜿甚する
721+"Skip Ahead"
722+"Skip Back"
723 "sourceid"
724 "Special Searches"
725     ã‚¹ãƒšã‚·ãƒ£ãƒ«æ€œçŽ¢
726@@ -659,6 +666,7 @@
727     æœšæ›œæ—¥
728 "Time"
729     æ”Ÿé€æ™‚é–“
730+"Time Stretch"
731 "Time Stretch Default"
732     ã‚¿ã‚€ãƒ ã‚¹ãƒˆãƒ¬ãƒƒãƒèš­å®š
733 "Timeslot size"
734@@ -666,6 +674,7 @@
735     ã‚¿ã‚€ãƒˆãƒ«
736 "Title"
737     ã‚¿ã‚€ãƒˆãƒ«
738+"Title Match"
739 "Title Search"
740     ã‚¿ã‚€ãƒˆãƒ«ã‚µãƒŒãƒ
741 "Today"
742Index: modules/_shared/lang/English.lang
743===================================================================
744--- modules/_shared/lang/English.lang   (revision 10396)
745+++ modules/_shared/lang/English.lang   (working copy)
746@@ -102,6 +102,7 @@
747 "Duplicates"
748 "Duration"
749 "Edit"
750+"Edit existing group"
751 "Edit keybindings on"
752 "Edit MythWeb and some MythTV settings."
753 "Edit settings for"
754@@ -177,6 +178,7 @@
755 "Listing &quot;Jump to&quot;"
756 "Listing Time Key"
757 "Listings"
758+"Load Group"
759 "Logs"
760 "Low"
761 "Manual"
762@@ -194,6 +196,7 @@
763 "MythTV channel info"
764 "MythTV global defaults"
765 "MythTV key bindings"
766+"MythTV playback group editor"
767 "MythTV settings table"
768 "MythTV Status"
769 "MythVideo Artwork Dir"
770@@ -234,6 +237,8 @@
771 "Past Year"
772 "People"
773 "People Search"
774+"Playback Group"
775+"Playback Group Editor"
776 "Please be warned that by altering this table without knowing what you are doing, you could seriously disrupt mythtv functionality."
777 "Please search for something."
778 "plot"
779@@ -402,6 +407,8 @@
780 "Showing all programs from the $1 group."
781 "Showing all programs."
782 "SI Units?"
783+"Skip Ahead"
784+"Skip Back"
785 "sourceid"
786 "Special Searches"
787 "Star character"
788@@ -422,10 +429,12 @@
789 "The requested recording schedule has been deleted."
790 "Thursday"
791 "Time"
792+"Time Stretch"
793 "Time Stretch Default"
794 "Timeslot size"
795 "title"
796 "Title"
797+"Title Match"
798 "Title Search"
799 "Today"
800 "Tomorrow"
801Index: modules/_shared/lang/Czech.lang
802===================================================================
803--- modules/_shared/lang/Czech.lang     (revision 10396)
804+++ modules/_shared/lang/Czech.lang     (working copy)
805@@ -135,6 +135,7 @@
806 "Duplicates"
807 "Duration"
808 "Edit"
809+"Edit existing group"
810 "Edit keybindings on"
811 "Edit MythWeb and some MythTV settings."
812 "Edit settings for"
813@@ -224,6 +225,7 @@
814 "Listing Time Key"
815 "Listings"
816     VÃœpisy
817+"Load Group"
818 "Logs"
819 "Low"
820 "Manual"
821@@ -245,6 +247,7 @@
822 "MythTV channel info"
823 "MythTV global defaults"
824 "MythTV key bindings"
825+"MythTV playback group editor"
826 "MythTV settings table"
827 "MythTV Status"
828 "MythVideo Artwork Dir"
829@@ -295,6 +298,8 @@
830 "Past Year"
831 "People"
832 "People Search"
833+"Playback Group"
834+"Playback Group Editor"
835 "Please be warned that by altering this table without knowing what you are doing, you could seriously disrupt mythtv functionality."
836 "Please search for something."
837 "plot"
838@@ -474,6 +479,8 @@
839 "Showing all programs from the $1 group."
840 "Showing all programs."
841 "SI Units?"
842+"Skip Ahead"
843+"Skip Back"
844 "sourceid"
845 "Special Searches"
846 "Star character"
847@@ -499,12 +506,14 @@
848 "Thursday"
849     ÄŒtvrtek
850 "Time"
851+"Time Stretch"
852 "Time Stretch Default"
853 "Timeslot size"
854 "title"
855     název
856 "Title"
857     Název
858+"Title Match"
859 "Title Search"
860 "Today"
861     Dnes
862Index: modules/_shared/lang/Finnish.lang
863===================================================================
864--- modules/_shared/lang/Finnish.lang   (revision 10396)
865+++ modules/_shared/lang/Finnish.lang   (working copy)
866@@ -197,6 +197,7 @@
867     Kesto
868 "Edit"
869     Muokkaa
870+"Edit existing group"
871 "Edit keybindings on"
872     Muokkaa nÀppÀinkomentoja
873 "Edit MythWeb and some MythTV settings."
874@@ -326,6 +327,7 @@
875     Listauksen AikanÀppÀin
876 "Listings"
877     Listaus
878+"Load Group"
879 "Logs"
880     Lokit
881 "Low"
882@@ -351,6 +353,7 @@
883 "MythTV global defaults"
884 "MythTV key bindings"
885     MythTV komennot
886+"MythTV playback group editor"
887 "MythTV settings table"
888 "MythTV Status"
889     MythTV Tila
890@@ -414,6 +417,8 @@
891 "People"
892 "People Search"
893     Haku NimellÀ
894+"Playback Group"
895+"Playback Group Editor"
896 "Please be warned that by altering this table without knowing what you are doing, you could seriously disrupt mythtv functionality."
897     Varoitus: NÀiden asetusten muokkaus voi haitata MythTV:n toimintaa.
898 "Please search for something."
899@@ -638,6 +643,8 @@
900     NÀytetÀÀn kaikki ohjelmat.
901 "SI Units?"
902     SI-yksiköt
903+"Skip Ahead"
904+"Skip Back"
905 "sourceid"
906 "Special Searches"
907     Edistynyt Haku
908@@ -675,6 +682,7 @@
909     Torstai
910 "Time"
911     Aika
912+"Time Stretch"
913 "Time Stretch Default"
914     Ajan SÀÀdön Oletus
915 "Timeslot size"
916@@ -682,6 +690,7 @@
917     Nimike
918 "Title"
919     Nimike
920+"Title Match"
921 "Title Search"
922     Haku NimikkeellÀ
923 "Today"
924Index: modules/_shared/lang/Slovenian.lang
925===================================================================
926--- modules/_shared/lang/Slovenian.lang (revision 10396)
927+++ modules/_shared/lang/Slovenian.lang (working copy)
928@@ -156,6 +156,7 @@
929     Duplikati
930 "Duration"
931 "Edit"
932+"Edit existing group"
933 "Edit keybindings on"
934     Zamenjaj bliÅŸnjico za
935 "Edit MythWeb and some MythTV settings."
936@@ -269,6 +270,7 @@
937     Seznam
938 "Listings"
939     Seznam
940+"Load Group"
941 "Logs"
942 "Low"
943     Nizka
944@@ -289,6 +291,7 @@
945 "MythTV channel info"
946 "MythTV global defaults"
947 "MythTV key bindings"
948+"MythTV playback group editor"
949 "MythTV settings table"
950 "MythTV Status"
951 "MythVideo Artwork Dir"
952@@ -341,6 +344,8 @@
953 "Past Year"
954 "People"
955 "People Search"
956+"Playback Group"
957+"Playback Group Editor"
958 "Please be warned that by altering this table without knowing what you are doing, you could seriously disrupt mythtv functionality."
959 "Please search for something."
960     Prosim poiščite kaj
961@@ -544,6 +549,8 @@
962 "Showing all programs."
963 "SI Units?"
964     SI enote
965+"Skip Ahead"
966+"Skip Back"
967 "sourceid"
968 "Special Searches"
969 "Star character"
970@@ -576,12 +583,14 @@
971     ÄŒetrtek
972 "Time"
973     ÄŒas
974+"Time Stretch"
975 "Time Stretch Default"
976 "Timeslot size"
977 "title"
978     Naslov
979 "Title"
980     Naslov
981+"Title Match"
982 "Title Search"
983 "Today"
984     Danes
985Index: modules/tv/detail.php
986===================================================================
987--- modules/tv/detail.php       (revision 10396)
988+++ modules/tv/detail.php       (working copy)
989@@ -132,6 +132,7 @@
990             $schedule->endoffset     = intval($_POST['endoffset']);
991             $schedule->autotranscode = $_POST['autotranscode'] ? 1 : 0;
992             $schedule->transcoder    = $_POST['transcoder'];
993+            $schedule->playgroup     = $_POST['playgroup'];
994             $schedule->tsdefault     = $_POST['timestretch'];
995         // Keep track of the parent recording for overrides
996             if ($_POST['record'] == rectype_override) {
997Index: modules/tv/schedules_custom.php
998===================================================================
999--- modules/tv/schedules_custom.php     (revision 10396)
1000+++ modules/tv/schedules_custom.php     (working copy)
1001@@ -100,6 +100,7 @@
1002             $schedule->findday       = $_POST['findday'];
1003             $schedule->autotranscode = $_POST['autotranscode'] ? 1 : 0;
1004             $schedule->transcoder    = $_POST['transcoder'];
1005+            $schedule->playgroup     = $_POST['playgroup'];
1006         // Parse the findtime
1007             $schedule->findtime      = trim($_POST['findtime']);
1008             if ($schedule->findtime) {
1009Index: modules/tv/schedules_manual.php
1010===================================================================
1011--- modules/tv/schedules_manual.php     (revision 10396)
1012+++ modules/tv/schedules_manual.php     (working copy)
1013@@ -87,6 +87,7 @@
1014             $schedule->findtime    = date('H:m:s', $schedule->starttime);
1015             $schedule->autotranscode = $_POST['autotranscode'] ? 1 : 0;
1016             $schedule->transcoder  = $_POST['transcoder'];
1017+            $schedule->playgroup   = $_POST['playgroup'];
1018         // Figure out the title
1019             $channel = $Channels[$_POST['channel']];
1020             if (strcasecmp($_POST['title'], t('Use callsign')) == 0) {
1021Index: modules/tv/tmpl/default/schedules_custom.php
1022===================================================================
1023--- modules/tv/tmpl/default/schedules_custom.php        (revision 10396)
1024+++ modules/tv/tmpl/default/schedules_custom.php        (working copy)
1025@@ -160,6 +160,8 @@
1026                         echo ">$i</option>";
1027                     }
1028                     ?></select></dd>
1029+                <dt><?php echo t('Playback Group') ?>:</dt>
1030+                <dd><?php playgroup_select($schedule->playgroup) ?></dd>
1031                 <dt><?php echo t('Check for duplicates in') ?>:</dt>
1032                 <dd><select name="dupin"><?php
1033                         echo '<option value="1"';
1034Index: modules/tv/tmpl/default/schedules_manual.php
1035===================================================================
1036--- modules/tv/tmpl/default/schedules_manual.php        (revision 10396)
1037+++ modules/tv/tmpl/default/schedules_manual.php        (working copy)
1038@@ -113,6 +113,8 @@
1039                         echo ">$i</option>";
1040                     }
1041                     ?></select></dd>
1042+                <dt><?php echo t('Playback Group') ?>:</dt>
1043+                <dd><?php playgroup_select($schedule->playgroup) ?></dd>
1044                 <dt><?php echo t('Check for duplicates in') ?>:</dt>
1045                 <dd><select name="dupin"><?php
1046                         echo '<option value="1"';
1047Index: modules/tv/tmpl/default/detail.php
1048===================================================================
1049--- modules/tv/tmpl/default/detail.php  (revision 10396)
1050+++ modules/tv/tmpl/default/detail.php  (working copy)
1051@@ -371,6 +371,8 @@
1052                         echo ">$i</option>";
1053                     }
1054                     ?></select></dd>
1055+                <dt><?php echo t('Playback Group') ?>:</dt>
1056+                <dd><?php playgroup_select($schedule->playgroup) ?></dd>
1057                 <dt><?php echo t('Time Stretch Default') ?>:</dt>
1058                 <dd>
1059                     <select name="timestretch">
1060Index: modules/tv/tmpl/default/recorded.php
1061===================================================================
1062--- modules/tv/tmpl/default/recorded.php        (revision 10396)
1063+++ modules/tv/tmpl/default/recorded.php        (working copy)
1064@@ -68,6 +68,14 @@
1065                    +'&chanid='+file.chanid+'&starttime='+file.starttime);
1066     }
1067 
1068+    function set_playgroup(id) {
1069+        var file = files[id];
1070+        var sel  = get_element('playgroup_' + file.chanid + '.' + file.starttime);
1071+        submit_url('<?php echo root ?>tv/recorded?ajax&playgroup='+
1072+                    sel.options[sel.selectedIndex].value+
1073+                    '&chanid='+file.chanid+'&starttime='+file.starttime);
1074+    }
1075+
1076     function confirm_delete(id, forget_old) {
1077         var file = files[id];
1078         if (confirm("<?php echo t('Are you sure you want to delete the following show?') ?>\n\n     "+file.title+": "+file.subtitle)) {
1079@@ -325,6 +333,9 @@
1080              name="autoexpire_<?php echo $show->chanid, '.', $show->recstartts ?>"
1081              <?php if ($show->auto_expire) echo ' CHECKED' ?> onchange="set_autoexpire(<?php echo $row ?>)" />
1082             </span>
1083+        <span style="padding-right: 25px"><?php echo strtolower(t('Playback Group')) ?>:&nbsp;
1084+            <?php playgroup_select($show->playgroup, 'playgroup', "set_playgroup($row)", $show->chanid . '.' . $show->recstartts) ?>
1085+            </span>
1086         <?php echo t('has bookmark') ?>:&nbsp;
1087             <b><?php echo $show->bookmark ? t('Yes') : t('No') ?></b>
1088         </td>
1089Index: modules/tv/recorded.php
1090===================================================================
1091--- modules/tv/recorded.php     (revision 10396)
1092+++ modules/tv/recorded.php     (working copy)
1093@@ -58,18 +58,27 @@
1094 
1095 // Auto-expire
1096     isset($_GET['autoexpire']) or $_GET['autoexpire'] = $_POST['autoexpire'];
1097-    if (isset($_GET['autoexpire']) && $_GET['chanid'] && $_GET['starttime']) {
1098+    if (isset($_GET['autoexpire']) && $_GET['chanid'] && $_GET['starttime'])
1099         $sh = $db->query('UPDATE recorded
1100                              SET autoexpire = ?
1101                            WHERE chanid = ? AND starttime = FROM_UNIXTIME(?)',
1102                          $_GET['autoexpire'] ? 1 : 0,
1103                          $_GET['chanid'],
1104                          $_GET['starttime']);
1105+// Playback group edit
1106+    isset($_GET['playgroup']) or $_GET['playgroup'] = $_POST['playgroup'];
1107+    if(isset($_GET['playgroup']) && $_GET['chanid'] && $_GET['starttime'])
1108+        $sh = $db->query('UPDATE recorded
1109+                             SET playgroup = ?
1110+                           WHERE chanid = ? AND starttime = FROM_UNIXTIME(?)',
1111+                         $_GET['playgroup'],
1112+                         $_GET['chanid'],
1113+                         $_GET['starttime']);
1114+
1115     // Exit early if we're in AJAX mode.
1116-        if (isset($_GET['ajax'])) {
1117-            echo 'success';
1118-            exit;
1119-        }
1120+    if (isset($_GET['ajax']) && isset($_GET['playgroup'])) {
1121+        echo 'success';
1122+        exit;
1123     }
1124     else {
1125         /** @todo need some sort of handler here for the non-ajax stuff */