Merge branch 'develop' into tv
This commit is contained in:
@@ -114,7 +114,7 @@ class Renamer(Plugin):
|
||||
return
|
||||
else:
|
||||
for item in no_process:
|
||||
if from_folder in item:
|
||||
if '%s%s' % (from_folder, os.path.sep) in item:
|
||||
log.error('To protect your data, the movie libraries can\'t be inside of or the same as the "from" folder.')
|
||||
return
|
||||
|
||||
@@ -146,7 +146,7 @@ class Renamer(Plugin):
|
||||
|
||||
if movie_folder:
|
||||
for item in no_process:
|
||||
if movie_folder in item:
|
||||
if '%s%s' % (movie_folder, os.path.sep) in item:
|
||||
log.error('To protect your data, the movie libraries can\'t be inside of or the same as the provided movie folder.')
|
||||
return
|
||||
|
||||
|
||||
@@ -78,6 +78,7 @@ class Env(object):
|
||||
return s.get(attr, default = default, section = section, type = type)
|
||||
|
||||
# Set setting
|
||||
s.addSection(section)
|
||||
s.set(section, attr, value)
|
||||
s.save()
|
||||
|
||||
|
||||
@@ -8,6 +8,7 @@ from couchpotato.core.helpers.variable import getDataDir, tryInt
|
||||
from logging import handlers
|
||||
from tornado.httpserver import HTTPServer
|
||||
from tornado.web import Application, StaticFileHandler, RedirectHandler
|
||||
from uuid import uuid4
|
||||
import locale
|
||||
import logging
|
||||
import os.path
|
||||
@@ -146,7 +147,7 @@ def runCouchPotato(options, base_path, args, data_dir = None, log_dir = None, En
|
||||
Env.set('dev', development)
|
||||
|
||||
# Disable logging for some modules
|
||||
for logger_name in ['enzyme', 'guessit', 'subliminal', 'apscheduler']:
|
||||
for logger_name in ['enzyme', 'guessit', 'subliminal', 'apscheduler', 'tornado']:
|
||||
logging.getLogger(logger_name).setLevel(logging.ERROR)
|
||||
|
||||
for logger_name in ['gntp', 'migrate']:
|
||||
@@ -217,6 +218,10 @@ def runCouchPotato(options, base_path, args, data_dir = None, log_dir = None, En
|
||||
Env.set('web_base', web_base)
|
||||
|
||||
api_key = Env.setting('api_key')
|
||||
if not api_key:
|
||||
api_key = uuid4().hex
|
||||
Env.setting('api_key', value = api_key)
|
||||
|
||||
api_base = r'%sapi/%s/' % (web_base, api_key)
|
||||
Env.set('api_base', api_base)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user