Example #1
0
def run_addon(addon_url='?'):
    addon.addon_main("addon.py", "123", addon_url)
    print[e[1] for e in xbmcplugin.dirItems]
    for handle, url, listitem, isFolder in xbmcplugin.dirItems:
        args = urlparse.parse_qs(url[9:])
        mode = args.get('mode', [None])[0]
        folder_url = args.get('folderurl', [None])[0]
        folder_title = args.get('title', [None])[0]
        folder_level = int(args.get('level', '0')[0])
        folder_name = args.get('name', [None])[0]

        if mode == 'play' and file_exists(folder_url):
            continue

        if ((mode == 'lastvids+next') and (folder_level < 2)) \
                or ((mode == 'lastvids+archive') and (folder_level < 3))\
                or (mode == 'tvshows'):
            run_addon(url[8:])
Example #2
0
#!/usr/bin/python
# -*- coding: utf-8 -*-
#
#   Copyright (c) 2011 XBMC-Russia, HD-lab Team, E-mail: [email protected]
#   Writer (c) 12/03/2011, Kostynoy S.A., E-mail: [email protected]
#
#   This Program is free software; you can redistribute it and/or modify
#   it under the terms of the GNU General Public License as published by
#   the Free Software Foundation; either version 2, or (at your option)
#   any later version.
#
#   This Program is distributed in the hope that it will be useful,
#   but WITHOUT ANY WARRANTY; without even the implied warranty of
#   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
#   GNU General Public License for more details.
#
#   You should have received a copy of the GNU General Public License
#   along with this program; see the file COPYING.  If not, write to
#   the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
#   http://www.gnu.org/licenses/gpl.html

import sys, os

sys.path.append(os.path.join(os.getcwd().replace(';', ''), 'resources', 'lib'))

if (__name__ == "__main__" ):
	import addon
	addon.addon_main()
Example #3
0
#!/usr/bin/python
# -*- coding: utf-8 -*-
#
#   Copyright (c) 2011 XBMC-Russia, HD-lab Team, E-mail: [email protected]
#   Writer (c) 12/03/2011, Kostynoy S.A., E-mail: [email protected]
#
#   This Program is free software; you can redistribute it and/or modify
#   it under the terms of the GNU General Public License as published by
#   the Free Software Foundation; either version 2, or (at your option)
#   any later version.
#
#   This Program is distributed in the hope that it will be useful,
#   but WITHOUT ANY WARRANTY; without even the implied warranty of
#   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
#   GNU General Public License for more details.
#
#   You should have received a copy of the GNU General Public License
#   along with this program; see the file COPYING.  If not, write to
#   the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
#   http://www.gnu.org/licenses/gpl.html

import sys, os

sys.path.append(os.path.join(os.getcwd().replace(';', ''), 'resources', 'lib'))

if (__name__ == "__main__"):
    import addon
    addon.addon_main()