Ejemplo n.º 1
0
def githubSelect(name):
    import githubissues
    githubissues.run('xibalba10/plugin.video.xxx-o-dus', '%s' % name)
    file = xbmc.translatePath(os.path.join(kodi.datafolder, '%s-issues-%s.csv' % (kodi.get_id(),name)))
    
    global msg_text
    
    with open(file,mode='r')as f: txt = f.read()
    items = re.findall('<item>(.+?)</item>', txt, re.DOTALL)
    if len(items) < 1:
        msg_text = kodi.giveColor('No %s issues with XXX-O-DUS at this time.' % name.title(),'deeppink',True)
    else:
        msg_text = kodi.giveColor('%s Issues with XXX-O-DUS\n' % name.title(),'deeppink',True) + kodi.giveColor('Report Issues @ https://github.com/xibalba10/plugin.video.xxx-o-dus/issues','white',True) + '\n---------------------------------\n\n'
        for item in items:
            id = re.findall('<id>([^<]+)', item)[0]
            user = re.findall('<username>([^<]+)', item)[0]
            label = re.findall('<label>([^<]+)', item)[0]
            title = re.findall('<title>([^<]+)', item)[0]
            body = re.findall('<body>([^<]+)', item)[0]
            created = re.findall('<created>([^<]+)', item)[0]
            date,time = created.split('T')
            msg_text += '[B]ID: %s | Label: %s \nBy: %s on %s at %s[/B] \n\nTitle: %s \nMessage %s \n\n---------------------------------\n\n' \
                         % (id, \
                            kodi.githubLabel(label), \
                            user, \
                            date, \
                            time.replace('Z',''), \
                            title, \
                            body)
Ejemplo n.º 2
0
def githubIssues():

    choice = xbmcgui.Dialog().yesno(
        "[COLOR red]Please select an option[/COLOR]",
        "Would you like to view open issues or closed issues?",
        yeslabel='Closed',
        nolabel='Open')

    import githubissues
    if choice == 0: name = 'open'
    elif choice == 1: name = 'closed'
    else: quit()
    githubissues.run('Colossal1/plugin.video.ourmatch', '%s' % name)
    file = xbmc.translatePath(
        os.path.join(kodi.datafolder,
                     '%s-issues-%s.csv' % (kodi.get_id(), name)))

    with open(file, mode='r') as f:
        txt = f.read()
    items = re.findall('<item>(.+?)</item>', txt, re.DOTALL)
    if (not items) or (len(items) < 1):
        msg_text = kodi.giveColor(
            'No %s issues with Our Match at this time.' % name.title(), 'blue',
            True)
    else:
        msg_text = kodi.giveColor(
            '%s Issues with Our Match\n' % name.title(), 'blue', True
        ) + kodi.giveColor(
            'Report Issues @ https://github.com/Colossal1/plugin.video.ourmatch/issues',
            'white', True) + '\n---------------------------------\n\n'
        for item in items:
            try:
                id = re.findall('<id>([^<]+)', item)[0]
            except:
                id = 'Unknown'
            try:
                user = re.findall('<username>([^<]+)', item)[0]
            except:
                user = '******'
            try:
                label = re.findall('<label>([^<]+)', item)[0]
            except:
                label = 'Unknown'
            try:
                title = re.findall('<title>([^<]+)', item)[0]
            except:
                title = 'Unknown'
            try:
                body = re.findall('<body>([^<]+)', item)[0]
            except:
                body = 'Unknown'
            try:
                created = re.findall('<created>([^<]+)', item)[0]
                date, time = created.split('T')
            except:
                date = 'Unknown'
                time = 'Unknwon'
            msg_text += '[B]ID: %s | Label: %s \nBy: %s on %s at %s[/B] \n\nTitle: %s \nMessage %s \n\n---------------------------------\n\n' \
                         % (id, \
                            kodi.githubLabel(label), \
                            user, \
                            date, \
                            time.replace('Z',''), \
                            title, \
                            body)
    textboxGit('OurMatch Issues', msg_text)