use hostname instead of TorrentPotato (dashboard)
This commit is contained in:
@@ -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'),
|
||||||
|
|||||||
Reference in New Issue
Block a user