Ticket #1223: mythweb.channum.diff
File mythweb.channum.diff, 7.5 KB (added by , 18 years ago) |
---|
-
includes/programs.php
124 124 "½", "")) AS starstring, 125 125 IFNULL(programrating.system, "") AS rater, 126 126 IFNULL(programrating.rating, "") AS rating, 127 oldrecorded.recstatus 127 oldrecorded.recstatus,channel.channum 128 128 FROM program 129 129 LEFT JOIN programrating USING (chanid, starttime) 130 130 LEFT JOIN oldrecorded 131 ON LENGTH(IFNULL(oldrecorded.seriesid, "")) > 0 132 AND LENGTH(IFNULL(oldrecorded.programid, "")) > 0 133 AND oldrecorded.programid = program.programid 134 AND oldrecorded.seriesid = program.seriesid 131 ON oldrecorded.programid = program.programid 132 AND oldrecorded.seriesid = program.seriesid 133 AND (oldrecorded.recstatus = -3 134 OR ((LENGTH(IFNULL(oldrecorded.seriesid, "")) > 0 135 AND LENGTH(IFNULL(oldrecorded.programid, "")) > 0))) 136 LEFT JOIN channel ON program.chanid = channel.chanid 135 137 WHERE'; 136 138 // Only loading a single channel worth of information 137 139 if ($chanid > 0) … … 166 168 if (!$data['chanid']) 167 169 continue; 168 170 // This program has already been loaded, and is attached to a recording schedule 169 if ($Scheduled_Recordings[$data['chan id']][$data['starttime_unix']]) {170 $program =& $Scheduled_Recordings[$data['chan id']][$data['starttime_unix']][0];171 if ($Scheduled_Recordings[$data['channum']][$data['starttime_unix']]) { 172 $program =& $Scheduled_Recordings[$data['channum']][$data['starttime_unix']][0]; 171 173 } 172 174 // Otherwise, create a new instance of the program 173 175 else { … … 299 301 #$this->inputid = $data[19]; 300 302 $this->recpriority = $data[20]; 301 303 $this->recstatus = $data[21]; 302 $this->conflicting = ($this->recstatus == 'Conflict'); # conflicts with another scheduled recording?303 $this->recording = ($this->recstatus == 'WillRecord'); # scheduled to record?304 304 $this->recordid = $data[22]; 305 305 $this->rectype = $data[23]; 306 306 $this->dupin = $data[24]; … … 366 366 } 367 367 } 368 368 // Turn recstatus into a word 369 if (isset($this->recstatus) && $GLOBALS['RecStatus_Types'][$this->recstatus]) 369 if (isset($this->recstatus) && $GLOBALS['RecStatus_Types'][$this->recstatus]) { 370 370 $this->recstatus = $GLOBALS['RecStatus_Types'][$this->recstatus]; 371 $this->conflicting = ($this->recstatus == 'Conflict'); # conflicts with another scheduled recording? 372 $this->recording = ($this->recstatus == 'WillRecord'); # scheduled to record? 373 } 371 374 // No longer a null column, so check for blank entries 372 375 if ($this->airdate == '0000-00-00') 373 376 $this->airdate = NULL; -
includes/channels.php
32 32 $sql = 'SELECT * FROM channel WHERE'; 33 33 $sql .= ' channel.visible=1'; 34 34 // Group and sort 35 $sql .= ' GROUP BY channel.chan idORDER BY '35 $sql .= ' GROUP BY channel.channum ORDER BY ' 36 36 .(sortby_channum ? '' : 'channel.callsign, ') 37 37 .'(channel.channum + 0), channel.chanid'; 38 38 // Query -
includes/recording_schedules.php
77 77 if ($key === 'offset') { 78 78 list($Num_Conflicts, $Num_Scheduled) = $program; 79 79 } 80 // Normal entry: $Scheduled_Recordings[chan id][starttime][]80 // Normal entry: $Scheduled_Recordings[channum][starttime][] 81 81 else { 82 $Scheduled_Recordings[$program[ 4]][$program[11]][] =& new Program($program);82 $Scheduled_Recordings[$program[5]][$program[11]][] =& new Program($program); 83 83 } 84 84 } 85 85 -
modules/tv/upcoming.php
76 76 // Parse the list of scheduled recordings 77 77 global $Scheduled_Recordings; 78 78 $all_shows = array(); 79 foreach ($Scheduled_Recordings as $chan id=> $shows) {79 foreach ($Scheduled_Recordings as $channum => $shows) { 80 80 // Now the shows in this channel 81 81 foreach ($shows as $starttime => $show_group) { 82 // Skip things we've already recorded (or missed)83 if ($starttime <= time() && $show->recstatus != 'Recording')84 continue;85 82 // Parse each show group 86 83 foreach ($show_group as $key => $show) { 84 // Skip things we've already recorded (or missed) 85 if ($starttime <= time() && $show->recstatus != 'Recording') 86 continue; 87 87 // Make sure this is a valid show (ie. skip in-progress recordings and other junk) 88 if (!$chan id|| $show->length < 1)88 if (!$channum || $show->length < 1) 89 89 continue; 90 90 // Skip scheduled shows? 91 91 if (in_array($show->recstatus, array('WillRecord', 'ForceRecord'))) { … … 107 107 continue; 108 108 } 109 109 // Assign a reference to this show to the various arrays 110 $all_shows[] =& $Scheduled_Recordings[$chan id][$starttime][$key];110 $all_shows[] =& $Scheduled_Recordings[$channum][$starttime][$key]; 111 111 } 112 112 } 113 113 } -
modules/tv/detail.php
179 179 // Parse the list of scheduled recordings for possible conflicts 180 180 global $Scheduled_Recordings; 181 181 $conflicting_shows = array(); 182 foreach ($Scheduled_Recordings as $chan id=> $shows) {182 foreach ($Scheduled_Recordings as $channum => $shows) { 183 183 // Now the shows in this channel 184 184 foreach ($shows as $starttime => $show_group) { 185 185 // Clearly not a match … … 191 191 if ($show->chanid == $program->chanid && $show->starttime == $program->starttime) 192 192 continue; 193 193 // Make sure this is a valid show (ie. skip in-progress recordings and other junk) 194 if (!$chan id|| $show->length < 1)194 if (!$channum || $show->length < 1) 195 195 continue; 196 196 // Not a conflict 197 197 if ($show->endtime < $program->starttime) 198 198 continue; 199 199 // Assign a reference to this show to the various arrays 200 $conflicting_shows[] =& $Scheduled_Recordings[$chan id][$starttime][$key];200 $conflicting_shows[] =& $Scheduled_Recordings[$channum][$starttime][$key]; 201 201 } 202 202 } 203 203 }