diff options
-rw-r--r-- | INFO | 2 | ||||
-rwxr-xr-x | rhautoimport-gd | 7 |
2 files changed, 7 insertions, 2 deletions
@@ -24,7 +24,7 @@ Original: wöchentlich Dienstags, 13:00 Upload: manchmal einen tag davor, oft bis zu 3 Tage danach - Such-Kriterium: cba:productionDate + Such-Kriterium: cba:broadcastDate wenn gesetzt sonst cba:productionDate RH: wöchentlich, Montag, 13:30-14:30 wöchentlich, Donnerstag, 08:00-09:00, Wiederholung diff --git a/rhautoimport-gd b/rhautoimport-gd index 99dc63b..698e8e3 100755 --- a/rhautoimport-gd +++ b/rhautoimport-gd @@ -117,8 +117,13 @@ for my $entry ($feed->entries) { next unless $entry->enclosure; my $entry_bdt = $entry->{'entry'}{'https://cba.fro.at/help#feeds'}{'broadcastDate'}; + my $format_string = "%a, %d %b %Y %H:%M:%S"; + unless (defined $entry_bdt) { + $entry_bdt = $entry->{'entry'}{'https://cba.fro.at/help#feeds'}{'productionDate'}; + $format_string = "%a, %d %b %Y"; + } next unless (defined $entry_bdt); - my $bdt = DateTime::Format::Strptime::strptime("%a, %d %b %Y", $entry_bdt); + my $bdt = DateTime::Format::Strptime::strptime($format_string, $entry_bdt); next unless($broadcast_date[0] == $bdt->year && $broadcast_date[1] == $bdt->month && $broadcast_date[2] == $bdt->day); |