[rubyripper commit] r149 - trunk

0 views
Skip to first unread message

codesite...@google.com

unread,
Oct 4, 2007, 3:39:06 PM10/4/07
to rubyrippe...@googlegroups.com
Author: rubyripperdev
Date: Thu Oct 4 12:38:16 2007
New Revision: 149

Modified:
trunk/rr_lib.rb
trunk/rubyripper.desktop

Log:
Bring up some decent other codec section. This should fix issue 98 (
http://code.google.com/p/rubyripper/issues/detail?id=98). Less code is
always good... :)


Modified: trunk/rr_lib.rb
==============================================================================
--- trunk/rr_lib.rb (original)
+++ trunk/rr_lib.rb Thu Oct 4 12:38:16 2007
@@ -61,14 +61,15 @@
end

def get_filename(settings, codec = 'mp3', track = 1, command = false)
#function returning filename after conversion of variables
- if command == false
- if settings['cd'].various_artists.empty?
- filename = File.join(settings['basedir'], settings['naming_normal'])
- else
- filename = File.join(settings['basedir'], settings['naming_various'])
- end
- filename = File.expand_path(filename) #Replace any ~/ with the
relevant information, such as /home/username/
+ if settings['cd'].various_artists.empty?
+ filename = File.join(settings['basedir'], settings['naming_normal'])
else
+ filename = File.join(settings['basedir'], settings['naming_various'])
+ end
+ filename = File.expand_path(filename) #Replace any ~/ with the
relevant information, such as /home/username/
+
+ if command != false
+ command.gsub!('%o', filename) #replace the %o with the output filename
filename = command
end

@@ -818,19 +819,11 @@
end

def do_other
- setting = @settings['othersettings'].dup() # make a duplication,
because these values change per track
- if setting.rindex('.') && ( (setting.length - setting.rindex('.'))
< 7 ) #assume that an extension can't be larger than 6 characters
- extension = setting[setting.rindex('.')..-1]
- else
- extension = '.unknown'
- end
+ commandOther = get_filename(@settings, 'other', @track,
@settings['othersettings'].dup) #pass the commandline for other and
replace all % fields (except %i)
+ commandOther.gsub!('%i', "
\"#{@settings['temp_dir']}track#{@track}_1.wav\"") # %i = input filename

- filename = get_filename(@settings, 'other', @track) + extension
- @othersettings = get_filename(@settings, 'other', @track, setting)
#the settings may include fields for metadata, so use get_filename to
give us some help
- @othersettings.sub!('%o', filename) # %o = output filename
- @othersettings.sub!('%i', "
\"#{@settings['temp_dir']}track#{@track}_1.wav\"") # %i = input filename
- if @verbose : puts @othersettings end
- `#{@othersettings}` # Run the command
+ if @verbose : puts commandOther end
+ `#{commandOther}` # Run the command

update_playlist(extension, filename) if @settings['playlist']
increase = (@complete - @gui.encoding_progress) / @codecs

Modified: trunk/rubyripper.desktop
==============================================================================
--- trunk/rubyripper.desktop (original)
+++ trunk/rubyripper.desktop Thu Oct 4 12:38:16 2007
@@ -3,6 +3,7 @@
Type=Application
Name=Rubyripper
GenericName=Secure Audio Disc Ripper
+GenericName[nl]=Veilige Audio CD Ripper
Icon=rubyripper_22.png
Exec=rrip_gui
Categories=AudioVideo;

Reply all
Reply to author
Forward
0 new messages