Merge branch 'refs/heads/develop' into tv
Conflicts: couchpotato/core/media/movie/_base/main.py couchpotato/core/media/movie/library/movie/main.py couchpotato/core/plugins/dashboard/main.py couchpotato/core/plugins/profile/main.py couchpotato/core/plugins/release/main.py couchpotato/core/plugins/suggestion/main.py
This commit is contained in:
commit
cce0a8ec62
120 files changed
+4428
-1660
No files matched your search
@@ -1,13 +1,10 @@
|
||||
from __future__ import with_statement
|
||||
from couchpotato.api import addApiView
|
||||
from couchpotato.core.event import addEvent, fireEvent
|
||||
from couchpotato.core.helpers.encoding import isInt, toUnicode
|
||||
from couchpotato.core.helpers.encoding import toUnicode
|
||||
from couchpotato.core.helpers.variable import mergeDicts, tryInt, tryFloat
|
||||
from couchpotato.core.settings.model import Properties
|
||||
import ConfigParser
|
||||
import os.path
|
||||
import time
|
||||
import traceback
|
||||
|
||||
|
||||
class Settings(object):
|
||||
@@ -75,7 +72,9 @@ class Settings(object):
|
||||
addEvent('settings.register', self.registerDefaults)
|
||||
addEvent('settings.save', self.save)
|
||||
|
||||
def registerDefaults(self, section_name, options = {}, save = True):
|
||||
def registerDefaults(self, section_name, options = None, save = True):
|
||||
if not options: options = {}
|
||||
|
||||
self.addSection(section_name)
|
||||
|
||||
for option_name, option in options.iteritems():
|
||||
@@ -92,7 +91,7 @@ class Settings(object):
|
||||
self.setType(section_name, option_name, option.get('type'))
|
||||
|
||||
if save:
|
||||
self.save(self)
|
||||
self.save()
|
||||
|
||||
def set(self, section, option, value):
|
||||
return self.p.set(section, option, value)
|
||||
|
||||
@@ -240,7 +240,10 @@ class Release(Entity):
|
||||
files = ManyToMany('File')
|
||||
info = OneToMany('ReleaseInfo', cascade = 'all, delete-orphan')
|
||||
|
||||
def to_dict(self, deep = {}, exclude = []):
|
||||
def to_dict(self, deep = None, exclude = None):
|
||||
if not exclude: exclude = []
|
||||
if not deep: deep = {}
|
||||
|
||||
orig_dict = super(Release, self).to_dict(deep = deep, exclude = exclude)
|
||||
|
||||
new_info = {}
|
||||
@@ -302,7 +305,10 @@ class Profile(Entity):
|
||||
media = OneToMany('Media')
|
||||
types = OneToMany('ProfileType', cascade = 'all, delete-orphan')
|
||||
|
||||
def to_dict(self, deep = {}, exclude = []):
|
||||
def to_dict(self, deep = None, exclude = None):
|
||||
if not exclude: exclude = []
|
||||
if not deep: deep = {}
|
||||
|
||||
orig_dict = super(Profile, self).to_dict(deep = deep, exclude = exclude)
|
||||
orig_dict['core'] = orig_dict.get('core') or False
|
||||
orig_dict['hide'] = orig_dict.get('hide') or False
|
||||
|
||||
Reference in new issue
Block a user