All pastes #623717 Raw Edit

Mine

public text v1 · immutable
·published 2007-07-17 20:06 UTC
rendered paste body
Index: mythplugins/mythweb/modules/tv/canned_searches.conf.php
===================================================================
--- mythplugins/mythweb/modules/tv/canned_searches.conf.php	(revision 13968)
+++ mythplugins/mythweb/modules/tv/canned_searches.conf.php	(working copy)
@@ -44,10 +44,10 @@
  	    => 'category="children" AND category_type="movie"',
 
     t('Non-Series HDTV')
-        => 'hdtv=1 AND category_type != "series"',
+        => 'hdtv & 1 AND category_type != "series"',
 
     t('All HDTV')
-        => 'hdtv=1',
+        => 'hdtv & 1',
 
     t('Non-Music Specials')
         => 'showtype="special" AND program.category NOT LIKE "music%"',
Index: mythplugins/mythweb/modules/tv/search.php
===================================================================
--- mythplugins/mythweb/modules/tv/search.php	(revision 13968)
+++ mythplugins/mythweb/modules/tv/search.php	(working copy)
@@ -204,7 +204,7 @@
             }
         // HDTV only?
             if ($_SESSION['search']['hd'])
-                $extra_query[] = 'program.hdtv=1';
+                $extra_query[] = 'program.hdtv & 1';
         // Commercial-free channels only?
             if ($_SESSION['search']['commfree'])
                 $extra_query[] = 'channel.commfree=1';
@@ -269,7 +269,7 @@
             $search_str = $_SESSION['search']['s'];
         // If it starts with hd: it's an hd-only search
             if (preg_match('/^hd:\s*(.+)$/', $search_str, $match)) {
-                $extra_query[] = 'program.hdtv=1';
+                $extra_query[] = 'program.hdtv & 1';
                 $search_str    = $match[1];
             }
         // If the next thing starts with stars, it's a movie rating query
Index: mythplugins/mythweb/modules/tv/includes/objects/Program.php
===================================================================
--- mythplugins/mythweb/modules/tv/includes/objects/Program.php	(revision 13969)
+++ mythplugins/mythweb/modules/tv/includes/objects/Program.php	(working copy)
@@ -83,10 +83,7 @@
     var $has_cutlist    = 0;
     var $is_recording;
     var $is_playing;
-    var $stereo;
-    var $closecaptioned;
     var $can_delete     = false;
-    var $hdtv;
     var $inputname;
     var $is_editing     = 0;
     var $is_movie;
@@ -200,7 +197,6 @@
             $this->chanid                  = $data['chanid'];
             $this->description             = $data['description'];
             $this->endtime                 = $data['endtime_unix'];
-            $this->hdtv                    = $data['hdtv'];
             $this->previouslyshown         = $data['previouslyshown'];
             $this->programid               = $data['programid'];
             $this->rater                   = $data['rater'];
@@ -214,8 +210,6 @@
             $this->title                   = $data['title'];
             $this->partnumber              = $data['partnumber'];
             $this->parttotal               = $data['parttotal'];
-            $this->stereo                  = $data['stereo'];
-            $this->closecaptioned          = $data['closecaptioned'];
             $this->colorcode               = $data['colorcode'];
             $this->syndicatedepisodenumber = $data['syndicatedepisodenumber'];
             $this->title_pronounce         = $data['title_pronounce'];
@@ -303,18 +297,29 @@
     function update_fancy_desc() {
         // Get a nice description with the full details
         $details = array();
-        if ($this->hdtv == 1)
+
+        if ($this->videoproperties & 0x01)
             $details[] = t('HDTV');
+        if ($this->videoproperties & 0x02)
+            $details[] = t('Widescreen');
         if ($this->parttotal > 1 || $this->partnumber > 1)
             $details[] = t('Part $1 of $2', $this->partnumber, $this->parttotal);
         if ($this->rating)
             $details[] = $this->rating;
-        if ($this->subtitled)
+        if ($this->subtitletype & 0x01)
+            $details[] = t('CC');
+        if ($this->subtitletype & 0x02)
+            $details[] = t('Subtitles Available');
+        if ($this->subtitletype & 0x04)
             $details[] = t('Subtitled');
-        if ($this->closecaptioned == 1)
-            $details[] = t('CC');
-        if ($this->stereo == 1)
+        if ($this->audioproperties & 0x01)
             $details[] = t('Stereo');
+        if ($this->audioproperties & 0x02)
+            $details[] = t('Mono');
+        if ($this->audioproperties & 0x04)
+            $details[] = t('Surround');
+        if ($this->audioproperties & 0x08)
+            $details[] = t('Dolby');
         if ($this->previouslyshown)
             $details[] = t('Repeat');
 
Index: mythplugins/mythweb/modules/tv/tmpl/default/list_cell_program.php
===================================================================
--- mythplugins/mythweb/modules/tv/tmpl/default/list_cell_program.php	(revision 13969)
+++ mythplugins/mythweb/modules/tv/tmpl/default/list_cell_program.php	(working copy)
@@ -12,7 +12,7 @@
                   .($program->subtitle ? ':  '.str_replace(array("'", '"'),array("\\'", '"'), $program->subtitle)
                                           : '');
     // hdtv?
-        if ($program->hdtv == 1 && $percent > 5)
+        if (($program->videoproperties & 0x01) && $percent > 5)
             echo '<span class="hdtv_icon">HD</span>';
     // Start printing the link to record this show
         echo '<a';
Index: mythplugins/mythweb/modules/tv/tmpl/default/detail.php
===================================================================
--- mythplugins/mythweb/modules/tv/tmpl/default/detail.php	(revision 13969)
+++ mythplugins/mythweb/modules/tv/tmpl/default/detail.php	(working copy)
@@ -148,11 +148,11 @@
                 echo '<img src="', skin_url, '/img/flags/autoexpire.png" title="', t('Auto Expire'), '">';
             }
         // The rest of the flags are just for display
-            if ($program->closecaptioned == 1)
+            if ($program->subtitletype & 0x01)
                 echo '<img src="'.skin_url.'/img/flags/cc.png" title="'.t('Closed Captioning').'">';
-            if ($program->stereo == 1)
+            if ($program->audioproperties & 0x01)
                 echo '<img src="'.skin_url.'/img/flags/stereo.png" title="'.t('Stereo').'">';
-            if ($program->hdtv == 1)
+            if ($program->videoproperties & 0x01)
                 echo '<img src="'.skin_url.'/img/flags/hd.png" title="'.t('HD').'">';
             if ($program->has_commflag)
                 echo '<img src="'.skin_url.'/img/flags/commflagged.png" title="'.t('Commercials Flagged').'">';
Index: mythplugins/mythweb/modules/tv/tmpl/default/search.php
===================================================================
--- mythplugins/mythweb/modules/tv/tmpl/default/search.php	(revision 13969)
+++ mythplugins/mythweb/modules/tv/tmpl/default/search.php	(working copy)
@@ -155,7 +155,7 @@
     ?><tr class="<?php echo $show->css_class ?>" valign="top">
     <?php if (!empty($group_field)) echo "<td class=\"list\">&nbsp;</td>\n" ?>
     <td class="-title <?php echo $show->css_class ?>"><?php
-        if ($show->hdtv == 1)
+        if ($show->videoproperties & 0x01)
             echo '<span class="hdtv_icon">HD</span>';
         echo '<a href="', root, 'tv/detail/', $show->chanid, '/', $show->starttime, '">',
              $show->title, '</a>';
Index: mythplugins/mythweb/modules/tv/tmpl/default/channel.php
===================================================================
--- mythplugins/mythweb/modules/tv/tmpl/default/channel.php	(revision 13969)
+++ mythplugins/mythweb/modules/tv/tmpl/default/channel.php	(working copy)
@@ -88,7 +88,7 @@
     ?><tr class="<?php echo $show->css_class ?>">
     <td nowrap align="center"><a href="<?php echo root ?>tv/list?time=<?php echo $show->starttime ?>"><?php echo strftime($_SESSION['time_format'], $show->starttime) ?> - <?php echo strftime($_SESSION['time_format'], $show->endtime) ?></a></td>
     <td class="<?php echo $show->css_class ?>"><?php
-        if ($show->hdtv == 1)
+        if ($show->videoproperties & 0x01)
                echo '<span class="hdtv_icon">HD</span>';
         echo '<a href="'.root.'tv/detail/'.$show->chanid.'/'.$show->starttime.'">'
              .$show->title.$additional.'</a>';
Index: mythplugins/mythweb/modules/tv/tmpl/default/recorded.php
===================================================================
--- mythplugins/mythweb/modules/tv/tmpl/default/recorded.php	(revision 13969)
+++ mythplugins/mythweb/modules/tv/tmpl/default/recorded.php	(working copy)
@@ -355,11 +355,11 @@
                 echo 'no_autoexpire.png" title="', t('Click to enable Auto Expire'), '"';
             echo '></a>';
         // The rest of the flags are just for display
-            if ($show->closecaptioned == 1)
+            if ($show->subtitletype & 0x01)
                 echo '<img src="'.skin_url.'/img/flags/cc.png" title="'.t('Closed Captioning').'">';
-            if ($show->stereo == 1)
+            if ($show->audioproperties & 0x01)
                 echo '<img src="'.skin_url.'/img/flags/stereo.png" title="'.t('Stereo').'">';
-            if ($show->hdtv == 1)
+            if ($show->videoproperties & 0x01)
                 echo '<img src="'.skin_url.'/img/flags/hd.png" title="'.t('HD').'">';
             if ($show->has_commflag)
                 echo '<img src="'.skin_url.'/img/flags/commflagged.png" title="'.t('Commercials Flagged').'">';
Index: mythplugins/mythweb/modules/tv/tmpl/lite/list_cell_program.php
===================================================================
--- mythplugins/mythweb/modules/tv/tmpl/lite/list_cell_program.php	(revision 13969)
+++ mythplugins/mythweb/modules/tv/tmpl/lite/list_cell_program.php	(working copy)
@@ -9,7 +9,7 @@
                   .($program->subtitle ? ':  '.str_replace(array("'", '"'),array("\\'", '&quot;'), $program->subtitle)
                                           : '');
     // hdtv?
-        if ($program->hdtv == 1 && $percent > 5)
+        if (($program->videoproperties & 0x01) && $percent > 5)
             echo '<span class="hdtv_icon">HD</span>';
     // Start printing the link to record this show
         echo '<a href="'.root.'tv/detail/'.$program->chanid.'/'.$program->starttime.'">';
Index: mythplugins/mythweb/modules/tv/tmpl/lite/search.php
===================================================================
--- mythplugins/mythweb/modules/tv/tmpl/lite/search.php	(revision 13969)
+++ mythplugins/mythweb/modules/tv/tmpl/lite/search.php	(working copy)
@@ -90,7 +90,7 @@
     ?><tr class="<?php echo $show->css_class ?>" valign="top">
     <?php if (!empty($group_field)) echo "<td class=\"list\">&nbsp;</td>\n" ?>
     <td class="<?php echo $show->css_class ?>"><?php
-        if ($show->hdtv == 1)
+        if ($show->videoproperties & 0x01)
             echo '<span class="hdtv_icon">HD</span>';
         echo '<a href="', root, 'tv/detail/', $show->chanid, '/', $show->starttime, '">',
              $show->title, '</a>';
Index: mythplugins/mythweb/modules/tv/tmpl/lite/channel.php
===================================================================
--- mythplugins/mythweb/modules/tv/tmpl/lite/channel.php	(revision 13969)
+++ mythplugins/mythweb/modules/tv/tmpl/lite/channel.php	(working copy)
@@ -85,7 +85,7 @@
     ?><tr class="<?php echo $show->css_class ?>">
     <td nowrap align="center"><a href="<?php echo root ?>tv/list?time=<?php echo $show->starttime ?>"><?php echo strftime($_SESSION['time_format'], $show->starttime) ?> - <?php echo strftime($_SESSION['time_format'], $show->endtime) ?></a></td>
     <td class="<?php echo $show->css_class ?>"><?php
-        if ($show->hdtv == 1)
+        if ($show->videoproperties & 0x01)
                echo '<span class="hdtv_icon">HD</span>';
         echo '<a href="'.root.'tv/detail/'.$show->chanid.'/'.$show->starttime.'">'
              .$show->title.$additional.'</a>';
Index: mythplugins/mythweb/modules/tv/tmpl/lite/recorded.php
===================================================================
--- mythplugins/mythweb/modules/tv/tmpl/lite/recorded.php	(revision 13969)
+++ mythplugins/mythweb/modules/tv/tmpl/lite/recorded.php	(working copy)
@@ -183,11 +183,11 @@
             if ($show->auto_expire)
                 echo '<img src="', skin_url, '/img/flags/autoexpire.png" title="', t('Auto Expire'), '">';
         // The rest of the flags are just for display
-            if ($show->closecaptioned == 1)
+            if ($show->subtitletype & 0x01)
                 echo '<img src="'.skin_url.'/img/flags/cc.png" title="'.t('Closed Captioning').'">';
-            if ($show->stereo == 1)
+            if ($show->audioproperties & 0x01)
                 echo '<img src="'.skin_url.'/img/flags/stereo.png" title="'.t('Stereo').'">';
-            if ($show->hdtv == 1)
+            if ($show->videoproperties & 0x01)
                 echo '<img src="'.skin_url.'/img/flags/hd.png" title="'.t('HD').'">';
             if ($show->has_commflag)
                 echo '<img src="'.skin_url.'/img/flags/commflagged.png" title="'.t('Commercials Flagged').'">';