def update_rym_album(self, args, album_entry):

        self.br.visit(args.rym_album)
        time.sleep(2)

        if info in args.update:

            self.br.find_by_text("Correct this entry").click()
            self.submit_info(album_entry)
            time.sleep(2)

        if keep_cover not in args.update:

            self.br.visit("%s/buy" % args.rym_album)
            time.sleep(1)

            rym_cover_url = self.br.find_by_text("View cover art")["href"]
            rym_cover_path = images.download_cover_art(rym_cover_url, album_entry, rateyourmusic_original=True)

            rym_cover = Image.open(rym_cover_path)
            new_cover = Image.open(album_entry.cover_art_file)

            if new_cover.size[0] > rym_cover.size[0] and new_cover.size[1] > rym_cover.size[1]:

                self.br.visit(args.rym_album)
                time.sleep(3)

                self.br.find_by_text("Upload cover art").click()

                self.upload_cover(args, album_entry)
                time.sleep(2)

            self.br.visit(args.rym_album)
            time.sleep(3)
    def update_rym_album(self, args, album_entry):

        self.br.visit(args.rym_album)
        time.sleep(2)

        if info in args.update:

            self.br.find_by_text('Correct this entry').click()
            self.submit_info(album_entry)
            time.sleep(2)

        if keep_cover not in args.update:

            self.br.visit("%s/buy" % args.rym_album)
            time.sleep(1)

            rym_cover_url = self.br.find_by_text('View cover art')['href']
            rym_cover_path = images.download_cover_art(
                rym_cover_url, album_entry, rateyourmusic_original=True)

            rym_cover = Image.open(rym_cover_path)
            new_cover = Image.open(album_entry.cover_art_file)

            if (new_cover.size[0] > rym_cover.size[0]
                    and new_cover.size[1] > rym_cover.size[1]):

                self.br.visit(args.rym_album)
                time.sleep(3)

                self.br.find_by_text('Upload cover art').click()

                self.upload_cover(args, album_entry)
                time.sleep(2)

            self.br.visit(args.rym_album)
            time.sleep(3)
Beispiel #3
0
    def retrieve_cover_art(self, cover_art):

        self.cover_art_file = images.download_cover_art(cover_art, self)