Skip to content

Commit 367a56e

Browse files
committed
#116 Avoid if get_title returns true class
1 parent f37d4ba commit 367a56e

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

plugins/filter/description_link.rb

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# Name:: Automatic::Plugin::Filter::DescriptionLink
33
# Author:: 774 <http://id774.net>
44
# Created:: Oct 03, 2014
5-
# Updated:: Oct 14, 2014
5+
# Updated:: Oct 15, 2014
66
# Copyright:: Copyright (c) 2014 Automatic Ruby Developers.
77
# License:: Licensed under the GNU GENERAL PUBLIC LICENSE, Version 3.0.
88

@@ -57,7 +57,11 @@ def rewrite_link(feed)
5757
if @config['get_title'] == 1
5858
begin
5959
new_title = get_title(feed.link)
60-
feed.title = new_title unless new_title.nil?
60+
unless new_title.nil?
61+
if new_title.class == String
62+
feed.title = new_title
63+
end
64+
end
6165
rescue OpenURI::HTTPError
6266
Automatic::Log.puts("warn", "404 Not Found in get title process.")
6367
end

0 commit comments

Comments
 (0)