Esempio n. 1
0
def updateAll():
    if common.updateRunning():
        return

    cj = common.mechanizeLogin()
    if not cj:
        return

    import movies
    import tv
    from datetime import datetime

    common.addon.setSetting('update_running', datetime.today().strftime('%Y-%m-%d %H:%M'))
    common.Log('Starting DBUpdate')
    Notif = xbmcgui.Dialog().notification
    Notif(common.__plugin__, common.getString(30106), sound=False)
    tv.addTVdb(False, cj=cj)
    movies.addMoviesdb(False, cj=cj)
    NewAsins = common.getCategories()
    movies.setNewest(NewAsins)
    tv.setNewest(NewAsins)
    movies.updateFanart()
    tv.updateFanart()
    common.addon.setSetting('last_update', datetime.today().strftime('%Y-%m-%d'))
    common.addon.setSetting('update_running', 'false')
    Notif(common.__plugin__, common.getString(30126), sound=False)
    common.Log('DBUpdate finished')
Esempio n. 2
0
def updateAll():
    import movies
    import tv
    from datetime import datetime
    common.addon.setSetting('update_running', datetime.today().strftime('%Y-%m-%d %H:%M'))
    Notif = xbmcgui.Dialog().notification
    Notif(common.__plugin__, common.getString(30106), sound = False)
    tv.addTVdb(full_update = False)
    movies.addMoviesdb(full_update = False)
    NewAsins = common.getNewest()
    movies.setNewest(NewAsins)
    movies.updateFanart()
    tv.setNewest(NewAsins)
    tv.updateFanart()
    common.addon.setSetting('last_update', datetime.today().strftime('%Y-%m-%d'))
    common.addon.setSetting('update_running', 'false')
    Notif(common.__plugin__, common.getString(30126), sound = False)
Esempio n. 3
0
def updateAll():
    if common.updateRunning(): return
    import movies
    import tv
    from datetime import datetime
    common.addon.setSetting('update_running', datetime.today().strftime('%Y-%m-%d %H:%M'))
    common.Log('Starting DBUpdate')
    Notif = xbmcgui.Dialog().notification
    Notif(common.__plugin__, common.getString(30106), sound = False)
    tv.addTVdb(False)
    movies.addMoviesdb(False)
    NewAsins = common.getCategories()
    movies.setNewest(NewAsins)
    movies.updateFanart()
    tv.setNewest(NewAsins)
    tv.updateFanart()
    common.addon.setSetting('last_update', datetime.today().strftime('%Y-%m-%d'))
    common.addon.setSetting('update_running', 'false')
    Notif(common.__plugin__, common.getString(30126), sound = False)
    common.Log('DBUpdate finished')
Esempio n. 4
0
def updateAll():
    from service import updateRunning
    from datetime import datetime

    if updateRunning():
        return

    writeConfig('update_running', datetime.today().strftime('%Y-%m-%d %H:%M'))

    cj = MechanizeLogin()
    if not cj:
        writeConfig('update_running', 'false')
        return

    import movies
    import tv

    Log('Starting DBUpdate')
    Notif(getString(30106))
    xbmc.executebuiltin('Container.Refresh')

    tvresult = tv.addTVdb(False, cj=cj)
    mvresult = movies.addMoviesdb(False, cj=cj)
    NewAsins = getCategories()

    if tvresult and mvresult:
        writeConfig('last_update', datetime.today().strftime('%Y-%m-%d'))

    if mvresult:
        movies.setNewest(NewAsins)
        movies.updateFanart()
    if tvresult:
        tv.setNewest(NewAsins)
        tv.updateFanart()

    writeConfig('update_running', 'false')
    if xbmc.getInfoLabel(
            'Container.FolderPath') == 'plugin://plugin.video.amazon/':
        xbmc.executebuiltin('Container.Refresh')
    Notif(getString(30126))
    Log('DBUpdate finished')
Esempio n. 5
0
def updateAll():
    from service import updateRunning
    from datetime import datetime

    if updateRunning():
        return

    writeConfig('update_running', datetime.today().strftime('%Y-%m-%d %H:%M'))

    cj = MechanizeLogin()
    if not cj:
        writeConfig('update_running', 'false')
        return

    import movies
    import tv

    Log('Starting DBUpdate')
    Notif(getString(30106))
    xbmc.executebuiltin('Container.Refresh')

    tvresult = tv.addTVdb(False, cj=cj)
    mvresult = movies.addMoviesdb(False, cj=cj)
    NewAsins = getCategories()

    if tvresult and mvresult:
        writeConfig('last_update', datetime.today().strftime('%Y-%m-%d'))

    if mvresult:
        movies.setNewest(NewAsins)
        movies.updateFanart()
    if tvresult:
        tv.setNewest(NewAsins)
        tv.updateFanart()

    writeConfig('update_running', 'false')
    if xbmc.getInfoLabel('Container.FolderPath') == 'plugin://plugin.video.amazon/':
        xbmc.executebuiltin('Container.Refresh')
    Notif(getString(30126))
    Log('DBUpdate finished')
Esempio n. 6
0
def updateAll():
    if common.updateRunning():
        return
    import movies
    import tv
    from datetime import datetime

    common.addon.setSetting("update_running", datetime.today().strftime("%Y-%m-%d %H:%M"))
    common.Log("Starting DBUpdate")
    Notif = xbmcgui.Dialog().notification
    Notif(common.__plugin__, common.getString(30106), sound=False)
    tv.addTVdb(False)
    movies.addMoviesdb(False)
    NewAsins = common.getCategories()
    movies.setNewest(NewAsins)
    movies.updateFanart()
    tv.setNewest(NewAsins)
    tv.updateFanart()
    common.addon.setSetting("last_update", datetime.today().strftime("%Y-%m-%d"))
    common.addon.setSetting("update_running", "false")
    Notif(common.__plugin__, common.getString(30126), sound=False)
    common.Log("DBUpdate finished")