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