Merge branch 'develop' into refactor/view/display_show
# Conflicts: # changelog.md
Showing
This diff is collapsed.
This diff was suppressed by a .gitattributes entry.
No preview for this file type
... | ... | @@ -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" | ||
... | ... |
No preview for this file type
... | ... | @@ -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" | ||
... | ... |
No preview for this file type
... | ... | @@ -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" | ||
... | ... |
No preview for this file type
... | ... | @@ -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" | ||
... | ... |
No preview for this file type
... | ... | @@ -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" | ||
... | ... |
No preview for this file type
... | ... | @@ -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" | ||
... | ... |
No preview for this file type
... | ... | @@ -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" | ||
... | ... |
No preview for this file type
... | ... | @@ -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" | ||
... | ... |
No preview for this file type
... | ... | @@ -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" | ||
... | ... |
No preview for this file type
... | ... | @@ -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" | ||
... | ... |
No preview for this file type
... | ... | @@ -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" | ||
... | ... |
No preview for this file type
... | ... | @@ -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" | ||
... | ... |
No preview for this file type
... | ... | @@ -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" | ||
... | ... |
No preview for this file type
... | ... | @@ -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" | ||
... | ... |
No preview for this file type
... | ... | @@ -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" | ||
... | ... |
No preview for this file type
... | ... | @@ -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" | ||
... | ... |
No preview for this file type
... | ... | @@ -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" | ||
... | ... |
No preview for this file type
... | ... | @@ -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" | ||
... | ... |
No preview for this file type
... | ... | @@ -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" | ||
... | ... |
No preview for this file type
... | ... | @@ -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" | ||
... | ... |
No preview for this file type
... | ... | @@ -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" | ||
... | ... |
No preview for this file type
... | ... | @@ -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" | ||
... | ... |
No preview for this file type
... | ... | @@ -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" | ||
... | ... |
No preview for this file type
... | ... | @@ -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" | ||
... | ... |
No preview for this file type
... | ... | @@ -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" | ||
... | ... |
No preview for this file type
... | ... | @@ -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" | ||
... | ... |
No preview for this file type
... | ... | @@ -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] |