Compare commits

..

1 Commits

Author SHA1 Message Date
robweber 4091041351 Sync of addon metadata translations 2023-06-02 14:18:00 +00:00
3 changed files with 8 additions and 18 deletions
-2
View File
@@ -10,7 +10,6 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
- You can now append a suffix to the end of each backup name (folder or zip file). This is only available in the Advanced or Expert settings. - You can now append a suffix to the end of each backup name (folder or zip file). This is only available in the Advanced or Expert settings.
- validation file now saves a list of all installed addons and versions - validation file now saves a list of all installed addons and versions
- prompt to close Kodi at the end of successful restore
### Changed ### Changed
@@ -18,7 +17,6 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
- modified GitHub issue template slightly - modified GitHub issue template slightly
- translations sync - translations sync
- token files are stored in a `.json` instead of a `.txt` file - token files are stored in a `.json` instead of a `.txt` file
- file discovery process now flags directories with an `is_dir` metadata property instead of prefixing with a dash (-). This was done for legacy reasons and there is no reason for it.
### Fixed ### Fixed
@@ -294,7 +294,7 @@ msgid "Restart Kodi"
msgstr "" msgstr ""
msgctxt "#30078" msgctxt "#30078"
msgid "A restart is recommended, select Yes to close Kodi" msgid "You should restart Kodi to continue"
msgstr "" msgstr ""
msgctxt "#30079" msgctxt "#30079"
+7 -15
View File
@@ -285,9 +285,7 @@ class XbmcBackup:
self._createResumeBackupFile() self._createResumeBackupFile()
# do not continue running # do not continue running
if(xbmcgui.Dialog().yesno(utils.getString(30077), utils.getString(30078), autoclose=15000)): xbmcgui.Dialog().ok(utils.getString(30077), utils.getString(30078))
xbmc.executebuiltin('Quit')
return return
# check if settings should be restored from this backup # check if settings should be restored from this backup
@@ -349,11 +347,6 @@ class XbmcBackup:
# call update addons to refresh everything # call update addons to refresh everything
xbmc.executebuiltin('UpdateLocalAddons') xbmc.executebuiltin('UpdateLocalAddons')
# notify user that restart is recommended
if(xbmcgui.Dialog().yesno(utils.getString(30077), utils.getString(30078), autoclose=15000)):
xbmc.executebuiltin('Quit')
def _setupVFS(self, mode=-1, progressOverride=False): def _setupVFS(self, mode=-1, progressOverride=False):
# set windows setting to true # set windows setting to true
window = xbmcgui.Window(10000) window = xbmcgui.Window(10000)
@@ -421,9 +414,9 @@ class XbmcBackup:
if(utils.getSettingBool('verbose_logging')): if(utils.getSettingBool('verbose_logging')):
utils.log('Writing file: ' + aFile['file']) utils.log('Writing file: ' + aFile['file'])
if(aFile['is_dir']): if(aFile['file'].startswith("-")):
self._updateProgress('%s remaining\nwriting %s' % (utils.diskString(self.transferLeft), os.path.basename(aFile['file'][len(source.root_path):]) + "/")) self._updateProgress('%s remaining\nwriting %s' % (utils.diskString(self.transferLeft), os.path.basename(aFile['file'][len(source.root_path):]) + "/"))
dest.mkdir(dest.root_path + aFile['file'][len(source.root_path):]) dest.mkdir(dest.root_path + aFile['file'][len(source.root_path) + 1:])
else: else:
self._updateProgress('%s remaining\nwriting %s' % (utils.diskString(self.transferLeft), os.path.basename(aFile['file'][len(source.root_path):]))) self._updateProgress('%s remaining\nwriting %s' % (utils.diskString(self.transferLeft), os.path.basename(aFile['file'][len(source.root_path):])))
self.transferLeft = self.transferLeft - aFile['size'] self.transferLeft = self.transferLeft - aFile['size']
@@ -433,7 +426,6 @@ class XbmcBackup:
# if result is still true but this file failed # if result is still true but this file failed
if(not wroteFile and result): if(not wroteFile and result):
utils.log("Failed to write " + aFile['file'])
result = False result = False
return result return result
@@ -591,7 +583,7 @@ class FileManager:
def walk(self): def walk(self):
for aDir in self.root_dirs: for aDir in self.root_dirs:
self.addFile(xbmcvfs.translatePath(aDir['path']), True) self.addFile('-' + xbmcvfs.translatePath(aDir['path']))
self.walkTree(xbmcvfs.translatePath(aDir['path']), aDir['recurse']) self.walkTree(xbmcvfs.translatePath(aDir['path']), aDir['recurse'])
def walkTree(self, directory, recurse=True): def walkTree(self, directory, recurse=True):
@@ -613,7 +605,7 @@ class FileManager:
# check if directory is excluded # check if directory is excluded
if(not any(dirPath.startswith(exDir) for exDir in self.exclude_dir)): if(not any(dirPath.startswith(exDir) for exDir in self.exclude_dir)):
self.addFile(dirPath, True) self.addFile("-" + dirPath)
# catch for "non directory" type files # catch for "non directory" type files
shouldWalk = True shouldWalk = True
@@ -636,7 +628,7 @@ class FileManager:
else: else:
self.excludeFile(xbmcvfs.translatePath(dirMeta['path'])) self.excludeFile(xbmcvfs.translatePath(dirMeta['path']))
def addFile(self, filename, is_dir = False): def addFile(self, filename):
# write the full remote path name of this file # write the full remote path name of this file
if(utils.getSettingBool('verbose_logging')): if(utils.getSettingBool('verbose_logging')):
utils.log("Add File: " + filename) utils.log("Add File: " + filename)
@@ -645,7 +637,7 @@ class FileManager:
fSize = self.vfs.fileSize(filename) fSize = self.vfs.fileSize(filename)
self.totalSize = self.totalSize + fSize self.totalSize = self.totalSize + fSize
self.fileArray.append({'file': filename, 'size': fSize, 'is_dir': is_dir}) self.fileArray.append({'file': filename, 'size': fSize})
def excludeFile(self, filename): def excludeFile(self, filename):
# remove trailing slash # remove trailing slash