Ticket #12276: mythweb_schedules_any_fix.patch

File mythweb_schedules_any_fix.patch, 3.2 KB (added by Karl Newman <SiliconFiend@…>, 5 years ago)

Schedules "Any Channel" fix

  • tv/schedules.php

    diff -Naur -x episode modules.orig/tv/schedules.php modules/tv/schedules.php
    old new  
    3636            $schedule->profile  = '';
    3737            $schedule->recgroup = '';
    3838        }
    39     // Add a blank channel, to suppress warnings
    40         if (!$schedule->channel) {
    41             $schedule->channel = Channel::find(null);
     39    // Add a blank channel, to suppress warnings, or for "Any" channel schedules without "This Channel" filter
     40        if (!$schedule->channel || ($schedule->type == rectype_daily || $schedule->type == rectype_always || $schedule->type == rectype_weekly || $schedule->type == rectype_findone) && !($schedule->filter & (1 << 10))) {
     41            $schedule->channel =& Channel::find(null);
    4242        }
    4343    // Add this show
    4444        $the_schedules[] = &$schedule;
  • tv/tmpl/default/schedules.php

    diff -Naur -x episode modules.orig/tv/tmpl/default/schedules.php modules/tv/tmpl/default/schedules.php
    old new  
    9595            $urlstr = 'recordid='.$schedule->recordid;
    9696
    9797            $css_class = ($schedule->type == rectype_dontrec ? 'deactivated' : 'scheduled');
    98         // If this is an 'always on any channel' or 'find one' recording without the 'This Channel' filter, set the channel name to 'Any'
    99             if (($schedule->type == rectype_always || $schedule->type == rectype_findone) && !($schedule->filter & (1 << 10))) {
     98        // If this is a 'daily' or 'always on any channel' or 'weekly' or 'find one' recording without the 'This Channel' filter, set the channel name to 'Any'
     99            if (($schedule->type == rectype_daily || $schedule->type == rectype_always || $schedule->type == rectype_weekly || $schedule->type == rectype_findone) && !($schedule->filter & (1 << 10))) {
    100100                $schedule->channel->name = '[ '.t('Any').' ]';
    101101                $schedule->channel->channum = 0;
    102102            }
  • tv/tmpl/lite/schedules.php

    diff -Naur -x episode modules.orig/tv/tmpl/lite/schedules.php modules/tv/tmpl/lite/schedules.php
    old new  
    5353            $urlstr = 'recordid='.$schedule->recordid;
    5454
    5555            $css_class = ($schedule->type == rectype_dontrec ? 'deactivated' : 'scheduled');
    56         // If this is an 'always on any channel' or 'find one' recording without the 'This Channel' filter, set the channel name to 'Any'
    57             if (($schedule->type == rectype_always || $schedule->type == rectype_findone) && !($schedule->filter & (1 << 10))) {
     56        // If this is a 'daily', 'always on any channel', 'weekly' or 'find one' recording without the 'This Channel' filter, set the channel name to 'Any'
     57            if (($schedule->type == rectype_daily || $schedule->type == rectype_always || $schedule->type == rectype_weekly || $schedule->type == rectype_findone) && !($schedule->filter & (1 << 10))) {
    5858                $schedule->channel->name = '[ '.t('Any').' ]';
    5959                $schedule->channel->channum = 0;
    6060            }