FIX:(#1702) Fix for WWT domain change as well as a quick patch for future domain changes

This commit is contained in:
evilhero 2017-09-05 21:27:54 -04:00
parent 5ee122a7df
commit d2b8ffebad
3 changed files with 32 additions and 24 deletions

View File

@ -396,6 +396,9 @@ SEEDBOX_WATCHDIR = None
ENABLE_TORRENT_SEARCH = 0
ENABLE_TPSE = 0
WWTURL = None
DEMURL = None
TPSEURL = None
TPSE_PROXY = None
TPSE_VERIFY = True
@ -515,7 +518,7 @@ def initialize():
ENABLE_META, CMTAGGER_PATH, CBR2CBZ_ONLY, CT_TAG_CR, CT_TAG_CBL, CT_CBZ_OVERWRITE, UNRAR_CMD, CT_SETTINGSPATH, CMTAG_VOLUME, CMTAG_START_YEAR_AS_VOLUME, UPDATE_ENDED, INDIE_PUB, BIGGIE_PUB, IGNORE_HAVETOTAL, SNATCHED_HAVETOTAL, PROVIDER_ORDER, TMP_PROV, \
dbUpdateScheduler, searchScheduler, RSSScheduler, WeeklyScheduler, VersionScheduler, FolderMonitorScheduler, \
ALLOW_PACKS, ENABLE_TORRENTS, TORRENT_DOWNLOADER, MINSEEDS, USE_WATCHDIR, TORRENT_LOCAL, LOCAL_WATCHDIR, TORRENT_SEEDBOX, SEEDBOX_HOST, SEEDBOX_PORT, SEEDBOX_USER, SEEDBOX_PASS, SEEDBOX_WATCHDIR, \
ENABLE_RSS, RSS_CHECKINTERVAL, RSS_LASTRUN, FAILED_DOWNLOAD_HANDLING, FAILED_AUTO, ENABLE_TORRENT_SEARCH, ENABLE_TPSE, TPSE_PROXY, TPSE_VERIFY, ENABLE_32P, SEARCH_32P, MODE_32P, KEYS_32P, RSSFEED_32P, USERNAME_32P, PASSWORD_32P, AUTHKEY_32P, PASSKEY_32P, FEEDINFO_32P, VERIFY_32P, SNATCHEDTORRENT_NOTIFY, \
ENABLE_RSS, RSS_CHECKINTERVAL, RSS_LASTRUN, FAILED_DOWNLOAD_HANDLING, FAILED_AUTO, ENABLE_TORRENT_SEARCH, ENABLE_TPSE, WWTURL, DEMURL, TPSEURL, TPSE_PROXY, TPSE_VERIFY, ENABLE_32P, SEARCH_32P, MODE_32P, KEYS_32P, RSSFEED_32P, USERNAME_32P, PASSWORD_32P, AUTHKEY_32P, PASSKEY_32P, FEEDINFO_32P, VERIFY_32P, SNATCHEDTORRENT_NOTIFY, \
PROWL_ENABLED, PROWL_PRIORITY, PROWL_KEYS, PROWL_ONSNATCH, NMA_ENABLED, NMA_APIKEY, NMA_PRIORITY, NMA_ONSNATCH, PUSHOVER_ENABLED, PUSHOVER_PRIORITY, PUSHOVER_APIKEY, PUSHOVER_USERKEY, PUSHOVER_ONSNATCH, BOXCAR_ENABLED, BOXCAR_ONSNATCH, BOXCAR_TOKEN, \
PUSHBULLET_ENABLED, PUSHBULLET_APIKEY, PUSHBULLET_DEVICEID, PUSHBULLET_CHANNEL_TAG, PUSHBULLET_ONSNATCH, LOCMOVE, NEWCOM_DIR, FFTONEWCOM_DIR, \
PREFERRED_QUALITY, MOVE_FILES, RENAME_FILES, LOWERCASE_FILENAMES, USE_MINSIZE, MINSIZE, USE_MAXSIZE, MAXSIZE, CORRECT_METADATA, \
@ -1253,6 +1256,11 @@ def initialize():
#set the default URL for ComicVine API here.
CVURL = 'https://comicvine.gamespot.com/api/'
#set default URL for Public trackers (just in case it changes more frequently)
WWTURL = 'https://worldwidetorrents.me/'
DEMURL = 'https://dnoid.me/'
TPSEURL = 'https://torrentproject.se/'
#comictagger - force to use included version if option is enabled.
if ENABLE_META:
CMTAGGER_PATH = PROG_DIR

View File

@ -2172,13 +2172,13 @@ def torrent_create(site, linkid, alt=None):
pass
elif site == 'TPSE':
if alt is None:
url = 'http://torrentproject.se/torrent/' + str(linkid) + '.torrent'
url = mylar.TPSEURL + 'torrent/' + str(linkid) + '.torrent'
else:
url = 'http://torrentproject.se/torrent/' + str(linkid) + '.torrent'
url = mylar.TPSEURL + 'torrent/' + str(linkid) + '.torrent'
elif site == 'DEM':
url = 'https://www.dnoid.me/files/download/' + str(linkid) + '/'
url = mylar.DEMURL + 'files/download/' + str(linkid) + '/'
elif site == 'WWT':
url = 'https://worldwidetorrents.eu/download.php'
url = mylar.WWTURL + 'download.php'
return url

View File

@ -53,7 +53,7 @@ def torrents(pickfeed=None, seriesname=None, issue=None, feedinfo=None):
tpse_url = mylar.TPSE_PROXY + '/'
else:
#switched to https.
tpse_url = 'https://torrentproject.se/'
tpse_url = mylar.TPSEURL
#this is for the public trackers included thus far in order to properly cycle throught the correct ones depending on the search request
# TPSE = search only
@ -112,14 +112,14 @@ def torrents(pickfeed=None, seriesname=None, issue=None, feedinfo=None):
continue
return
elif pickfeed == "5" and srchterm is not None: # demonoid search / non-RSS
feed = 'https://www.dnoid.me/' + "files/?category=10&subcategory=All&language=0&seeded=2&external=2&query=" + str(srchterm) + "&uid=0&out=rss"
feed = mylar.DEMURL + "files/?category=10&subcategory=All&language=0&seeded=2&external=2&query=" + str(srchterm) + "&uid=0&out=rss"
verify = bool(mylar.TPSE_VERIFY)
elif pickfeed == "6": # demonoid rss feed
feed = 'https://www.dnoid.me/rss/10.xml'
feed = mylar.DEMURL + 'rss/10.xml'
feedtype = ' from the New Releases RSS Feed from Demonoid'
verify = bool(mylar.TPSE_VERIFY)
elif pickfeed == "999": #WWT rss feed
feed = 'https://www.worldwidetorrents.eu/rss.php?cat=132,50'
feed = mylar.WWTURL + 'rss.php?cat=132,50'
feedtype = ' from the New Releases RSS Feed from WorldWideTorrents'
elif int(pickfeed) >= 7 and feedinfo is not None:
#personal 32P notification feeds.
@ -932,9 +932,9 @@ def torsend2client(seriesname, issue, seriesyear, linkit, site):
url = helpers.torrent_create('DEM', linkit)
if url.startswith('https'):
dem_referrer = 'https://www.dnoid.me/files/download/'
dem_referrer = mylar.DEMURL + 'files/download/'
else:
dem_referrer = 'http://www.dnoid.me/files/download/'
dem_referrer = 'http' + mylar.DEMURL[5:] + 'files/download/'
headers = {'Accept-encoding': 'gzip',
'User-Agent': str(mylar.USER_AGENT),
@ -949,9 +949,9 @@ def torsend2client(seriesname, issue, seriesyear, linkit, site):
url = helpers.torrent_create('WWT', linkit)
if url.startswith('https'):
wwt_referrer = 'https://worldwidetorrents.eu'
wwt_referrer = mylar.WWTURL
else:
wwt_referrer = 'http://worldwidetorrent.eu'
wwt_referrer = 'http' + mylar.WWTURL[5:]
headers = {'Accept-encoding': 'gzip',
'User-Agent': str(mylar.USER_AGENT),