Index: includes/programs.php
===================================================================
--- includes/programs.php (revision 10396)
+++ includes/programs.php (working copy)
@@ -275,6 +275,7 @@
var $is_movie;
var $timestretch;
+ var $playgroup;
var $credits = array();
@@ -321,7 +322,8 @@
$this->recpriority = $data[36];
$this->airdate = date('Y-m-d', $data[37]);
$this->hasairdate = $data[38];
- $this->timestretch = $data[39];
+ $this->playgroup = $data[39];
+ $this->timestretch = ''; # Not printed by ToStringList()
$this->recpriority2 = $data[40];
// Is this a previously-recorded program?
if (!empty($this->filename)) {
Index: includes/recording_schedules.php
===================================================================
--- includes/recording_schedules.php (revision 10396)
+++ includes/recording_schedules.php (working copy)
@@ -143,6 +143,7 @@
var $findid;
var $transcoder;
var $parentid;
+ var $playgroup;
var $texttype;
var $channel;
@@ -251,7 +252,7 @@
// Update the type, in case it changed
$this->type = $new_type;
// Update the record
- $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 ('
+ $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 ('
.escape($this->recordid, true) .','
.escape($this->type) .','
.escape($this->chanid) .','
@@ -289,7 +290,8 @@
.escape($this->autouserjob1) .','
.escape($this->autouserjob2) .','
.escape($this->autouserjob3) .','
- .escape($this->autouserjob4) .')')
+ .escape($this->autouserjob4) .','
+ .escape($this->playgroup) .')')
or trigger_error('SQL Error: '.mysql_error(), FATAL);
// Get the id that was returned
$recordid = mysql_insert_id();
@@ -512,4 +514,31 @@
echo '';
}
+/**
+ * prints a
+
:
+ playgroup) ?>
:
$i";
}
?>
+ :
+ playgroup) ?>
:
$i";
}
?>
+ :
+ playgroup) ?>
:
Index: modules/tv/tmpl/default/recorded.php
===================================================================
--- modules/tv/tmpl/default/recorded.php (revision 10396)
+++ modules/tv/tmpl/default/recorded.php (working copy)
@@ -68,6 +68,14 @@
+'&chanid='+file.chanid+'&starttime='+file.starttime);
}
+ function set_playgroup(id) {
+ var file = files[id];
+ var sel = get_element('playgroup_' + file.chanid + '.' + file.starttime);
+ submit_url('tv/recorded?ajax&playgroup='+
+ sel.options[sel.selectedIndex].value+
+ '&chanid='+file.chanid+'&starttime='+file.starttime);
+ }
+
function confirm_delete(id, forget_old) {
var file = files[id];
if (confirm("\n\n "+file.title+": "+file.subtitle)) {
@@ -325,6 +333,9 @@
name="autoexpire_chanid, '.', $show->recstartts ?>"
auto_expire) echo ' CHECKED' ?> onchange="set_autoexpire()" />
+ :
+ playgroup, 'playgroup', "set_playgroup($row)", $show->chanid . '.' . $show->recstartts) ?>
+
:
bookmark ? t('Yes') : t('No') ?>
Index: modules/tv/recorded.php
===================================================================
--- modules/tv/recorded.php (revision 10396)
+++ modules/tv/recorded.php (working copy)
@@ -58,18 +58,27 @@
// Auto-expire
isset($_GET['autoexpire']) or $_GET['autoexpire'] = $_POST['autoexpire'];
- if (isset($_GET['autoexpire']) && $_GET['chanid'] && $_GET['starttime']) {
+ if (isset($_GET['autoexpire']) && $_GET['chanid'] && $_GET['starttime'])
$sh = $db->query('UPDATE recorded
SET autoexpire = ?
WHERE chanid = ? AND starttime = FROM_UNIXTIME(?)',
$_GET['autoexpire'] ? 1 : 0,
$_GET['chanid'],
$_GET['starttime']);
+// Playback group edit
+ isset($_GET['playgroup']) or $_GET['playgroup'] = $_POST['playgroup'];
+ if(isset($_GET['playgroup']) && $_GET['chanid'] && $_GET['starttime'])
+ $sh = $db->query('UPDATE recorded
+ SET playgroup = ?
+ WHERE chanid = ? AND starttime = FROM_UNIXTIME(?)',
+ $_GET['playgroup'],
+ $_GET['chanid'],
+ $_GET['starttime']);
+
// Exit early if we're in AJAX mode.
- if (isset($_GET['ajax'])) {
- echo 'success';
- exit;
- }
+ if (isset($_GET['ajax']) && isset($_GET['playgroup'])) {
+ echo 'success';
+ exit;
}
else {
/** @todo need some sort of handler here for the non-ajax stuff */