def cache_image(self, image_url): """ Store cache of image in cache dir :param image_url: Source URL """ path = os.path.abspath(os.path.join(sickrage.CACHE_DIR, "images", "imdb_popular")) if not os.path.exists(path): os.makedirs(path) full_path = os.path.join(path, os.path.basename(image_url)) if not os.path.isfile(full_path): download_file(image_url, full_path, session=self.session)
def cache_image(self, image_url): """ Store cache of image in cache dir :param image_url: Source URL """ path = os.path.abspath( os.path.join(sickrage.CACHE_DIR, 'images', 'imdb_popular')) if not os.path.exists(path): os.makedirs(path) full_path = os.path.join(path, os.path.basename(image_url)) if not os.path.isfile(full_path): download_file(image_url, full_path, session=self.session)
def get_anime_list_xml(path): return download_file("https://raw.githubusercontent.com/ScudLee/anime-lists/master/anime-list.xml", path)
def get_anime_list_xml(path): return download_file( "https://raw.githubusercontent.com/ScudLee/anime-lists/master/anime-list.xml", path)