From f993650f81153cfd53c1cedcb8a2d16d9edb056c Mon Sep 17 00:00:00 2001 From: j <0x006A@0x2620.org> Date: Tue, 19 Feb 2013 20:19:30 +0530 Subject: [PATCH] never serve torrents with https webseeds, some clients like uTorrent only support http, fixes #1272 --- pandora/item/models.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pandora/item/models.py b/pandora/item/models.py index a8d1fcd2c..01c65209a 100644 --- a/pandora/item/models.py +++ b/pandora/item/models.py @@ -997,6 +997,8 @@ class Item(models.Model): self.torrent.seek(0) data = ox.torrent.bdecode(self.torrent.read()) url = request.build_absolute_uri("%s/torrent/"%self.get_absolute_url()) + if url.startswith('https://'): + url = 'http' + url[5:] data['url-list'] = ['%s%s' % (url, u.split('torrent/')[1]) for u in data['url-list']] return ox.torrent.bencode(data)