From: <te...@us...> - 2004-03-07 23:58:20
|
Update of /cvsroot/quickrip/ng/cli In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2506/cli Modified Files: cli.py Log Message: Small changes and bugfixes Index: cli.py =================================================================== RCS file: /cvsroot/quickrip/ng/cli/cli.py,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** cli.py 5 Mar 2004 16:15:15 -0000 1.6 --- cli.py 7 Mar 2004 23:34:28 -0000 1.7 *************** *** 225,233 **** print output.bold("QuickRip will now rip the following tracks:") numtitles_to_rip = 0 for t in self.titles: if t['rip'] == 'yes': numtitles_to_rip += 1 ! print "- Track %2s (%s/%s.avi) at %skbps" % (t['id'], \ ! self.config['outputdir'], t['name'], str(int(t['vbr']))) # Have they selected any titles? if numtitles_to_rip is 0: --- 225,239 ---- print output.bold("QuickRip will now rip the following tracks:") numtitles_to_rip = 0 + if self.config['videocodec'] == 'mpeg2': + end = "mpeg" + elif self.config['audiocodec'] == 'ogg': + end = "ogg" + else: + end = "avi" for t in self.titles: if t['rip'] == 'yes': numtitles_to_rip += 1 ! print "- Track %2s (%s/%s.%s) at %skbps" % (t['id'], \ ! self.config['outputdir'], t['name'], end, str(int(t['vbr']))) # Have they selected any titles? if numtitles_to_rip is 0: *************** *** 314,318 **** self.askOption() # Change the option ! self.choices[self.choice]['object'][self.choices[self.choice]['param']] = self.option_choice # Maybe change filesize/bitrate? if self.choices[self.choice]['param'] in ['vbr', 'abr']: --- 320,350 ---- self.askOption() # Change the option ! self.choices[self.choice]['object'][self.choices[self.choice]['param']] = \ ! self.option_choice ! # Check they have't changed the aspect ratio when vc+ac = mpeg2 ! if self.choices[self.choice]['param'] == 'aspectratio' and \ ! self.option_choice != '4:3' and self.config['audiocodec'] == 'mpeg2': ! print output.red("MPEG2 videos for SVCD can only have a 4:3 aspect ratio") ! self.config['aspectratio'] = '4:3' ! try: ! null = raw_input("") ! del null ! self.switch('configuration') ! except KeyboardInterrupt: ! print "\n\nExiting..." ! sys.exit(2) ! # If changing ac/vc to mpeg2, change the other ! if self.choices[self.choice]['param'] in ['audiocodec', 'videocodec']: ! if self.option_choice == 'mpeg2': ! self.config['videocodec'] = 'mpeg2' ! self.config['audiocodec'] = 'mpeg2' ! self.config['aspectratio'] = '4:3' ! # If changing ac/vc from mpeg2, change the other ! if self.choices[self.choice]['param'] == 'audiocodec' and \ ! self.option_choice != 'mpeg2' and self.config['videocodec'] == 'mpeg2': ! self.config['videocodec'] = 'divx' ! if self.choices[self.choice]['param'] == 'videocodec' and \ ! self.option_choice != 'mpeg2' and self.config['audiocodec'] == 'mpeg2': ! self.config['audiocodec'] = 'mp3' # Maybe change filesize/bitrate? if self.choices[self.choice]['param'] in ['vbr', 'abr']: *************** *** 381,389 **** slashn = "" # Finish off last pass' line ! if passtype != "audio": ! sys.stdout.write(" 100% ") ! for i in range(self.n): ! sys.stdout.write("=") ! sys.stdout.write("|\n") sys.stdout.write(slashn + passtype + " |") sys.stdout.flush() --- 413,421 ---- slashn = "" # Finish off last pass' line ! #if passtype != "audio": ! # sys.stdout.write(" 100% ") ! # for i in range(self.n): ! # sys.stdout.write("=") ! # sys.stdout.write("|\n") sys.stdout.write(slashn + passtype + " |") sys.stdout.flush() *************** *** 407,411 **** sys.stdout.write(" " + str(int(perc)) + "% |") else: ! sys.stdout.write(" " + str(int(perc)) + "% |") # Rewrite bar sys.stdout.write("=" * n) --- 439,443 ---- sys.stdout.write(" " + str(int(perc)) + "% |") else: ! sys.stdout.write(" " + str(int(perc)) + "% |") # Rewrite bar sys.stdout.write("=" * n) |