]> git.99rst.org Git - irssi-scripts.irssi.org.git/commitdiff
(irssi-feed) Fix empty titlelines.
authorCaesar <redacted>
Fri, 23 May 2014 16:12:13 +0000 (18:12 +0200)
committerbw1 <redacted>
Sat, 14 Apr 2018 17:28:23 +0000 (19:28 +0200)
In actuality, I could just ignore items without a title. The only feed
doing that i've come across so far is the sueddeutsche, and the links
posted without a title do 404.

scripts/irssi-feed.pl

index 632534b6a9e31b4ccd9551a616ed6ab6465e5462..92858c92a85cef4530c54d5c397a622016628922 100644 (file)
@@ -392,6 +392,9 @@ sub feed_get_news {
 sub feed_announce_item {
        my ($feed, $news) = @_;
        my $titleline = $news->title;
+       if(not defined $titleline) {
+               $titleline = "[no title]"
+       }
        $titleline =~ s/\s*\n\s*/ | /g;
 
        my $channel = $feed->{channel};
git clone https://git.99rst.org/PROJECT