def verifySuperSearch(): dst = os.path.join(xbmc.translatePath(ROOT), 'Search') src = os.path.join(HOME, 'resources', 'Search', FILENAME) try: os.makedirs(dst) except: pass dst = os.path.join(dst, FILENAME) if not os.path.exists(dst): try: import shutil shutil.copyfile(src, dst) except: pass return import favourite new = favourite.getFavourites(src, validate=False) line1 = GETTEXT(30123) line2 = GETTEXT(30124) for item in new: fave, index, nFaves = favourite.findFave(dst, item[2]) if index < 0: line = line1 % item[0] if DialogYesNo(line1=line, line2=line2): favourite.addFave(dst, item)
def verifySuperSearch(): src = os.path.join(xbmc.translatePath(ROOT), 'Search') dst = os.path.join(xbmc.translatePath(ROOT), 'S') renameFolder(src, dst) dst = os.path.join(xbmc.translatePath(ROOT), 'S') src = os.path.join(HOME, 'resources', 'Search', FILENAME) try: os.makedirs(dst) except: pass dst = os.path.join(dst, FILENAME) if not os.path.exists(dst): try: import shutil shutil.copyfile(src, dst) except: pass return try: #patch any changes ch1 = open(dst, 'r') xml = ch1.read() ch1.close() xml = xml.replace('1channel/?mode=7000', '1channel/?mode=Search') xml = xml.replace('plugin.video.genesis/?action=actors_movies', 'plugin.video.genesis/?action=people_movies') xml = xml.replace('plugin.video.genesis/?action=actors_shows', 'plugin.video.genesis/?action=people_shows') ch1 = open(dst, 'w') ch1.write(xml) ch1.close() except: pass import favourite new = favourite.getFavourites(src, validate=False) line1 = GETTEXT(30123) line2 = GETTEXT(30124) for item in new: fave, index, nFaves = favourite.findFave(dst, item[2]) if index < 0: line = line1 % item[0] if DialogYesNo(line1=line, line2=line2): favourite.addFave(dst, item)
def verifySuperSearch(): old = os.path.join(ROOT, 'Search') dst = os.path.join(ROOT, 'S') sfile.rename(old, dst) try: sfile.makedirs(dst) except: pass src = os.path.join(HOME, 'resources', 'search', FILENAME) dst = os.path.join(dst, FILENAME) if not sfile.exists(dst): sfile.copy(src, dst) try: #patch any changes xml = sfile.read(dst) xml = xml.replace('is/?action=movies_search&', 'is/?action=movieSearch&') xml = xml.replace('is/?action=people_movies&', 'is/?action=moviePerson&') xml = xml.replace('is/?action=shows_search&', 'is/?action=tvSearch&') xml = xml.replace('is/?action=people_shows&', 'is/?action=tvPerson&') f = sfile.file(dst, 'w') f.write(xml) f.close() except: pass import favourite new = favourite.getFavourites(src, validate=False) #line1 = GETTEXT(30123) #line2 = GETTEXT(30124) for item in new: fave, index, nFaves = favourite.findFave(dst, item[2]) if index < 0: #line = line1 % item[0] #if DialogYesNo(line1=line, line2=line2): favourite.addFave(dst, item)
def verifySuperSearch(): src = os.path.join(ROOT, 'Search') dst = os.path.join(ROOT, 'S') sfile.rename(src, dst) dst = os.path.join(ROOT, 'S') src = os.path.join(HOME, 'resources', 'Search', FILENAME) try: sfile.makedirs(dst) except: pass dst = os.path.join(dst, FILENAME) if not sfile.exists(dst): sfile.copy(src, dst) try: #patch any changes xml = sfile.read(dst) xml = xml.replace('1channel/?mode=7000', '1channel/?mode=Search') xml = xml.replace('plugin.video.genesis/?action=actors_movies', 'plugin.video.genesis/?action=people_movies') xml = xml.replace('plugin.video.genesis/?action=actors_shows', 'plugin.video.genesis/?action=people_shows') f = sfile.file(dst, 'w') f.write(xml) f.close() except: pass import favourite new = favourite.getFavourites(src, validate=False) line1 = GETTEXT(30123) line2 = GETTEXT(30124) for item in new: fave, index, nFaves = favourite.findFave(dst, item[2]) if index < 0: line = line1 % item[0] if DialogYesNo(line1=line, line2=line2): favourite.addFave(dst, item)
def pasteCapture(cmd, folder): thumb = xbmcgui.Window(10000).getProperty('SF_THUMB') name = xbmcgui.Window(10000).getProperty('SF_LABEL') file = os.path.join(folder, FILENAME) copy = [name, thumb, cmd] return favourite.addFave(file, copy)
def verifySuperSearch(): src = os.path.join(ROOT, "Search") dst = os.path.join(ROOT, "S") sfile.rename(src, dst) dst = os.path.join(ROOT, "S") src = os.path.join(HOME, "resources", "Search", FILENAME) try: sfile.makedirs(dst) except: pass dst = os.path.join(dst, FILENAME) if not sfile.exists(dst): sfile.copy(src, dst) try: # patch any changes xml = sfile.read(dst) xml = xml.replace("1channel/?mode=7000", "1channel/?mode=Search") xml = xml.replace("plugin.video.genesis/?action=actors_movies", "plugin.video.genesis/?action=people_movies") xml = xml.replace("plugin.video.genesis/?action=actors_shows", "plugin.video.genesis/?action=people_shows") f = sfile.file(dst, "w") f.write(xml) f.close() except: pass import favourite new = favourite.getFavourites(src, validate=False) line1 = GETTEXT(30123) line2 = GETTEXT(30124) for item in new: fave, index, nFaves = favourite.findFave(dst, item[2]) if index < 0: line = line1 % item[0] if DialogYesNo(line1=line, line2=line2): favourite.addFave(dst, item)
def add(keyword, image, fanart): if not exists(): try: sfile.makedirs(FILEPATH) except: pass if contains(keyword): return False newFave = [] newFave.append(keyword) newFave.append(image) newFave.append('%s?sf_options=fanart=%s_options_sf' % (keyword, urllib.quote_plus(fanart))) return favourite.addFave(FILENAME, newFave)