mirror of
https://github.com/robweber/xbmcbackup.git
synced 2024-12-22 14:05:23 +01:00
fixes per enen92
This commit is contained in:
parent
16e13c7d80
commit
5e2d099448
13
addon.xml
13
addon.xml
@ -80,12 +80,10 @@
|
||||
<description lang="sk_SK">Už ste niekedy poškodili konfiguráciu Kodi a priali si mať zálohu? Teraz môžete - na jeden klik. Môžete exportovať Vašu databázu, playlist, náhľady, doplnky a konfigurácie na ktorýkoľvek zdroj zapisovateľný Kodi. Zálohy môžu byť púšťané na požiadanie alebo plánovačom. </description>
|
||||
<description lang="sv_SE">Har du någonsin tappat bort din Kodi konfiguration och önskat att du hade en backup? Nu kan du enkelt med ett klick. Du kan exportera din databas, spellista, minityrer, tillägg och andra konfigurationsdetaljer till valfri källa som är skrivbar för Kodi. Backupper kan köras på begäran eller via scheman.</description>
|
||||
<description lang="zh_CN">你是否经常折腾你的 Kodi,因而希望能够有个备份?你可以把资料库、播放列表、缩略图、插件和其他配置细节导出到 Kodi 可以写入的任意位置。备份可以按需运行或通过计划任务执行。</description>
|
||||
<language></language>
|
||||
<platform>all</platform>
|
||||
<license>The MIT License</license>
|
||||
<license>MIT</license>
|
||||
<forum>https://forum.kodi.tv/showthread.php?tid=129499</forum>
|
||||
<source>https://github.com/robweber/xbmcbackup</source>
|
||||
<email></email>
|
||||
<assets>
|
||||
<icon>resources/images/icon.png</icon>
|
||||
<screenshot>resources/images/screenshot1.png</screenshot>
|
||||
@ -93,10 +91,11 @@
|
||||
<screenshot>resources/images/screenshot3.png</screenshot>
|
||||
<screenshot>resources/images/screenshot4.png</screenshot>
|
||||
</assets>
|
||||
<news>Version 1.5.2
|
||||
- Added script.module.dropbox import as a dependency for Dropbox filesystem
|
||||
- Fixed issue getting xbmcbackup.val file from non-zipped remote directories. Was being copied as though it was a local file so it was failing.
|
||||
- Use linux path separator (/) all the time, Kodi will interpret this correctly on windows. Was causing issues with remote file systems since os.path.sep
|
||||
<news>Version 1.6.0
|
||||
- Backups/Restores now use the concept of a Set to define groups of related files. Restores can restore one set or all sets within a backup archive (no more all or nothing restores)
|
||||
- Added a new Advanced Editor script for more dynamic included/excluded directories based on a JSON formatted file
|
||||
- Fixed guisettings restores
|
||||
- Removed GoogleDrive support - Python 3 compatibility was an issue
|
||||
</news>
|
||||
</extension>
|
||||
</addon>
|
||||
|
@ -1,4 +1,3 @@
|
||||
import sys
|
||||
import xbmc
|
||||
import xbmcgui
|
||||
import resources.lib.utils as utils
|
||||
|
@ -2,6 +2,7 @@ import json
|
||||
import xbmc
|
||||
import xbmcgui
|
||||
import xbmcvfs
|
||||
import os.path
|
||||
from . import utils as utils
|
||||
|
||||
|
||||
@ -180,14 +181,14 @@ class AdvancedBackupEditor:
|
||||
while(exitCondition != -1):
|
||||
# load the custom paths
|
||||
listItem = xbmcgui.ListItem(utils.getString(30126), '')
|
||||
listItem.setArt({'icon': utils.addon_dir() + 'resources/images/plus-icon.png'})
|
||||
listItem.setArt({'icon': os.path.join(utils.addon_dir(),'resources','images','plus-icon.png')})
|
||||
options = [listItem]
|
||||
|
||||
for index in range(0, len(customPaths.getSets())):
|
||||
aSet = customPaths.getSet(index)
|
||||
|
||||
listItem = xbmcgui.ListItem(aSet['name'], utils.getString(30121) + ': ' + aSet['set']['root'])
|
||||
listItem.setArt({'icon': utils.addon_dir() + 'resources/images/folder-icon.png'})
|
||||
listItem.setArt({'icon': os.path.join(utils.addon_dir(),'resources','images','folder-icon.png')})
|
||||
options.append(listItem)
|
||||
|
||||
# show the gui
|
||||
@ -226,7 +227,7 @@ class AdvancedBackupEditor:
|
||||
shouldContinue = self.dialog.yesno(utils.getString(30139), utils.getString(30140), utils.getString(30141))
|
||||
|
||||
if(shouldContinue):
|
||||
source = xbmc.translatePath(utils.addon_dir() + "/resources/data/default_files.json")
|
||||
dest = xbmc.translatePath(utils.data_dir() + "/custom_paths.json")
|
||||
source = xbmc.translatePath(os.path.join(utils.addon_dir(),'resources','data','default_files.json'))
|
||||
dest = xbmc.translatePath(os.path.join(utils.data_dir(),'custom_paths.json'))
|
||||
|
||||
xbmcvfs.copy(source, dest)
|
||||
|
@ -522,14 +522,12 @@ class XbmcBackup:
|
||||
return result
|
||||
|
||||
def _createResumeBackupFile(self):
|
||||
rFile = xbmcvfs.File(xbmc.translatePath(utils.data_dir() + "resume.txt"), 'w')
|
||||
rFile.write(self.restore_point)
|
||||
rFile.close()
|
||||
with xbmcvfs.File(xbmc.translatePath(utils.data_dir() + "resume.txt"), 'w') as f:
|
||||
f.write(self.restore_point)
|
||||
|
||||
def _readBackupConfig(self, aFile):
|
||||
jFile = xbmcvfs.File(xbmc.translatePath(aFile), 'r')
|
||||
jsonString = jFile.read()
|
||||
jFile.close()
|
||||
with xbmcvfs.File(xbmc.translatePath(aFile), 'r') as f:
|
||||
jsonString = f.read()
|
||||
return json.loads(jsonString)
|
||||
|
||||
|
||||
|
@ -9,4 +9,4 @@ def shorten(aUrl):
|
||||
data = req.read()
|
||||
|
||||
# should be a tiny url
|
||||
return str(data)
|
||||
return data
|
||||
|
Loading…
Reference in New Issue
Block a user