use hostname instead of TorrentPotato (dashboard)

This commit is contained in:
Joel Kåberg
2013-11-24 14:51:03 +01:00
parent 37b98cb835
commit 8a58d7f973
@@ -3,6 +3,7 @@ from couchpotato.core.helpers.variable import splitString, tryInt
from couchpotato.core.logger import CPLog from couchpotato.core.logger import CPLog
from couchpotato.core.providers.base import ResultList from couchpotato.core.providers.base import ResultList
from couchpotato.core.providers.torrent.base import TorrentProvider from couchpotato.core.providers.torrent.base import TorrentProvider
from urlparse import urlparse
import re import re
import traceback import traceback
@@ -49,6 +50,7 @@ class TorrentPotato(TorrentProvider):
results.append({ results.append({
'id': torrent.get('torrent_id'), 'id': torrent.get('torrent_id'),
'protocol': 'torrent' if re.match('^(http|https|ftp)://.*$', torrent.get('download_url')) else 'torrent_magnet', 'protocol': 'torrent' if re.match('^(http|https|ftp)://.*$', torrent.get('download_url')) else 'torrent_magnet',
'provider_extra': urlparse(host['host']).hostname or host['host'],
'name': toUnicode(torrent.get('release_name')), 'name': toUnicode(torrent.get('release_name')),
'url': torrent.get('download_url'), 'url': torrent.get('download_url'),
'detail_url': torrent.get('details_url'), 'detail_url': torrent.get('details_url'),