mirror of
https://github.com/robweber/xbmcbackup.git
synced 2025-06-23 19:14:33 +02:00
Update for Leia (#117)
* updated addon.xml for Krypton * default log level is always debug now * added screenshots per krypton format * started new way of defining backup directories * reconfigured simple backup process * added an advanced backup editor and combined settings.xml scripts into a launcher * added strings for advanced editor * there was a function to do this * match excluded with regex * updated def for the addons set * directory has to end in slash to use exists() * added a backup set chooser on restore * added string for restore browser * utilize details to show root folder and icons * save non translated paths, better cross platform support * revert dropbox python 2.6 changes * start of #132 * can't have duplicate ids * updated strings * closes #132 * added a disclaimer for breaking changes * split backup and restore into separate functions * updated scripting to pass in list of sets to restore * beta version * added 2 min delay in startup - part of #147 * forgot to remove debug message * change to wait for abort in case someone tries to close Kodi * add retroplayer game saves to default file list * display restore points with most recent on top * remove length check, breaking change with this version means old archives are no longer compatible * format restore list according to regional settings * this function isn't used anymore, legacy of old file manager * use images folder as default * added note about compatibility * added utils function for regional date, use for scheduler notifications as well * add/remove include and exclude directories to a set * paths should have / at the end * show path relative to root * if in advanced mode allow jumping to editor from launch screen * check that path is within root folder of set * cannot have duplicate set names or rules regarding folders within a set * put strings in correct lang file * beta version bump * accidentally deleted string id * change exclude criteria. Regex was not matching in complex cases * make sure the dest folder (backup set root) exists before writing to it * modify select display to show recursive value for included folders * use a context menu here * added ability to toggle recursion of sub folders * beta 3 * added support doc * wrong branch * don't need this import anymore * don't need these imports * part of #133
This commit is contained in:
@ -511,9 +511,5 @@ def _params_to_urlencoded(params):
|
||||
else:
|
||||
return str(o).encode('utf-8')
|
||||
|
||||
#fix for python 2.6
|
||||
utf8_params = {}
|
||||
for k,v in six.iteritems(params):
|
||||
utf8_params[encode(k)] = encode(v)
|
||||
|
||||
utf8_params = {encode(k): encode(v) for k, v in six.iteritems(params)}
|
||||
return url_encode(utf8_params)
|
||||
|
@ -237,12 +237,11 @@ class StoneToPythonPrimitiveSerializer(StoneSerializerBase):
|
||||
def encode_map(self, validator, value):
|
||||
validated_value = validator.validate(value)
|
||||
|
||||
#fix for python 2.6
|
||||
result = {}
|
||||
for key, value in validated_value.items():
|
||||
result[self.encode_sub(validator.key_validator,key)] = self.encode_sub(validator.value_validator, value)
|
||||
|
||||
return result
|
||||
return {
|
||||
self.encode_sub(validator.key_validator, key):
|
||||
self.encode_sub(validator.value_validator, value) for
|
||||
key, value in validated_value.items()
|
||||
}
|
||||
|
||||
def encode_nullable(self, validator, value):
|
||||
if value is None:
|
||||
@ -831,12 +830,11 @@ def _decode_list(
|
||||
if not isinstance(obj, list):
|
||||
raise bv.ValidationError(
|
||||
'expected list, got %s' % bv.generic_type_name(obj))
|
||||
|
||||
result = []
|
||||
for item in obj:
|
||||
result.append(_json_compat_obj_decode_helper(data_type.item_validator, item, alias_validators, strict,old_style, for_msgpack))
|
||||
|
||||
return result
|
||||
return [
|
||||
_json_compat_obj_decode_helper(
|
||||
data_type.item_validator, item, alias_validators, strict,
|
||||
old_style, for_msgpack)
|
||||
for item in obj]
|
||||
|
||||
|
||||
def _decode_map(
|
||||
@ -848,12 +846,15 @@ def _decode_map(
|
||||
if not isinstance(obj, dict):
|
||||
raise bv.ValidationError(
|
||||
'expected dict, got %s' % bv.generic_type_name(obj))
|
||||
|
||||
result = {}
|
||||
for key, value in obj.items():
|
||||
result[_json_compat_obj_decode_helper(data_type.key_validator, key, alias_validators, strict,old_style, for_msgpack)] = _json_compat_obj_decode_helper(data_type.value_validator, value, alias_validators, strict,old_style, for_msgpack)
|
||||
|
||||
return result
|
||||
return {
|
||||
_json_compat_obj_decode_helper(
|
||||
data_type.key_validator, key, alias_validators, strict,
|
||||
old_style, for_msgpack):
|
||||
_json_compat_obj_decode_helper(
|
||||
data_type.value_validator, value, alias_validators, strict,
|
||||
old_style, for_msgpack)
|
||||
for key, value in obj.items()
|
||||
}
|
||||
|
||||
|
||||
def _decode_nullable(
|
||||
|
@ -422,13 +422,10 @@ class Map(Composite):
|
||||
def validate(self, val):
|
||||
if not isinstance(val, dict):
|
||||
raise ValidationError('%r is not a valid dict' % val)
|
||||
|
||||
#fix for python 2.6
|
||||
result = {}
|
||||
for key, value in val.items():
|
||||
result[self.key_validator.validate(key)] = self.value_validator.validate(value)
|
||||
|
||||
return result
|
||||
return {
|
||||
self.key_validator.validate(key):
|
||||
self.value_validator.validate(value) for key, value in val.items()
|
||||
}
|
||||
|
||||
|
||||
class Struct(Composite):
|
||||
|
Reference in New Issue
Block a user