Ticket #3357: search-tkey.diff

File search-tkey.diff, 1.3 KB (added by Wolfgang <mythtv@…>, 17 years ago)
  • mythweb/modules/tv/search.php

     
    321321// Build a list of titles for figuring out alternate showings.  Use the same
    322322// key to make parsing things below a little easier.
    323323    $titles = array();
     324    $seen = array();
    324325    foreach ($Results as $key => $show) {
    325         $titles[$show->title.': '.$show->subtitle][$key] =& $Results[$key];
     326        $tkey = md5($show->title.': '.$show->subtitle.': '.$show->description);
     327        $skey = $show->channel->name.$show->starttime.$tkey;
     328        if($seen[$skey]){
     329            unset($Results[$key]);
     330            continue;
     331        }else{
     332            $titles[$tkey][$key] =& $Results[$key];
     333            $seen[$skey] = true;
     334        }
    326335    }
    327336
    328337// Parse the show list for showings that can be consolidated/folded
    329338    $seen = array();
    330339    foreach ($Results as $key => $show) {
    331         $tkey = $show->title.': '.$show->subtitle;
     340        $tkey = md5($show->title.': '.$show->subtitle.': '.$show->description);
    332341    // Populate extra_showings info for other instances of this show
    333342        if (count($titles[$tkey]) > 1) {
    334343            foreach (array_keys($titles[$tkey]) as $key2) {