Beispiel #1
0
def history_delete():
    if not kodi.arg('id'): return
    from libs.database import DB
    DB.execute("DELETE FROM search_history WHERE search_id=?",
               [kodi.arg('id')])
    DB.commit()
    kodi.refresh()
Beispiel #2
0
def new_feed():
	from libs.database import DB
	url = kodi.dialog_input('Feed URL')
	if not url: return
	DB.execute("INSERT INTO feed_subscriptions(url) VALUES(?)", [url])
	DB.commit()
	kodi.refresh()
Beispiel #3
0
def new_feed():
	from libs.database import DB
	url = kodi.dialog_input('Feed URL')
	if not url: return
	DB.execute("INSERT INTO feed_subscriptions(url) VALUES(?)", [url])
	DB.commit()
	kodi.refresh()
Beispiel #4
0
def delete_feed():
    if not kodi.dialog_confirm('Delete Feed?', kodi.arg('title'),
                               "Click YES to proceed."):
        return
    from libs.database import DB
    DB.execute("DELETE FROM feed_subscriptions WHERE feed_id=?",
               [kodi.arg('id')])
    DB.commit()
    kodi.refresh()
Beispiel #5
0
def execute_api():
    api = kodi.arg('api', decode='json')
    if 'confirm' in api and api['confirm']:
        message = api['message'] if 'message' in api else ''
        if not kodi.dialog_confirm("Click Yes to proceed.", api['confirm'],
                                   message):
            return
    response = core.execute_api(globals(), api)
    if 'notify' in api and api['notify']:
        kodi.notify('API Response', response)
    if 'refresh' in api and api['refresh']:
        kodi.refresh()
Beispiel #6
0
def uninstall_scraper():
    if kodi.dialog_confirm("Click YES to proceed", "Uninstall scraper?",
                           kodi.args['name']):
        scrapecore.delete_scraper(kodi.args['service'])
        kodi.refresh()
Beispiel #7
0
def toggle_scraper():
    if kodi.get_setting(kodi.arg('service') + '_enable') == 'true':
        kodi.set_setting(kodi.arg('service') + '_enable', 'false')
    else:
        kodi.set_setting(kodi.arg('service') + '_enable', 'true')
    kodi.refresh()
Beispiel #8
0
def history_delete():
	if not kodi.arg('id'): return
	from libs.database import DB
	DB.execute("DELETE FROM search_history WHERE search_id=?", [kodi.arg('id')])
	DB.commit()	
	kodi.refresh()
Beispiel #9
0
def delete_feed():
	if not kodi.dialog_confirm('Delete Feed?', kodi.arg('title'), "Click YES to proceed."): return
	from libs.database import DB
	DB.execute("DELETE FROM feed_subscriptions WHERE feed_id=?", [kodi.arg('id')])
	DB.commit()
	kodi.refresh()