styxit / HTPC-Manager

A fully responsive interface to manage all your favorite software on your Htpc.
http://htpc.io
MIT License
530 stars 183 forks source link

Deluge not connecting #387

Closed EirikHaughom closed 6 years ago

EirikHaughom commented 6 years ago

Edit: Posting it in correct Git repo for the fork I am using.

wiggin15 commented 6 years ago

The problem is that deluge are now checking the "Content-Type" header (see commit: https://github.com/deluge-torrent/deluge/commit/11e8957deaf0c76fdfbac62d99c8b6c61cfdddf9). I fixed the problem by changing modules/deluge.py: changed

buf = StringIO( self.opener.open(url, post_data,1).read())

to

req = urllib2.Request(url, data=post_data, headers={'Content-Type': 'application/json'})
buf = StringIO(self.opener.open(req, timeout=1).read())
Hellowlol commented 6 years ago

Thanks for the fix @wiggin15 Why dont you send a pr so you get credit for the fix? :P