Commit 83f04db5 authored by echel0n's avatar echel0n

Merge branch 'release/9.4.48'

parents f4d34e4c 56632140
Pipeline #328 passed with stage
in 4 minutes and 2 seconds
# Changelog
- * f748a5c - 2018-11-29: Release v9.4.47
- * 817bd5d - 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
- * ade442d - 2018-12-02: Upgraded to Tornado 5.1.1 Refactored IOLoop placement.
- * 97cf604 - 2018-12-02: Pre-Release v9.4.48.dev8
- * 977b8be - 2018-12-02: Reverted tornado back to v4.5.2
- * 4e68fe8 - 2018-12-01: Pre-Release v9.4.48.dev7
- * bb861f9 - 2018-12-01: Updated message regarding installation of requirements if needed.
- * 2165268 - 2018-12-01: Updated HTTPS handling for web server
- * 7c81274 - 2018-12-01: Pre-Release v9.4.48.dev6
- * 7322bff - 2018-12-01: Pre-Release v9.4.48.dev5
- * dfcf530 - 2018-12-01: Pre-Release v9.4.48.dev4
- * 6fb14eb - 2018-12-01: Pre-Release v9.4.48.dev3
- * c3de274 - 2018-12-01: Updated requirements Added multiple methods to help install requirements.txt Updating fails if installing/updating requirements fails
- * 99e28af - 2018-12-01: Pre-Release v9.4.48.dev2
- * bb367fd - 2018-11-30: Adding shows from trakt or imdb now prompt for show settings.
- * 23e7005 - 2018-11-30: Pre-Release v9.4.48.dev1
- * b266867 - 2018-11-29: Release v9.4.47
- * 58c1f5e - 2018-11-29: Added code to ensure seeders, leechers, and size are always integer values before being added to cache.
- * 80b928a - 2018-11-28: Release v9.4.46
- * e444d97 - 2018-11-26: Release v9.4.45
......
APScheduler == 3.5.0
APScheduler == 3.5.3
babelfish == 0.5.5
bencode == 1.0
CacheControl == 0.12.3
CacheControl == 0.12.5
cfscrape == 1.9.5
configobj == 5.0.6
feedparser == 5.2.1
guessit == 2.1.4
guessit == 3.0.3
hachoir_core == 1.3.3
hachoir_metadata == 1.3.3
hachoir_parser == 1.3.4
jsonrpclib == 0.1.7
Mako == 1.0.7
markdown2 == 2.3.3
markdown2 == 2.3.6
oauth2 == 1.9.0.post1
profilehooks == 1.9.0
Send2Trash == 1.4.2
profilehooks == 1.10.0
Send2Trash == 1.5.0
six == 1.11.0
subliminal == 2.0.5
tornado == 4.5.2
tornado == 5.1.1
xmltodict == 0.11.0
MultipartPostHandler == 0.1.0
beautifulsoup4 == 4.6.0
python_dateutil == 2.6.0
beautifulsoup4 == 4.6.3
python_dateutil == 2.7.5
pynzb == 0.1.0
futures == 3.2.0
gntp == 1.0.3
python_twitter == 3.3
pyxdg == 0.25
urllib3 == 1.22
python_twitter == 3.5
pyxdg == 0.26
urllib3 == 1.24.1
py-unrar2 == 0.99.6
lockfile == 0.12.2
requests == 2.18.4
requests == 2.20.1
codernitydb == 0.5.0
fake-useragent == 0.1.8
fake-useragent == 0.1.11
html5lib == 1.0.1
arrow == 0.10.0
unidecode == 0.4.21
twilio == 6.10.0
arrow == 0.12.1
unidecode == 1.0.23
twilio == 6.21.0
chardet == 3.0.4
pytz == 2017.3
pytz == 2018.7
tzlocal == 2.0.0b1
raven == 6.7.0
python-keycloak-client == 0.1.3
simplejson == 3.15.0
raven == 6.9.0
python-keycloak-client == 0.2.0
simplejson == 3.16.0
service_identity == 17.0.0
certifi
pyasn1
lxml
ipaddress
psutil
cffi
\ No newline at end of file
cffi
......@@ -36,8 +36,9 @@ MAIN_DIR = os.path.abspath(os.path.realpath(os.path.expanduser(os.path.dirname(o
PROG_DIR = os.path.abspath(os.path.realpath(os.path.expanduser(os.path.dirname(__file__))))
LOCALE_DIR = os.path.join(PROG_DIR, 'locale')
LIBS_DIR = os.path.join(PROG_DIR, 'libs')
REQS_FILE = os.path.join(MAIN_DIR, 'requirements.txt')
VERSION_FILE = os.path.join(PROG_DIR, 'version.txt')
CHANGELOG_FILE = os.path.join(MAIN_DIR, 'changelog.md')
REQS_FILE = os.path.join(MAIN_DIR, 'requirements.txt')
class Daemon(object):
......@@ -187,7 +188,7 @@ def check_requirements():
def version():
# Get the version number
with io.open(os.path.abspath(os.path.join(os.path.dirname(__file__), 'version.txt'))) as f:
with io.open(VERSION_FILE) as f:
return f.read()
......@@ -320,8 +321,7 @@ def main():
except ImportError:
traceback.print_exc()
if os.path.isfile(REQS_FILE):
print("Failed to import required libs, please run "
"'pip install --user -U -r {}' from console".format(REQS_FILE))
print('Failed to import required libs, please run "pip install -r {}" from console'.format(REQS_FILE))
except Exception:
traceback.print_exc()
......
......@@ -81,7 +81,7 @@ class Core(object):
def __init__(self):
self.started = False
self.daemon = None
self.io_loop = IOLoop()
self.io_loop = None
self.pid = os.getpid()
self.showlist = []
......@@ -155,6 +155,7 @@ class Core(object):
def start(self):
self.started = True
self.io_loop = IOLoop.current()
# thread name
threading.currentThread().setName('CORE')
......@@ -208,9 +209,9 @@ class Core(object):
if os.path.isfile(os.path.join(self.data_dir, 'sickrage.db')):
helpers.move_file(os.path.join(self.data_dir, 'sickrage.db'),
os.path.join(self.data_dir, '{}.bak-{}'
.format('sickrage.db',
datetime.datetime.now().strftime(
'%Y%m%d_%H%M%S'))))
.format('sickrage.db',
datetime.datetime.now().strftime(
'%Y%m%d_%H%M%S'))))
helpers.move_file(os.path.abspath(os.path.join(self.data_dir, 'sickbeard.db')),
os.path.abspath(os.path.join(self.data_dir, 'sickrage.db')))
......@@ -471,13 +472,19 @@ class Core(object):
self.postprocessor_queue.start()
self.event_queue.start()
# start webserver
self.wserver.start()
# fire off startup events
self.event_queue.fire_event(self.version_updater.run)
self.event_queue.fire_event(self.tz_updater.run)
# start webserver
self.wserver.start()
# launch browser window
if all([not sickrage.app.no_launch, sickrage.app.config.launch_browser]):
self.event_queue.fire_event(lambda: launch_browser(('http', 'https')[sickrage.app.config.enable_https],
sickrage.app.config.web_host,
sickrage.app.config.web_port))
# start ioloop
self.io_loop.start()
......@@ -539,7 +546,8 @@ class Core(object):
self.started = False
self.io_loop.stop()
if self.io_loop:
self.io_loop.stop()
def save_all(self):
# write all shows
......@@ -568,4 +576,4 @@ class Core(object):
self.showlist.append(show)
self.quicksearch_cache.add_show(show.indexerid)
except Exception as e:
self.log.debug("Show error in [%s]: %s" % (show.location, str(e)))
\ No newline at end of file
self.log.debug("Show error in [%s]: %s" % (show.location, str(e)))
......@@ -167,15 +167,15 @@ def pickBestResult(results, show):
continue
# check if seeders meet out minimum requirements, disgard result if it does not
if hasattr(cur_result.provider, 'minseed') and cur_result.seeders not in (-1, None, ''):
if int(cur_result.seeders) < int(cur_result.provider.minseed):
if hasattr(cur_result.provider, 'minseed') and cur_result.seeders not in (-1, None):
if int(cur_result.seeders) < min(cur_result.provider.minseed, 1):
sickrage.app.log.info("Discarding torrent because it doesn't meet the minimum seeders: {}. Seeders: "
"{}".format(cur_result.name, cur_result.seeders))
continue
# check if leechers meet out minimum requirements, disgard result if it does not
if hasattr(cur_result.provider, 'minleech') and cur_result.leechers not in (-1, None, ''):
if int(cur_result.leechers) < int(cur_result.provider.minleech):
if hasattr(cur_result.provider, 'minleech') and cur_result.leechers not in (-1, None):
if int(cur_result.leechers) < min(cur_result.provider.minleech, 0):
sickrage.app.log.info("Discarding torrent because it doesn't meet the minimum leechers: {}. Leechers: "
"{}".format(cur_result.name, cur_result.leechers))
continue
......
......@@ -18,7 +18,6 @@
from __future__ import unicode_literals
import io
import os
import platform
import re
......@@ -134,7 +133,7 @@ class VersionUpdater(object):
# default to source install type
install_type = SourceUpdateManager()
if os.path.isdir(os.path.join(os.path.dirname(sickrage.PROG_DIR), '.git')):
if os.path.isdir(os.path.join(sickrage.MAIN_DIR, '.git')):
# GIT install type
install_type = GitUpdateManager()
elif PipUpdateManager().version:
......@@ -213,14 +212,11 @@ class UpdateManager(object):
main_git = sickrage.app.config.git_path or 'git'
sickrage.app.log.debug("Checking if we can use git commands: " + main_git + ' ' + test_cmd)
__, __, exit_status = self._git_cmd(main_git, test_cmd)
# sickrage.app.log.debug("Checking if we can use git commands: " + main_git + ' ' + test_cmd)
__, __, exit_status = self._git_cmd(main_git, test_cmd, silent=True)
if exit_status == 0:
sickrage.app.log.debug("Using: " + main_git)
# sickrage.app.log.debug("Using: " + main_git)
return main_git
else:
sickrage.app.log.debug("Not using: " + main_git)
# trying alternatives
alternative_git = []
......@@ -237,18 +233,18 @@ class UpdateManager(object):
sickrage.app.log.debug("Trying known alternative git locations")
for cur_git in alternative_git:
sickrage.app.log.debug("Checking if we can use git commands: " + cur_git + ' ' + test_cmd)
# sickrage.app.log.debug("Checking if we can use git commands: " + cur_git + ' ' + test_cmd)
__, __, exit_status = self._git_cmd(cur_git, test_cmd)
if exit_status == 0:
sickrage.app.log.debug("Using: " + cur_git)
# sickrage.app.log.debug("Using: " + cur_git)
return cur_git
else:
sickrage.app.log.debug("Not using: " + cur_git)
# Still haven't found a working git
error_message = _('Unable to find your git executable - Set your git path from Settings->General->Advanced OR '
'delete your .git folder and run from source to enable updates.')
'delete your {git_folder} folder and run from source to enable updates.'.format(**{
'git_folder': os.path.join(sickrage.MAIN_DIR, '.git')
}))
sickrage.app.alerts.error(_('Updater'), error_message)
@property
......@@ -257,14 +253,11 @@ class UpdateManager(object):
main_pip = sickrage.app.config.pip_path or 'pip2'
sickrage.app.log.debug("Checking if we can use pip commands: " + main_pip + ' ' + test_cmd)
__, __, exit_status = self._pip_cmd(main_pip, test_cmd)
# sickrage.app.log.debug("Checking if we can use pip commands: " + main_pip + ' ' + test_cmd)
__, __, exit_status = self._pip_cmd(main_pip, test_cmd, silent=True)
if exit_status == 0:
sickrage.app.log.debug("Using: " + main_pip)
# sickrage.app.log.debug("Using: " + main_pip)
return main_pip
else:
sickrage.app.log.debug("Not using: " + main_pip)
# trying alternatives
alternative_pip = []
......@@ -281,21 +274,19 @@ class UpdateManager(object):
sickrage.app.log.debug("Trying known alternative pip locations")
for cur_pip in alternative_pip:
sickrage.app.log.debug("Checking if we can use pip commands: " + cur_pip + ' ' + test_cmd)
# sickrage.app.log.debug("Checking if we can use pip commands: " + cur_pip + ' ' + test_cmd)
__, __, exit_status = self._pip_cmd(cur_pip, test_cmd)
if exit_status == 0:
sickrage.app.log.debug("Using: " + cur_pip)
# sickrage.app.log.debug("Using: " + cur_pip)
return cur_pip
else:
sickrage.app.log.debug("Not using: " + cur_pip)
# Still haven't found a working git
error_message = _('Unable to find your pip executable - Set your pip path from Settings->General->Advanced')
sickrage.app.alerts.error(_('Updater'), error_message)
@staticmethod
def _git_cmd(git_path, args):
def _git_cmd(git_path, args, silent=False):
output = err = None
if not git_path:
......@@ -306,9 +297,11 @@ class UpdateManager(object):
cmd = [git_path] + args.split()
try:
sickrage.app.log.debug("Executing " + ' '.join(cmd) + " with your shell in " + sickrage.PROG_DIR)
if not silent:
sickrage.app.log.debug("Executing " + ' '.join(cmd) + " with your shell in " + sickrage.MAIN_DIR)
p = subprocess.Popen(cmd, stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.STDOUT,
shell=(sys.platform == 'win32'), cwd=sickrage.PROG_DIR)
shell=(sys.platform == 'win32'), cwd=sickrage.MAIN_DIR)
output, err = p.communicate()
exit_status = p.returncode
......@@ -320,7 +313,8 @@ class UpdateManager(object):
exit_status = 1
if exit_status == 0:
sickrage.app.log.debug(' '.join(cmd) + " : returned successful")
if not silent:
sickrage.app.log.debug(' '.join(cmd) + " : returned successful")
exit_status = 0
elif exit_status == 1:
if output:
......@@ -342,7 +336,7 @@ class UpdateManager(object):
return output, err, exit_status
@staticmethod
def _pip_cmd(pip_path, args):
def _pip_cmd(pip_path, args, silent=False):
output = err = None
if not pip_path:
......@@ -353,9 +347,11 @@ class UpdateManager(object):
cmd = [pip_path] + args.split()
try:
sickrage.app.log.debug("Executing " + ' '.join(cmd) + " with your shell in " + sickrage.PROG_DIR)
if not silent:
sickrage.app.log.debug("Executing " + ' '.join(cmd) + " with your shell in " + sickrage.MAIN_DIR)
p = subprocess.Popen(cmd, stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.STDOUT,
shell=(sys.platform == 'win32'), cwd=sickrage.PROG_DIR)
shell=(sys.platform == 'win32'), cwd=sickrage.MAIN_DIR)
output, err = p.communicate()
exit_status = p.returncode
......@@ -366,7 +362,8 @@ class UpdateManager(object):
exit_status = 1
if exit_status == 0:
sickrage.app.log.debug(' '.join(cmd) + " : returned successful")
if not silent:
sickrage.app.log.debug(' '.join(cmd) + " : returned successful")
exit_status = 0
else:
sickrage.app.log.debug(' '.join(cmd) + " returned : " + str(output) + ", treat as error for now")
......@@ -379,9 +376,22 @@ class UpdateManager(object):
return "{}/home/update/?pid={}".format(sickrage.app.config.web_root, sickrage.app.pid)
def install_requirements(self):
__, __, exit_status = self._pip_cmd(self._pip_path,
'install --no-cache-dir --user -r {}'.format(sickrage.REQS_FILE))
return (False, True)[exit_status == 0]
for req_file in ['requirements.txt', sickrage.REQS_FILE]:
__, __, exit_status = self._pip_cmd(self._pip_path,
'install --no-cache-dir -r {}'.format(req_file))
if exit_status != 0:
__, __, exit_status = self._pip_cmd(self._pip_path,
'install --no-cache-dir --user -r {}'.format(req_file))
if exit_status == 0:
return True
sickrage.app.log.warning('Unable to update requirements using {req_file}'.format(**{
'req_file': sickrage.REQS_FILE
}))
return False
class GitUpdateManager(UpdateManager):
......@@ -477,8 +487,7 @@ class GitUpdateManager(UpdateManager):
sickrage.app.alerts.message(_('Updater'),
_('Updating SiCKRAGE from GIT servers'))
Notifiers.mass_notify_version_update(self.get_newest_version)
self.install_requirements()
return True
return self.install_requirements()
return False
......@@ -522,8 +531,7 @@ class GitUpdateManager(UpdateManager):
__, __, exit_status = self._git_cmd(self._git_path, 'checkout -f ' + branch)
if exit_status == 0:
self.install_requirements()
return True
return self.install_requirements()
return False
......@@ -556,8 +564,7 @@ class SourceUpdateManager(UpdateManager):
@staticmethod
def _find_installed_version():
with io.open(os.path.join(sickrage.PROG_DIR, 'version.txt')) as f:
return f.read().strip() or ""
return sickrage.version() or ""
def need_update(self):
try:
......@@ -651,7 +658,8 @@ class SourceUpdateManager(UpdateManager):
os.renames(old_path, new_path)
# install requirements
self.install_requirements()
if not self.install_requirements():
return False
except Exception as e:
sickrage.app.log.error("Error while trying to update: {}".format(e))
return False
......
......@@ -21,14 +21,14 @@ from __future__ import unicode_literals
import os
import shutil
import socket
import threading
import ssl
import tornado.locale
from tornado.httpserver import HTTPServer
from tornado.web import Application, RedirectHandler, StaticFileHandler
import sickrage
from sickrage.core.helpers import create_https_certificates, launch_browser
from sickrage.core.helpers import create_https_certificates
from sickrage.core.webserver.api import ApiHandler
from sickrage.core.webserver.routes import Route
from sickrage.core.webserver.views import CalendarHandler, LoginHandler, LogoutHandler
......@@ -172,11 +172,14 @@ class WebServer(object):
# Web Handlers
self.app.add_handlers('.*$', Route.get_routes(sickrage.app.config.web_root))
self.server = HTTPServer(self.app, xheaders=sickrage.app.config.handle_reverse_proxy)
if sickrage.app.config.enable_https: self.server.ssl_options = {
"certfile": sickrage.app.config.https_cert,
"keyfile": sickrage.app.config.https_key
}
# HTTPS Cert/Key object
ssl_ctx = None
if sickrage.app.config.enable_https:
ssl_ctx = ssl.create_default_context(ssl.Purpose.CLIENT_AUTH)
ssl_ctx.load_cert_chain(sickrage.app.config.https_cert, sickrage.app.config.https_key)
# Web Server
self.server = HTTPServer(self.app, ssl_options=ssl_ctx, xheaders=sickrage.app.config.handle_reverse_proxy)
try:
self.server.listen(sickrage.app.config.web_port)
......@@ -193,15 +196,6 @@ class WebServer(object):
"SiCKRAGE :: URL:[{}://{}:{}{}]".format(('http', 'https')[sickrage.app.config.enable_https],
sickrage.app.config.web_host, sickrage.app.config.web_port,
sickrage.app.config.web_root))
# launch browser window
if all([not sickrage.app.no_launch,
sickrage.app.config.launch_browser]) or sickrage.app.config.view_changelog:
threading.Thread(None, lambda: launch_browser(
('http', 'https')[sickrage.app.config.enable_https],
sickrage.app.config.web_host,
sickrage.app.config.web_port
), name="LAUNCH-BROWSER").start()
except socket.error as e:
sickrage.app.log.warning(e.strerror)
raise SystemExit
......
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -31,15 +31,12 @@ from urlparse import urlparse, urljoin
import dateutil.tz
import markdown2
import tornado.gen
import tornado.locale
from concurrent.futures import ThreadPoolExecutor
from mako.exceptions import RichTraceback
from mako.lookup import TemplateLookup
from requests import HTTPError
from tornado.concurrent import run_on_executor
from tornado.escape import json_encode, recursive_unicode
from tornado.gen import coroutine
from tornado.process import cpu_count
from tornado.web import RequestHandler, authenticated
import sickrage
......@@ -87,7 +84,6 @@ from sickrage.providers import NewznabProvider, TorrentRssProvider
class BaseHandler(RequestHandler):
def __init__(self, application, request, **kwargs):
super(BaseHandler, self).__init__(application, request, **kwargs)
self.executor = ThreadPoolExecutor(cpu_count())
self.startTime = time.time()
# template settings
......@@ -202,9 +198,7 @@ class BaseHandler(RequestHandler):
def render(self, template_name, **kwargs):
return self.render_string(template_name, **kwargs)
@run_on_executor
def worker(self, function, **kwargs):
threading.currentThread().setName("TORNADO")
kwargs = recursive_unicode(kwargs)
for arg, value in kwargs.items():
if len(value) == 1:
......@@ -232,17 +226,19 @@ class WebHandler(BaseHandler):
def __init__(self, *args, **kwargs):
super(WebHandler, self).__init__(*args, **kwargs)
@coroutine
@authenticated
@tornado.gen.coroutine
def get(self, *args, **kwargs):
result = yield self.route()
if result: self.write(result)
result = self.route()
if result:
self.write(result)
@coroutine
@authenticated
@tornado.gen.coroutine
def post(self, *args, **kwargs):
result = yield self.route()
if result: self.write(result)
result = self.route()
if result:
self.write(result)
def route(self):
# route -> method obj
......@@ -251,7 +247,8 @@ class WebHandler(BaseHandler):
getattr(self, 'index', None)
)
if method: return self.worker(method, **self.request.arguments)
if method:
return self.worker(method, **self.request.arguments)
def _genericMessage(self, subject, message):
return self.render(
......@@ -2423,8 +2420,8 @@ class HomeAddShows(Home):
showid = i
cur_dir['existing_info'] = (showid, show_name, indexer)
if showid and findCertainShow(showid): cur_dir['added_already'] = True
if showid and findCertainShow(showid):
cur_dir['added_already'] = True
return self.render(
"/home/mass_add_table.mako",
......@@ -2441,23 +2438,17 @@ class HomeAddShows(Home):
indexer, show_dir, indexer_id, show_name = self.split_extra_show(show_to_add)
use_provided_info = False
if indexer_id and indexer and show_name:
use_provided_info = True
else:
use_provided_info = False
# use the given show_dir for the indexer search if available
if not show_dir:
if search_string:
default_show_name = search_string
else:
default_show_name = ''
elif not show_name:
default_show_name = show_name or ''
if not show_dir and search_string:
default_show_name = search_string
elif not show_name and show_dir:
default_show_name = re.sub(r' \(\d{4}\)', '',
os.path.basename(os.path.normpath(show_dir)).replace('.', ' '))
else:
default_show_name = show_name
# carry a list of other dirs if given
if not other_shows:
......@@ -2466,8 +2457,7 @@ class HomeAddShows(Home):
other_shows = [other_shows]
provided_indexer_id = int(indexer_id or 0)
provided_indexer_name = show_name
provided_indexer_name = show_name or ''
provided_indexer = int(indexer or sickrage.app.config.indexer_default)
return self.render(
......@@ -2565,53 +2555,34 @@ class HomeAddShows(Home):
if findCertainShow(int(indexer_id)):
return
location = None
if sickrage.app.config.root_dirs:
root_dirs = sickrage.app.config.root_dirs.split('|')
location = root_dirs[int(root_dirs[0]) + 1]
else:
location = None
if location:
show_dir = os.path.join(location, sanitizeFileName(showName))
dir_exists = makeDir(show_dir)
if not dir_exists:
sickrage.app.log.warning("Unable to create the folder " + show_dir + ", can't add the show")
return
chmod_as_parent(show_dir)
sickrage.app.show_queue.addShow(indexer=1,
indexer_id=int(indexer_id),
showDir=show_dir,
default_status=sickrage.app.config.status_default,
quality=sickrage.app.config.quality_default,
flatten_folders=sickrage.app.config.flatten_folders_default,
subtitles=sickrage.app.config.subtitles_default,
anime=sickrage.app.config.anime_default,
scene=sickrage.app.config.scene_default,
default_status_after=sickrage.app.config.status_default_after,
skip_downloaded=sickrage.app.config.skip_downloaded_default)
sickrage.app.alerts.message(_('Adding Show'), _('Adding the specified show into ') + show_dir)
else:
if not location:
sickrage.app.log.warning("There was an error creating the show, no root directory setting found")
return _('No root directories setup, please go back and add one.')
# done adding show
return self.redirect('/home/')
show_dir = os.path.join(location, sanitizeFileName(showName))
return self.newShow('1|{show_dir}|{indexer_id}|{show_name}'.format(**{
'show_dir': '',
'indexer_id': indexer_id,
'show_name': showName
}))
def addNewShow(self, whichSeries=None, indexerLang=None, rootDir=None, defaultStatus=None,
quality_preset=None, anyQualities=None, bestQualities=None, flatten_folders=None, subtitles=None,
subtitles_sr_metadata=None, fullShowPath=None, other_shows=None, skipShow=None, providedIndexer=None,
anime=None, scene=None, blacklist=None, whitelist=None, defaultStatusAfter=None,
skip_downloaded=None):
skip_downloaded=None, providedName=None):
"""
Receive tvdb id, dir, and other options and create a show from them. If extra show dirs are
provided then it forwards back to newShow, if not it goes to /home.
"""
if indexerLang is None:
indexerLang = sickrage.app.config.indexer_default_language
indexerLang = indexerLang or sickrage.app.config.indexer_default_language
# grab our list of other dirs if given
if not other_shows:
......@@ -2636,12 +2607,12 @@ class HomeAddShows(Home):
return finishAddShow()
# sanity check on our inputs
if not any(