From a73ab1cd8c08d5589c3f3fe66974a193627e7cde Mon Sep 17 00:00:00 2001 From: mrlt8 <67088095+mrlt8@users.noreply.github.com> Date: Fri, 25 Sep 2020 15:47:49 -0600 Subject: [PATCH] Update torrentpotato.py Fix indentation --- .../core/media/_base/providers/torrent/torrentpotato.py | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/couchpotato/core/media/_base/providers/torrent/torrentpotato.py b/couchpotato/core/media/_base/providers/torrent/torrentpotato.py index 5dd78ab..fee0ac5 100644 --- a/couchpotato/core/media/_base/providers/torrent/torrentpotato.py +++ b/couchpotato/core/media/_base/providers/torrent/torrentpotato.py @@ -44,14 +44,14 @@ class Base(TorrentProvider): elif torrents.get('results'): for torrent in torrents.get('results', []): if re.match('^(http|https|ftp)://.*$', torrent.get('download_url')): - req = requests.get(torrent.get('download_url'), allow_redirects = False) - if req.status_code == 302 and re.match('^magnet:.*$', req.headers["Location"]): - torrent['download_url'] = req.headers["Location"] - proto = "torrent_magnet" - else: - proto = "transmission" - else: - proto = "torrent_magnet" + req = requests.get(torrent.get('download_url'), allow_redirects = False) + if req.status_code == 302 and re.match('^magnet:.*$', req.headers["Location"]): + torrent['download_url'] = req.headers["Location"] + proto = "torrent_magnet" + else: + proto = "transmission" + else: + proto = "torrent_magnet" results.append({ 'id': torrent.get('torrent_id'),