示例#1
0
    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)
示例#2
0
    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)
示例#3
0
def get_anime_list_xml(path):
    return download_file("https://raw.githubusercontent.com/ScudLee/anime-lists/master/anime-list.xml", path)
示例#4
0
def get_anime_list_xml(path):
    return download_file(
        "https://raw.githubusercontent.com/ScudLee/anime-lists/master/anime-list.xml",
        path)