def run(self):
     logger.info("Started at {}".format(time.time()))
     start_time = []
     self.create_dirs()
     for i in range(len(self.audio_files)):
         if not self.should_continue:
             return
         start_time.append(time.time())
         logger.debug("{}: starting subprocess {}".format(time.time(), i))
         cover_art_stream = ("" if self.cover is None else
                             "-i \"{0}\"".format(self.cover))
         ffmpeg_path = is_installed("ffmpeg")
         rip_command = """{0} -y -threads 0 -i \"{1}/{2}\" {3} -metadata title=\"{4}\"  -metadata artist=\"{5}\"
                         -metadata album=\"{6}\" -metadata date=\"{7}\" \"{8}/{9}\"""".format(
             ffmpeg_path, self.input_location, self.audio_files[i],
             cover_art_stream,
             self.track_info[i].get_name(), self.track_info[i].get_artist(),
             self.meta.get_album(), self.track_info[i].get_year(),
             self.output_location,
             "{0}.{1}".format(self.track_info[i].get_name(), self.format))
         try:
             logger.debug(rip_command)
             ffmpeg = subprocess.Popen(shlex.split(rip_command),
                                       stderr=subprocess.STDOUT,
                                       stdout=subprocess.PIPE)
         except:
             raise RipperError(Reason.FFMPEGERROR,
                               "An Error occurred while running FFMPEG")
         self.processes.append(ffmpeg)
     self.wait_for_finish()
     self.rm_cover()
Example #2
0
def main(builder, data):
    global window
    window = RipperWindow(builder, data + "settings.yaml")
    load = Loader()
    load.load_formats(formats)
    load.load_settings(data + "settings.yaml")
    logger.info("Started FFRipper")
    Gtk.main()
Example #3
0
 def is_disc(self):
     if self.disc.is_disc():
         return True
     logger.info("No Device found")
     return False
 def create_artist_directory(self):
     if self.artist_directory:
         self.output_location = os.path.join(self.output_location,
                                             self.meta.get_artist())
         logger.info("Creating Path {}".format(self.output_location))
         self.mkdir(self.output_location)