Esempio n. 1
0

if protocol == 1:
    protocol = 'https://'
else:
    protocol = 'http://'


# you need to have at least a username&password set
if ((username == '' or password == '')):
    xbmcgui.Dialog().ok(ADDON.getLocalizedString(30000), ADDON.getLocalizedString(30015))
    log(ADDON.getLocalizedString(30015), True)
    xbmcplugin.endOfDirectory(plugin_handle)


owncloud = owncloud.owncloud(username, password, protocol, domain, auth, session, user_agent)


log('plugin url: ' + plugin_url)
log('plugin queries: ' + str(plugin_queries))
log('plugin handle: ' + str(plugin_handle))

mode = plugin_queries['mode']

#dump a list of videos available to play
if mode == 'main' or mode == 'folder':
    log(mode)

    cacheType = int(ADDON.getSetting('playback_type'))

    folderID=0
Esempio n. 2
0
            count = count + 1

    else:
        # show index of accounts
        if instanceName == '' and numberOfAccounts == 1:

                count = 1
                max_count = int(addon.getSetting(PLUGIN_NAME+'_numaccounts'))
                while True:
                    instanceName = PLUGIN_NAME+str(count)
                    try:
                        username = addon.getSetting(instanceName+'_username')
                        if username != '':

                            #let's log in
                            oc = owncloud.owncloud(PLUGIN_URL,addon,instanceName, user_agent)

                    except:
                        break

                    if count == max_count:
                        break
                    count = count + 1

        # no accounts defined
        elif numberOfAccounts == 0:

            #legacy account conversion
            try:
                username = addon.getSetting('username')
Esempio n. 3
0
            count = count + 1

    else:
        # show index of accounts
        if instanceName == '' and numberOfAccounts == 1:

            count = 1
            max_count = int(addon.getSetting(PLUGIN_NAME + '_numaccounts'))
            while True:
                instanceName = PLUGIN_NAME + str(count)
                try:
                    username = addon.getSetting(instanceName + '_username')
                    if username != '':

                        #let's log in
                        oc = owncloud.owncloud(PLUGIN_URL, addon, instanceName,
                                               user_agent)

                except:
                    break

                if count == max_count:
                    break
                count = count + 1

        # no accounts defined
        elif numberOfAccounts == 0:

            #legacy account conversion
            try:
                username = addon.getSetting('username')