--- a/tv_grab_zz_sdjson_sqlite 2017-08-17 23:39:21.319147939 -0700 +++ b/tv_grab_zz_sdjson_sqlite 2017-08-19 22:18:27.781095306 -0700 @@ -1775,7 +1775,13 @@ # XMLTV uses their standardized dates, while Schedules # Direct uses YYYY-MM-DD - if (defined($programDetails->{'originalAirDate'})) + # If "new", then do not generate previously-shown + if (defined($scheduleDetails->{'new'})) + { + my $new = $scheduleDetails->{'new'}; + $w->emptyTag('new'); + } + elsif (defined($programDetails->{'originalAirDate'})) { my $originalAirDate = $programDetails->{'originalAirDate'}; my $offset = ' +0000'; @@ -1791,12 +1797,6 @@ my $start = substr($originalAirDate, 0, 4) . substr($originalAirDate, 5, 2) . substr($originalAirDate, 8, 2) . $offset; $w->emptyTag('previously-shown', start => $start); } - else - { - my $new = 0; - $new = $scheduleDetails->{'new'} if (defined($scheduleDetails->{'new'})); - $w->emptyTag('previously-shown') if (!$new); - } # XMLTV premiere/last-chance is sort of arbitrarily # defined, so we decide on our own mapping (while