Ticket #848: mythweb.oldrecorded.2.diff
File mythweb.oldrecorded.2.diff, 5.2 KB (added by , 18 years ago) |
---|
-
mythweb/config/conf.php
92 92 define('star_character', '♦'); // the character(s) to represent stars with 93 93 94 94 /* 95 96 The following constants are defined for TV listings 95 97 98 */ 99 100 // Enable to also mark TV listings in the "oldrecorded" table. Provides more information, 101 // but may slow down mythweb if "oldrecorded" is very large. 102 define('tv_listings_mark_old_duplicate', false); 103 104 /* 105 96 106 The following constants are defined for the recorded programs page 97 107 98 108 */ -
mythweb/includes/programs.php
115 115 trigger_error("load_all_program_data() attempted with an empty \$Channels array", FATAL); 116 116 $these_channels = implode(',', $these_channels); 117 117 // Build the sql query, and execute it 118 $query = 'SELECT program.*,' 119 .' UNIX_TIMESTAMP(program.starttime) AS starttime_unix,' 120 .' UNIX_TIMESTAMP(program.endtime) AS endtime_unix,' 121 .' CONCAT(repeat('.escape(star_character).', program.stars * '.escape(max_stars).'), IF((program.stars * '.escape(max_stars).' * 10) % 10, "½", "")) AS starstring,' 122 .' IFNULL(programrating.system, "") AS rater,' 123 .' IFNULL(programrating.rating, "") AS rating' 124 .' FROM program LEFT JOIN programrating USING (chanid, starttime)' 125 .' WHERE'; 118 $query = 'SELECT program.*' 119 .',UNIX_TIMESTAMP(program.starttime) AS starttime_unix' 120 .',UNIX_TIMESTAMP(program.endtime) AS endtime_unix' 121 .',CONCAT(repeat('.escape(star_character) 122 .', program.stars * '.escape(max_stars) 123 .'), IF((program.stars * '.escape(max_stars) 124 .' * 10) % 10, "½", "")) AS starstring' 125 .',IFNULL(programrating.system, "") AS rater' 126 .',IFNULL(programrating.rating, "") AS rating'; 127 if (tv_listings_mark_old_duplicate) { 128 $query .= ',oldrecorded.recstatus' 129 . ' FROM (program' 130 . ' LEFT JOIN oldrecorded' 131 . ' USING (seriesid, programid))'; 132 } else { 133 $query .= ' FROM program'; 134 } 135 $query .= ' LEFT JOIN programrating' 136 . ' USING (chanid, starttime)' 137 . ' WHERE'; 126 138 // Only loading a single channel worth of information 127 139 if ($chanid > 0) 128 140 $query .= ' program.chanid='.escape($chanid); … … 314 326 $this->auto_expire = ($progflags & 0x04) ? true : false; // FL_AUTOEXP = 0x04 315 327 $this->is_editing = ($progflags & 0x08) ? true : false; // FL_EDITING = 0x08 316 328 $this->bookmark = ($progflags & 0x10) ? true : false; // FL_BOOKMARK = 0x10 317 // Turn recstatus into a word318 if (isset($this->recstatus) && $GLOBALS['RecStatus_Types'][$this->recstatus])319 $this->recstatus = $GLOBALS['RecStatus_Types'][$this->recstatus];320 329 // Add a generic "will record" variable, too 321 330 $this->will_record = ($this->rectype && $this->rectype != rectype_dontrec) ? true : false; 322 331 } … … 348 357 $this->colorcode = $data['colorcode']; 349 358 $this->syndicatedepisodenumber = $data['syndicatedepisodenumber']; 350 359 $this->title_pronounce = $data['title_pronounce']; 360 $this->recstatus = $data['recstatus']; 351 361 352 362 if ($program_data['tsdefault']) { 353 363 $this->timestretch = $program_data['tsdefault']; … … 355 365 $this->timestretch = 1.0; 356 366 } 357 367 } 368 369 // Turn recstatus into a word 370 if (isset($this->recstatus) && $GLOBALS['RecStatus_Types'][$this->recstatus]) 371 $this->recstatus = $GLOBALS['RecStatus_Types'][$this->recstatus]; 372 358 373 // No longer a null column, so check for blank entries 359 374 if ($this->airdate == '0000-00-00') 360 375 $this->airdate = NULL; -
mythweb/includes/css.php
47 47 status. 48 48 */ 49 49 function recstatus_class(&$item) { 50 if ($item->rec ordid&& !strcasecmp(get_class($item), 'program')) {50 if ($item->recstatus && !strcasecmp(get_class($item), 'program')) { 51 51 switch ($item->recstatus) { 52 52 case 'ForceRecord': 53 53 return 'record_override_record'; … … 59 59 case 'PreviousRecording': 60 60 case 'CurrentRecording': 61 61 return 'record_duplicate'; 62 case 'Recorded': 63 return 'record_old_duplicate'; 62 64 case 'ManualOverride': 63 65 case 'Cancelled': 64 66 return 'record_override_suppress';