xbmcbackup/authorize_cloud.py

24 lines
813 B
Python
Raw Normal View History

import xbmc
import xbmcgui
import xbmcvfs
import resources.lib.utils as utils
from resources.lib.authorizers import DropboxAuthorizer,GoogleDriveAuthorizer
#drobpox
if(utils.getSetting('remote_selection') == '2'):
authorizer = DropboxAuthorizer()
if(authorizer.authorize()):
2017-01-31 15:16:54 +01:00
xbmcgui.Dialog().ok("Backup",utils.getString(30027) + ' ' + utils.getString(30106))
else:
2017-01-31 15:16:54 +01:00
xbmcgui.Dialog().ok("Backup",utils.getString(30107) + ' ' + utils.getString(30027))
#google drive
elif(utils.getSetting('remote_selection') == '3'):
authorizer = GoogleDriveAuthorizer()
if(authorizer.authorize()):
2017-01-31 15:16:54 +01:00
xbmcgui.Dialog().ok("Backup",utils.getString(30098) + ' ' + utils.getString(30106))
else:
2017-01-31 15:16:54 +01:00
xbmcgui.Dialog().ok("Backup",utils.getString(30107) + ' ' + utils.getString(30098))