diff options
author | Christian Pointner <equinox@helsinki.at> | 2012-07-02 15:07:01 (GMT) |
---|---|---|
committer | Christian Pointner <equinox@helsinki.at> | 2012-07-02 15:07:01 (GMT) |
commit | ca5e42a1baf6f16f2897db4101ca42ece2136457 (patch) | |
tree | 6e555fbe7410f85ceaf26beb81debe7a08f3480e | |
parent | 204ed178c3be1da1d572b1af4825ee115a9e5c6b (diff) |
wienerlieder uses old rss feed again?
-rw-r--r-- | debian/changelog | 6 | ||||
-rwxr-xr-x | rhimport-wl | 14 |
2 files changed, 13 insertions, 7 deletions
diff --git a/debian/changelog b/debian/changelog index c4be9a1..badeb3b 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +rhimport (0.3.8-10) unstable; urgency=low + + * wienerlieder back to old rss-feed??? + + -- Christian Pointner <equinox@helsinki.at> Sun, 02 Jul 2012 17:06:37 +0200 + rhimport (0.3.8-9) unstable; urgency=low * democracy now can be imported earlier diff --git a/rhimport-wl b/rhimport-wl index 91dd4ff..8769e81 100755 --- a/rhimport-wl +++ b/rhimport-wl @@ -41,7 +41,7 @@ my $DBPW = "lldriven"; my $DB = "rivendell"; my $STAT_FILE = $ENV{'HOME'} . "/rhimport-wl.stat"; -my $RSS_URL = "http://www.radiowienerlied.com/rss/feed.xml"; +my $RSS_URL = "http://www.radiowienerlied.at/rss/podcast.xml"; my $PV_ID = '82'; binmode(STDIN, ":utf8"); @@ -71,16 +71,16 @@ my $t; my $tfile; if(Date::Calc::Day_of_Week(@today) == 7) { - @import_date = Date::Calc::Add_Delta_Days($today[0], $today[1], $today[2], 0); + @import_date = Date::Calc::Add_Delta_Days($today[0], $today[1], $today[2], 1); $t = sprintf("%04d-%02d-%02d", $today[0], $today[1], $today[2]); - $tfile = sprintf("[0-9-]+_%04d%02d%02d(-[0-9]+)?.mp3", $today[0], $today[1], $today[2]); - print "looking for files from today in RSS Feed ($tfile)\n"; + $tfile = sprintf("%04d%02d%02d.mp3", $today[0], $today[1], $today[2]); + print "looking for files from today in RSS Feed\n"; } elsif(Date::Calc::Day_of_Week(@today) == 1) { my @yesterday = Date::Calc::Add_Delta_Days($today[0], $today[1], $today[2], -1); @import_date = @today; $t = sprintf("%04d-%02d-%02d", $yesterday[0], $yesterday[1], $yesterday[2]); - $tfile = sprintf("[0-9-]+_%04d%02d%02d(-[0-9]+)?.mp3", $yesterday[0], $yesterday[1], $yesterday[2]); - print "looking for files from yesterday in RSS Feed ($tfile)\n"; + $tfile = sprintf("%04d%02d%02d.mp3", $yesterday[0], $yesterday[1], $yesterday[2]); + print "looking for files from yesterday in RSS Feed\n"; } else { print "it's neither Sunday nor Monday, please check cron script"; exit 1; @@ -95,7 +95,7 @@ my $out_file = ""; for my $entry ($feed->entries) { if($entry->enclosure && $entry->enclosure->type eq "audio/mpeg") { my $ff = File::Fetch->new(uri => $entry->enclosure->url); - next if($ff->output_file !~ $tfile); # file not from today/yesterday + next if($ff->output_file ne $tfile); # file not from today/yesterday my $sum_title = $entry->title; my $sum_text = $entry->content->body; |