Skip to content

Commit

Permalink
Add mimetype in parsed links
Browse files Browse the repository at this point in the history
  • Loading branch information
zetaben committed Sep 18, 2010
1 parent 7103bb1 commit db41cfe
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lib/opds/feed.rb
Original file line number Diff line number Diff line change
Expand Up @@ -80,13 +80,14 @@ def links
raw_doc.xpath('/xmlns:feed/xmlns:link',raw_doc.root.namespaces).each do |n|
text=nil
text=n.attributes['title'].value unless n.attributes['title'].nil?
type=n.attributes['type'].value unless n.attributes['type'].nil?
link=n.attributes['href'].value
unless n.attributes['rel'].nil?
n.attributes['rel'].value.split.each do |rel|
@links.push(rel,link,text)
@links.push(rel,link,text,type)
end
else
@links.push(nil,link,text)
@links.push(nil,link,text,type)
end
end

Expand Down

0 comments on commit db41cfe

Please sign in to comment.