Ticket #1875: mythweb_decode_progflags.2.patch

File mythweb_decode_progflags.2.patch, 3.5 KB (added by david.asher@…, 18 years ago)

decode progflags and copy data from DB for scheduled programs

  • includes/programs.php

     
    184184        // This program has already been loaded, and is attached to a recording schedule
    185185            if ($Scheduled_Recordings[$data['channum']][$data['starttime_unix']]) {
    186186                $program =& $Scheduled_Recordings[$data['channum']][$data['starttime_unix']][0];
     187
     188                // set the class members which don't get sent from the backend
     189                $program->rater                   = $data['rater'];
     190                $program->rating                  = $data['rating'];
     191                $program->category_type           = _or($data['category_type'],   t('Unknown'));
     192                $program->showtype                = $data['showtype'];
     193                $program->starstring              = $data['starstring'];
     194                $program->stars                   = $data['stars'];
     195                $program->subtitled               = $data['subtitled'];
     196                $program->partnumber              = $data['partnumber'];
     197                $program->parttotal               = $data['parttotal'];
     198                $program->colorcode               = $data['colorcode'];
     199                $program->syndicatedepisodenumber = $data['syndicatedepisodenumber'];
     200                $program->title_pronounce         = $data['title_pronounce'];
    187201            }
    188202        // Otherwise, create a new instance of the program
    189203            else {
     
    343357                $this->thumb_url = root.cache_dir.'/'.str_replace('%2F', '/', rawurlencode(basename($this->filename)));
    344358            }
    345359        // 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
     360            $this->has_commflag   = ($progflags & 0x001) ? true : false;    // FL_COMMFLAG       = 0x001
     361            $this->has_cutlist    = ($progflags & 0x002) ? true : false;    // FL_CUTLIST        = 0x002
     362            $this->auto_expire    = ($progflags & 0x004) ? true : false;    // FL_AUTOEXP        = 0x004
     363            $this->is_editing     = ($progflags & 0x008) ? true : false;    // FL_EDITING        = 0x008
     364            $this->bookmark       = ($progflags & 0x010) ? true : false;    // FL_BOOKMARK       = 0x010
     365                                                                            // FL_INUSERECORDING = 0x020
     366                                                                            // FL_INUSEPLAYING   = 0x040
     367            $this->stereo         = ($progflags & 0x080) ? true : false;    // FL_STEREO         = 0x080
     368            $this->closecaptioned = ($progflags & 0x100) ? true : false;    // FL_CC             = 0x100
     369            $this->hdtv           = ($progflags & 0x200) ? true : false;    // FL_HDTV           = 0x200
     370                                                                            // FL_TRANSCODED     = 0x400
    351371        // Add a generic "will record" variable, too
    352372            $this->will_record = ($this->rectype && $this->rectype != rectype_dontrec) ? true : false;
    353373        }