Skip to content

Commit

Permalink
fixed torrent ext, but still not doing what we want
Browse files Browse the repository at this point in the history
  • Loading branch information
raspbeguy committed May 24, 2016
1 parent 2b597a6 commit 6076574
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,5 @@ feedgen/tests/tmp_Rssfeed.xml
tmp_Atomfeed.xml

tmp_Rssfeed.xml

build/**
4 changes: 2 additions & 2 deletions feedgen/ext/torrent.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ def extend_rss(self, entry):
'''
enclosure = etree.SubElement(entry, '{%s}enclosure' % TORRENT_NS)
guid = etree.SubElement(entry, '{%s}guid' % TORRENT_NS)
torrent = etree.SubElement(entry, '{%s]torrent' % TORRENT_NS)
torrent = etree.SubElement(entry, '{%s}torrent' % TORRENT_NS)

enclosure.attrib['type'] = 'application/x-bittorrent'

Expand All @@ -66,7 +66,7 @@ def extend_rss(self, entry):
if self.__torrent_hash:
torrent_hash = etree.SubElement(torrent, '{%s}infohash' % TORRENT_NS)
torrent_hash.text = self.__torrent_hash
torrent.magnet = etree.SubElement(torrent, '{%s}magneturi' % TORRENT_NS)
torrent_magnet = etree.SubElement(torrent, '{%s}magneturi' % TORRENT_NS)
torrent_magnet.text = 'magnet:?xt=urn:btih:' + self.__torrent_hash


Expand Down

0 comments on commit 6076574

Please sign in to comment.