Class: AppleTvConverter::CommandLine
- Inherits:
-
Object
- Object
- AppleTvConverter::CommandLine
- Defined in:
- lib/apple_tv_converter/command_line.rb
Instance Method Summary collapse
-
#initialize(*args) ⇒ CommandLine
constructor
A new instance of CommandLine.
Constructor Details
#initialize(*args) ⇒ CommandLine
Returns a new instance of CommandLine.
3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 |
# File 'lib/apple_tv_converter/command_line.rb', line 3 def initialize(*args) @skip_subtitles = false @skip_metadata = false @skip_cleanup = false begin = parse_arguments(args) media_objects = .media converter = AppleTvConverter::MediaConverter.new() media_objects.sort { |a, b| a.original_filename <=> b.original_filename }.each_with_index do |media, index| puts "---[ Processing file #{index + 1} of #{media_objects.length}: #{File.basename(media.original_filename)} ]----------------" converter.process_media media end rescue ArgumentError => e puts "Error: #{e.}" rescue => e puts "Error: #{e.}" puts e.backtrace end end |