Commit ae55e480 authored by echel0n's avatar echel0n

Merge branch 'develop' into refactor/view/display_show

# Conflicts:
#	changelog.md
parents 60cabede e5cadea8
# Changelog
- * dbaa83e - 2018-12-04: Refactored display show view header
- * c1aed13 - 2018-12-08: Release v9.4.49
- * 854687c - 2018-12-08: Added GKTorrent provider.
- * 5592614 - 2018-12-08: Fixed login issues for Speed.cd torrent provider.
- * 60cabed - 2018-12-04: Refactored display show view header
- * 5663214 - 2018-12-04: Release v9.4.48
- * e0fd191 - 2018-12-04: Cleaned up mass edit view code. Fixed bug with comparing minseed and minleech values.
- * b55a806 - 2018-12-02: Pre-Release v9.4.48.dev9
......
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -2,8 +2,8 @@ msgid ""
msgstr ""
"Project-Id-Version: sickragetv\n"
"Report-Msgid-Bugs-To: [email protected]\n"
"POT-Creation-Date: 2018-12-04 23:10-0800\n"
"PO-Revision-Date: 2018-12-05 07:12\n"
"POT-Creation-Date: 2018-12-08 09:25-0800\n"
"PO-Revision-Date: 2018-12-08 17:26\n"
"Last-Translator: echel0n <[email protected]>\n"
"Language-Team: Arabic\n"
"MIME-Version: 1.0\n"
......
......@@ -2,8 +2,8 @@ msgid ""
msgstr ""
"Project-Id-Version: sickragetv\n"
"Report-Msgid-Bugs-To: [email protected]\n"
"POT-Creation-Date: 2018-12-04 23:10-0800\n"
"PO-Revision-Date: 2018-12-05 07:12\n"
"POT-Creation-Date: 2018-12-08 09:25-0800\n"
"PO-Revision-Date: 2018-12-08 17:26\n"
"Last-Translator: echel0n <[email protected]>\n"
"Language-Team: Catalan\n"
"MIME-Version: 1.0\n"
......
......@@ -2,8 +2,8 @@ msgid ""
msgstr ""
"Project-Id-Version: sickragetv\n"
"Report-Msgid-Bugs-To: [email protected]\n"
"POT-Creation-Date: 2018-12-04 23:10-0800\n"
"PO-Revision-Date: 2018-12-05 07:12\n"
"POT-Creation-Date: 2018-12-08 09:25-0800\n"
"PO-Revision-Date: 2018-12-08 17:26\n"
"Last-Translator: echel0n <[email protected]>\n"
"Language-Team: Czech\n"
"MIME-Version: 1.0\n"
......
......@@ -2,8 +2,8 @@ msgid ""
msgstr ""
"Project-Id-Version: sickragetv\n"
"Report-Msgid-Bugs-To: [email protected]\n"
"POT-Creation-Date: 2018-12-04 23:10-0800\n"
"PO-Revision-Date: 2018-12-05 07:12\n"
"POT-Creation-Date: 2018-12-08 09:25-0800\n"
"PO-Revision-Date: 2018-12-08 17:26\n"
"Last-Translator: echel0n <[email protected]>\n"
"Language-Team: Danish\n"
"MIME-Version: 1.0\n"
......
......@@ -2,8 +2,8 @@ msgid ""
msgstr ""
"Project-Id-Version: sickragetv\n"
"Report-Msgid-Bugs-To: [email protected]\n"
"POT-Creation-Date: 2018-12-04 23:10-0800\n"
"PO-Revision-Date: 2018-12-05 07:12\n"
"POT-Creation-Date: 2018-12-08 09:25-0800\n"
"PO-Revision-Date: 2018-12-08 17:26\n"
"Last-Translator: echel0n <[email protected]>\n"
"Language-Team: German\n"
"MIME-Version: 1.0\n"
......
......@@ -2,8 +2,8 @@ msgid ""
msgstr ""
"Project-Id-Version: sickragetv\n"
"Report-Msgid-Bugs-To: [email protected]\n"
"POT-Creation-Date: 2018-12-04 23:10-0800\n"
"PO-Revision-Date: 2018-12-05 07:12\n"
"POT-Creation-Date: 2018-12-08 09:25-0800\n"
"PO-Revision-Date: 2018-12-08 17:27\n"
"Last-Translator: echel0n <[email protected]>\n"
"Language-Team: Greek\n"
"MIME-Version: 1.0\n"
......
......@@ -2,8 +2,8 @@ msgid ""
msgstr ""
"Project-Id-Version: sickragetv\n"
"Report-Msgid-Bugs-To: [email protected]\n"
"POT-Creation-Date: 2018-12-04 23:10-0800\n"
"PO-Revision-Date: 2018-12-05 07:14\n"
"POT-Creation-Date: 2018-12-08 09:25-0800\n"
"PO-Revision-Date: 2018-12-08 17:28\n"
"Last-Translator: echel0n <[email protected]>\n"
"Language-Team: English\n"
"MIME-Version: 1.0\n"
......
......@@ -2,8 +2,8 @@ msgid ""
msgstr ""
"Project-Id-Version: sickragetv\n"
"Report-Msgid-Bugs-To: [email protected]\n"
"POT-Creation-Date: 2018-12-04 23:10-0800\n"
"PO-Revision-Date: 2018-12-05 07:11\n"
"POT-Creation-Date: 2018-12-08 09:25-0800\n"
"PO-Revision-Date: 2018-12-08 17:26\n"
"Last-Translator: echel0n <[email protected]>\n"
"Language-Team: Spanish\n"
"MIME-Version: 1.0\n"
......
......@@ -2,8 +2,8 @@ msgid ""
msgstr ""
"Project-Id-Version: sickragetv\n"
"Report-Msgid-Bugs-To: [email protected]\n"
"POT-Creation-Date: 2018-12-04 23:10-0800\n"
"PO-Revision-Date: 2018-12-05 07:12\n"
"POT-Creation-Date: 2018-12-08 09:25-0800\n"
"PO-Revision-Date: 2018-12-08 17:27\n"
"Last-Translator: echel0n <[email protected]>\n"
"Language-Team: Finnish\n"
"MIME-Version: 1.0\n"
......
......@@ -2,8 +2,8 @@ msgid ""
msgstr ""
"Project-Id-Version: sickragetv\n"
"Report-Msgid-Bugs-To: [email protected]\n"
"POT-Creation-Date: 2018-12-04 23:10-0800\n"
"PO-Revision-Date: 2018-12-05 07:11\n"
"POT-Creation-Date: 2018-12-08 09:25-0800\n"
"PO-Revision-Date: 2018-12-08 17:26\n"
"Last-Translator: echel0n <[email protected]>\n"
"Language-Team: French\n"
"MIME-Version: 1.0\n"
......
......@@ -2,8 +2,8 @@ msgid ""
msgstr ""
"Project-Id-Version: sickragetv\n"
"Report-Msgid-Bugs-To: [email protected]\n"
"POT-Creation-Date: 2018-12-04 23:10-0800\n"
"PO-Revision-Date: 2018-12-05 07:12\n"
"POT-Creation-Date: 2018-12-08 09:25-0800\n"
"PO-Revision-Date: 2018-12-08 17:27\n"
"Last-Translator: echel0n <[email protected]>\n"
"Language-Team: Hebrew\n"
"MIME-Version: 1.0\n"
......
......@@ -2,8 +2,8 @@ msgid ""
msgstr ""
"Project-Id-Version: sickragetv\n"
"Report-Msgid-Bugs-To: [email protected]\n"
"POT-Creation-Date: 2018-12-04 23:10-0800\n"
"PO-Revision-Date: 2018-12-05 07:12\n"
"POT-Creation-Date: 2018-12-08 09:25-0800\n"
"PO-Revision-Date: 2018-12-08 17:27\n"
"Last-Translator: echel0n <[email protected]>\n"
"Language-Team: Hungarian\n"
"MIME-Version: 1.0\n"
......
......@@ -2,8 +2,8 @@ msgid ""
msgstr ""
"Project-Id-Version: sickragetv\n"
"Report-Msgid-Bugs-To: [email protected]\n"
"POT-Creation-Date: 2018-12-04 23:10-0800\n"
"PO-Revision-Date: 2018-12-05 07:12\n"
"POT-Creation-Date: 2018-12-08 09:25-0800\n"
"PO-Revision-Date: 2018-12-08 17:27\n"
"Last-Translator: echel0n <[email protected]>\n"
"Language-Team: Italian\n"
"MIME-Version: 1.0\n"
......
......@@ -2,8 +2,8 @@ msgid ""
msgstr ""
"Project-Id-Version: sickragetv\n"
"Report-Msgid-Bugs-To: [email protected]\n"
"POT-Creation-Date: 2018-12-04 23:10-0800\n"
"PO-Revision-Date: 2018-12-05 07:13\n"
"POT-Creation-Date: 2018-12-08 09:25-0800\n"
"PO-Revision-Date: 2018-12-08 17:27\n"
"Last-Translator: echel0n <[email protected]>\n"
"Language-Team: Japanese\n"
"MIME-Version: 1.0\n"
......
......@@ -2,8 +2,8 @@ msgid ""
msgstr ""
"Project-Id-Version: sickragetv\n"
"Report-Msgid-Bugs-To: [email protected]\n"
"POT-Creation-Date: 2018-12-04 23:10-0800\n"
"PO-Revision-Date: 2018-12-05 07:13\n"
"POT-Creation-Date: 2018-12-08 09:25-0800\n"
"PO-Revision-Date: 2018-12-08 17:27\n"
"Last-Translator: echel0n <[email protected]>\n"
"Language-Team: Korean\n"
"MIME-Version: 1.0\n"
......
......@@ -6,9 +6,9 @@
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: sickrage 9.4.48\n"
"Project-Id-Version: sickrage 9.4.49\n"
"Report-Msgid-Bugs-To: [email protected]\n"
"POT-Creation-Date: 2018-12-04 23:10-0800\n"
"POT-Creation-Date: 2018-12-08 09:25-0800\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <[email protected]>\n"
"Language-Team: LANGUAGE <[email protected]>\n"
......
......@@ -2,8 +2,8 @@ msgid ""
msgstr ""
"Project-Id-Version: sickragetv\n"
"Report-Msgid-Bugs-To: [email protected]\n"
"POT-Creation-Date: 2018-12-04 23:10-0800\n"
"PO-Revision-Date: 2018-12-05 07:13\n"
"POT-Creation-Date: 2018-12-08 09:25-0800\n"
"PO-Revision-Date: 2018-12-08 17:27\n"
"Last-Translator: echel0n <[email protected]>\n"
"Language-Team: Dutch\n"
"MIME-Version: 1.0\n"
......
......@@ -2,8 +2,8 @@ msgid ""
msgstr ""
"Project-Id-Version: sickragetv\n"
"Report-Msgid-Bugs-To: [email protected]\n"
"POT-Creation-Date: 2018-12-04 23:10-0800\n"
"PO-Revision-Date: 2018-12-05 07:13\n"
"POT-Creation-Date: 2018-12-08 09:25-0800\n"
"PO-Revision-Date: 2018-12-08 17:27\n"
"Last-Translator: echel0n <[email protected]>\n"
"Language-Team: Norwegian\n"
"MIME-Version: 1.0\n"
......
......@@ -2,8 +2,8 @@ msgid ""
msgstr ""
"Project-Id-Version: sickragetv\n"
"Report-Msgid-Bugs-To: [email protected]\n"
"POT-Creation-Date: 2018-12-04 23:10-0800\n"
"PO-Revision-Date: 2018-12-05 07:13\n"
"POT-Creation-Date: 2018-12-08 09:25-0800\n"
"PO-Revision-Date: 2018-12-08 17:27\n"
"Last-Translator: echel0n <[email protected]>\n"
"Language-Team: Polish\n"
"MIME-Version: 1.0\n"
......
......@@ -2,8 +2,8 @@ msgid ""
msgstr ""
"Project-Id-Version: sickragetv\n"
"Report-Msgid-Bugs-To: [email protected]\n"
"POT-Creation-Date: 2018-12-04 23:10-0800\n"
"PO-Revision-Date: 2018-12-05 07:13\n"
"POT-Creation-Date: 2018-12-08 09:25-0800\n"
"PO-Revision-Date: 2018-12-08 17:28\n"
"Last-Translator: echel0n <[email protected]>\n"
"Language-Team: Portuguese\n"
"MIME-Version: 1.0\n"
......
......@@ -2,8 +2,8 @@ msgid ""
msgstr ""
"Project-Id-Version: sickragetv\n"
"Report-Msgid-Bugs-To: [email protected]\n"
"POT-Creation-Date: 2018-12-04 23:10-0800\n"
"PO-Revision-Date: 2018-12-05 07:11\n"
"POT-Creation-Date: 2018-12-08 09:25-0800\n"
"PO-Revision-Date: 2018-12-08 17:26\n"
"Last-Translator: echel0n <[email protected]>\n"
"Language-Team: Romanian\n"
"MIME-Version: 1.0\n"
......
......@@ -2,8 +2,8 @@ msgid ""
msgstr ""
"Project-Id-Version: sickragetv\n"
"Report-Msgid-Bugs-To: [email protected]\n"
"POT-Creation-Date: 2018-12-04 23:10-0800\n"
"PO-Revision-Date: 2018-12-05 07:13\n"
"POT-Creation-Date: 2018-12-08 09:25-0800\n"
"PO-Revision-Date: 2018-12-08 17:28\n"
"Last-Translator: echel0n <[email protected]>\n"
"Language-Team: Russian\n"
"MIME-Version: 1.0\n"
......
......@@ -2,8 +2,8 @@ msgid ""
msgstr ""
"Project-Id-Version: sickragetv\n"
"Report-Msgid-Bugs-To: [email protected]\n"
"POT-Creation-Date: 2018-12-04 23:10-0800\n"
"PO-Revision-Date: 2018-12-05 07:13\n"
"POT-Creation-Date: 2018-12-08 09:25-0800\n"
"PO-Revision-Date: 2018-12-08 17:28\n"
"Last-Translator: echel0n <[email protected]>\n"
"Language-Team: Swedish\n"
"MIME-Version: 1.0\n"
......
......@@ -2,8 +2,8 @@ msgid ""
msgstr ""
"Project-Id-Version: sickragetv\n"
"Report-Msgid-Bugs-To: [email protected]\n"
"POT-Creation-Date: 2018-12-04 23:10-0800\n"
"PO-Revision-Date: 2018-12-05 07:13\n"
"POT-Creation-Date: 2018-12-08 09:25-0800\n"
"PO-Revision-Date: 2018-12-08 17:28\n"
"Last-Translator: echel0n <[email protected]>\n"
"Language-Team: Turkish\n"
"MIME-Version: 1.0\n"
......
......@@ -2,8 +2,8 @@ msgid ""
msgstr ""
"Project-Id-Version: sickragetv\n"
"Report-Msgid-Bugs-To: [email protected]\n"
"POT-Creation-Date: 2018-12-04 23:10-0800\n"
"PO-Revision-Date: 2018-12-05 07:13\n"
"POT-Creation-Date: 2018-12-08 09:25-0800\n"
"PO-Revision-Date: 2018-12-08 17:28\n"
"Last-Translator: echel0n <[email protected]>\n"
"Language-Team: Ukrainian\n"
"MIME-Version: 1.0\n"
......
......@@ -2,8 +2,8 @@ msgid ""
msgstr ""
"Project-Id-Version: sickragetv\n"
"Report-Msgid-Bugs-To: [email protected]\n"
"POT-Creation-Date: 2018-12-04 23:10-0800\n"
"PO-Revision-Date: 2018-12-05 07:14\n"
"POT-Creation-Date: 2018-12-08 09:25-0800\n"
"PO-Revision-Date: 2018-12-08 17:28\n"
"Last-Translator: echel0n <[email protected]>\n"
"Language-Team: Vietnamese\n"
"MIME-Version: 1.0\n"
......
......@@ -2,8 +2,8 @@ msgid ""
msgstr ""
"Project-Id-Version: sickragetv\n"
"Report-Msgid-Bugs-To: [email protected]\n"
"POT-Creation-Date: 2018-12-04 23:10-0800\n"
"PO-Revision-Date: 2018-12-05 07:13\n"
"POT-Creation-Date: 2018-12-08 09:25-0800\n"
"PO-Revision-Date: 2018-12-08 17:28\n"
"Last-Translator: echel0n <[email protected]>\n"
"Language-Team: Chinese Simplified\n"
"MIME-Version: 1.0\n"
......
......@@ -2,8 +2,8 @@ msgid ""
msgstr ""
"Project-Id-Version: sickragetv\n"
"Report-Msgid-Bugs-To: [email protected]\n"
"POT-Creation-Date: 2018-12-04 23:10-0800\n"
"PO-Revision-Date: 2018-12-05 07:13\n"
"POT-Creation-Date: 2018-12-08 09:25-0800\n"
"PO-Revision-Date: 2018-12-08 17:28\n"
"Last-Translator: echel0n <[email protected]>\n"
"Language-Team: Chinese Traditional\n"
"MIME-Version: 1.0\n"
......
# coding=utf-8
# Author: echel0n <[email protected]>
# URL: https://sickrage.ca
#
# This file is part of SickRage.
#
# SickRage is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# SickRage is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with SickRage. If not, see <http://www.gnu.org/licenses/>.
from __future__ import print_function, unicode_literals
from urlparse import urljoin
import sickrage
from sickrage.core.caches.tv_cache import TVCache
from sickrage.core.helpers import bs4_parser, try_int, convert_size, validate_url
from sickrage.providers import TorrentProvider
class GKTorrentProvider(TorrentProvider):
def __init__(self):
super(GKTorrentProvider, self).__init__('GKTorrent', 'https://www.gktorrent.me', False)
self.urls.update({
'search': '{base_url}/recherche/'.format(**self.urls),
'rss': '{base_url}/torrents/séries'.format(**self.urls),
})
self.minseed = None
self.minleech = None
self.custom_url = ""
self.proper_strings = ['PROPER', 'REPACK']
self.cache = TVCache(self, min_time=20)
def search(self, search_strings, age=0, ep_obj=None, **kwargs):
results = []
for mode in search_strings:
sickrage.app.log.debug("Search Mode: {0}".format(mode))
for search_string in search_strings[mode]:
if mode != 'RSS':
sickrage.app.log.debug("Search string: {}".format(search_string))
search_url = urljoin(self.urls['search'], "{search_query}".format(search_query=search_string))
else:
search_url = self.urls['rss']
if self.custom_url:
if not validate_url(self.custom_url):
sickrage.app.log.warning("Invalid custom url: {}".format(self.custom_url))
return results
search_url = urljoin(self.custom_url, search_url.split(self.urls['base_url'])[1])
try:
data = self.session.get(search_url).text
results += self.parse(data, mode)
except Exception:
sickrage.app.log.debug("No data returned from provider")
return results
def parse(self, data, mode, **kwargs):
"""
Parse search results from data
:param data: response data
:param mode: search mode
:return: search results
"""
results = []
with bs4_parser(data) as html:
table_body = html.find('tbody')
# Continue only if at least one release is found
if not table_body:
sickrage.app.log.debug('Data returned from provider does not contain any torrents')
return results
for row in table_body('tr'):
cells = row('td')
if len(cells) < 4:
continue
try:
info_cell = cells[0].a
title = info_cell.get_text()
download_url = self._get_download_link(urljoin(self.urls['base_url'], info_cell.get('href')))
if not all([title, download_url]):
continue
title = '{name} {codec}'.format(name=title, codec='x264')
if self.custom_url:
if not validate_url(self.custom_url):
sickrage.app.log.warning("Invalid custom url: {}".format(self.custom_url))
return results
download_url = urljoin(self.custom_url, download_url.split(self.urls['base_url'])[1])
seeders = try_int(cells[2].get_text(strip=True))
leechers = try_int(cells[3].get_text(strip=True))
torrent_size = cells[1].get_text()
size = convert_size(torrent_size, -1)
results += [{
'title': title,
'link': download_url,
'size': size,
'seeders': seeders,
'leechers': leechers
}]
if mode != 'RSS':
sickrage.app.log.debug("Found result: {}".format(title))
except Exception:
sickrage.app.log.error("Failed parsing provider")
return results
def _get_download_link(self, url, download_type="torrent"):
data = self.session.get(url).text
links = {
"torrent": "",
"magnet": "",
}
with bs4_parser(data) as html:
downloads = html.find('div', {'class': 'download'})
for download in downloads.findAll('a'):
link = download['href']
if link.startswith("magnet"):
links["magnet"] = link
else:
links["torrent"] = urljoin(self.urls['base_url'], link)
return links[download_type]
......@@ -20,6 +20,8 @@ from __future__ import unicode_literals
from urlparse import urljoin
from requests.utils import dict_from_cookiejar
import sickrage
from sickrage.core.caches.tv_cache import TVCache
from sickrage.core.helpers import bs4_parser, try_int, convert_size
......@@ -35,47 +37,47 @@ class SpeedCDProvider(TorrentProvider):
'search': '{base_url}/browse.php'.format(**self.urls),
})
# self.username = None
# self.password = None
self.username = None
self.password = None
self.freeleech = False
self.minseed = None
self.minleech = None
self.enable_cookies = True
self.required_cookies = ('inSpeed_uid', 'inSpeed_speedian')
# self.enable_cookies = True
# self.required_cookies = ('inSpeed_uid', 'inSpeed_speedian')
self.proper_strings = ['PROPER', 'REPACK', 'REAL', 'RERIP']
self.cache = TVCache(self, min_time=20)
# def login(self):
# return self.cookie_login('log in')
def login(self):
return self.cookie_login('log in')
if any(dict_from_cookiejar(self.session.cookies).values()):
return True
# def login(self):
# if any(dict_from_cookiejar(self.session.cookies).values()):
# return True
#
# login_params = {
# 'username': self.username,
# 'password': self.password
# }
#
# try:
# with bs4_parser(self.session.get(self.urls['login']).text) as html:
# login_url = urljoin(self.urls['base_url'], html.find('form', id='loginform').get('action'))
# response = self.session.post(login_url, data=login_params, timeout=30).text
# except Exception:
# sickrage.app.log.warning("Unable to connect to provider")
# self.session.cookies.clear()
# return False
#
# if 'logout.php' not in response.lower():
# sickrage.app.log.warning("Invalid username or password, check your settings.")
# self.session.cookies.clear()
# return False
#
# return True
login_params = {
'username': self.username,
'password': self.password
}
try:
with bs4_parser(self.session.get(self.urls['login']).text) as html:
login_url = urljoin(self.urls['base_url'], html.find('form', id='loginform').get('action'))
response = self.session.post(login_url, data=login_params, timeout=30).text
except Exception:
sickrage.app.log.warning("Unable to connect to provider")
self.session.cookies.clear()
return False
if 'logout.php' not in response.lower():
sickrage.app.log.warning("Invalid username or password, check your settings.")
self.session.cookies.clear()
return False
return True
def search(self, search_strings, age=0, ep_obj=None, **kwargs):
results = []
......
9.4.48
\ No newline at end of file
9.4.49
\ No newline at end of file
This diff was suppressed by a .gitattributes entry.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment