def updateXBMC(self): if xbmc.updateLibrary(): flash.message("Command sent to XBMC to update library") else: flash.error("Unable to contact XBMC") redirect('/home')
def updateXBMC(self): result = xbmc.updateLibrary() if result: message = "Command sent to XBMC to update library" else: message = "Unable to contact XBMC" return _genericMessage("XBMC Library Update", logger.MESSAGE)
with cur_ep.lock: cur_ep.location = ek.ek(os.path.join, dest_path, self._destination_file_name(ep_obj.prettyName())) cur_ep.status = common.Quality.compositeStatus(common.DOWNLOADED, new_ep_quality) cur_ep.saveToDB() # log it to history history.logDownload(ep_obj, self.file_path) # send notifications notifiers.notify(common.NOTIFY_DOWNLOAD, ep_obj.prettyName(True)) # generate nfo/tbn ep_obj.createMetaFiles() ep_obj.saveToDB() # this needs to be factored out into the notifiers if sickbeard.XBMC_UPDATE_LIBRARY: for curHost in [x.strip() for x in sickbeard.XBMC_HOST.split(",")]: # do a per-show update first, if possible if not xbmc.updateLibrary(curHost, showName=ep_obj.show.name) and sickbeard.XBMC_UPDATE_FULL: # do a full update if requested self._log(u"Update of show directory failed on " + curHost + ", trying full update as requested") xbmc.updateLibrary(curHost) # run extra_scripts self._run_extra_scripts(ep_obj) return True # e