Ejemplo n.º 1
0
def _run(plugin, endpoint, **items):
    '''Returns a RunPlugin string for use in a context menu.

    :param endpoint: The endpoint to be used with playlists.url_for().
    :param **items: Any keyword args to be passed to playlists.url_for().
    '''
    return actions.background(plugin.url_for(endpoint, **items))
Ejemplo n.º 2
0
def ClearPlaylists(item=""):
    if item == "":
        label = '[COLOR yellow]Xóa hết Playlists[/COLOR]'
    else:
        label = '[COLOR yellow]Xóa "%s"[/COLOR]' % item

    return (label,
            actions.background("%s/remove-playlists/%s" %
                               (pluginrootpath, urllib.quote_plus(item))))
Ejemplo n.º 3
0
def ClearPlaylists(item=""):
	if item == "":
		label = '[COLOR yellow]Xóa hết Playlists[/COLOR]'
	else:
		label = '[COLOR yellow]Xóa "%s"[/COLOR]' % item

	return (label, actions.background(
		"%s/remove-playlists/%s" % (pluginrootpath, urllib.quote_plus(item))
	))
Ejemplo n.º 4
0
 def test_background(self):
     expected = 'RunPlugin(plugin://plugin.video.hellokodi/script.py)'
     actual = background('plugin://plugin.video.hellokodi/script.py')
     self.assertEqual(actual, expected)