fixed torrent ext, but still not doing what we want
This commit is contained in:
parent
2b597a6dee
commit
6076574150
2 changed files with 4 additions and 2 deletions
2
.gitignore
vendored
2
.gitignore
vendored
|
@ -10,3 +10,5 @@ feedgen/tests/tmp_Rssfeed.xml
|
||||||
tmp_Atomfeed.xml
|
tmp_Atomfeed.xml
|
||||||
|
|
||||||
tmp_Rssfeed.xml
|
tmp_Rssfeed.xml
|
||||||
|
|
||||||
|
build/**
|
||||||
|
|
|
@ -44,7 +44,7 @@ class TorrentEntryExtension(BaseEntryExtension):
|
||||||
'''
|
'''
|
||||||
enclosure = etree.SubElement(entry, '{%s}enclosure' % TORRENT_NS)
|
enclosure = etree.SubElement(entry, '{%s}enclosure' % TORRENT_NS)
|
||||||
guid = etree.SubElement(entry, '{%s}guid' % 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'
|
enclosure.attrib['type'] = 'application/x-bittorrent'
|
||||||
|
|
||||||
|
@ -66,7 +66,7 @@ class TorrentEntryExtension(BaseEntryExtension):
|
||||||
if self.__torrent_hash:
|
if self.__torrent_hash:
|
||||||
torrent_hash = etree.SubElement(torrent, '{%s}infohash' % TORRENT_NS)
|
torrent_hash = etree.SubElement(torrent, '{%s}infohash' % TORRENT_NS)
|
||||||
torrent_hash.text = self.__torrent_hash
|
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
|
torrent_magnet.text = 'magnet:?xt=urn:btih:' + self.__torrent_hash
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue