Ticket #1875: mythweb_decode_progflags.3.patch
| File mythweb_decode_progflags.3.patch, 3.5 KB (added by , 20 years ago) |
|---|
-
includes/programs.php
184 184 // This program has already been loaded, and is attached to a recording schedule 185 185 if ($Scheduled_Recordings[$data['channum']][$data['starttime_unix']]) { 186 186 $program =& $Scheduled_Recordings[$data['channum']][$data['starttime_unix']][0]; 187 188 // merge in data fetched from DB 189 $program->merge(new Program($data)); 187 190 } 188 191 // Otherwise, create a new instance of the program 189 192 else { … … 343 346 $this->thumb_url = root.cache_dir.'/'.str_replace('%2F', '/', rawurlencode(basename($this->filename))); 344 347 } 345 348 // Assign the program flags 346 $this->has_commflag = ($progflags & 0x01) ? true : false; // FL_COMMFLAG = 0x01 347 $this->has_cutlist = ($progflags & 0x02) ? true : false; // FL_CUTLIST = 0x02 348 $this->auto_expire = ($progflags & 0x04) ? true : false; // FL_AUTOEXP = 0x04 349 $this->is_editing = ($progflags & 0x08) ? true : false; // FL_EDITING = 0x08 350 $this->bookmark = ($progflags & 0x10) ? true : false; // FL_BOOKMARK = 0x10 349 $this->has_commflag = ($progflags & 0x001) ? true : false; // FL_COMMFLAG = 0x001 350 $this->has_cutlist = ($progflags & 0x002) ? true : false; // FL_CUTLIST = 0x002 351 $this->auto_expire = ($progflags & 0x004) ? true : false; // FL_AUTOEXP = 0x004 352 $this->is_editing = ($progflags & 0x008) ? true : false; // FL_EDITING = 0x008 353 $this->bookmark = ($progflags & 0x010) ? true : false; // FL_BOOKMARK = 0x010 354 // FL_INUSERECORDING = 0x020 355 // FL_INUSEPLAYING = 0x040 356 $this->stereo = ($progflags & 0x080) ? true : false; // FL_STEREO = 0x080 357 $this->closecaptioned = ($progflags & 0x100) ? true : false; // FL_CC = 0x100 358 $this->hdtv = ($progflags & 0x200) ? true : false; // FL_HDTV = 0x200 359 // FL_TRANSCODED = 0x400 351 360 // Add a generic "will record" variable, too 352 361 $this->will_record = ($this->rectype && $this->rectype != rectype_dontrec) ? true : false; 353 362 } … … 427 436 if ($this->chanid != '') 428 437 $this->class = category_class($this); 429 438 430 // Get a nice description with the full details 439 $this->update_fancy_desc(); 440 } 441 442 function merge($prog) { 443 foreach (get_object_vars($prog) as $name => $value) { 444 if ($value && !$this->$name) { 445 $this->$name = $value; 446 } 447 } 448 449 // update fancy description in case a part of it changed 450 $this->update_fancy_desc(); 451 } 452 453 function update_fancy_desc() { 454 // Get a nice description with the full details 431 455 $details = array(); 432 456 if ($this->hdtv) 433 457 $details[] = t('HDTV'); … … 447 471 $this->fancy_description = $this->description; 448 472 if (count($details) > 0) 449 473 $this->fancy_description .= ' ('.implode(', ', $details).')'; 450 451 474 } 452 475 453 476 /**
