Module: MkvToolNix::PropEditSelector
- Defined in:
- lib/mkvtoolnix/propedit_selector.rb
Overview
Class Method Summary collapse
- .by_track_number(track_number) ⇒ Object
- .by_track_uid(uid) ⇒ Object
- .for_attachment_by_id(id) ⇒ Object
- .for_attachment_by_mime_type(mime_type) ⇒ Object
- .for_attachment_by_name(name) ⇒ Object
- .for_info ⇒ Object
- .for_nth_audio(nth) ⇒ Object
- .for_nth_subtitle(nth) ⇒ Object
- .for_nth_track(nth) ⇒ Object
- .for_nth_video(nth) ⇒ Object
- .tag_all ⇒ Object
- .tag_global ⇒ Object
Class Method Details
.by_track_number(track_number) ⇒ Object
34 35 36 37 38 39 |
# File 'lib/mkvtoolnix/propedit_selector.rb', line 34 def self.by_track_number(track_number) n = track_number raise Errors::MkvToolNixError, "Number must be > 0, got #{n}" if n.nil? || n.negative? "track:@#{n}" end |
.by_track_uid(uid) ⇒ Object
41 42 43 |
# File 'lib/mkvtoolnix/propedit_selector.rb', line 41 def self.by_track_uid(uid) "track:=#{uid}" end |
.for_attachment_by_id(id) ⇒ Object
45 46 47 |
# File 'lib/mkvtoolnix/propedit_selector.rb', line 45 def self.(id) id end |
.for_attachment_by_mime_type(mime_type) ⇒ Object
53 54 55 |
# File 'lib/mkvtoolnix/propedit_selector.rb', line 53 def self.(mime_type) "mime-type:#{mime_type}" end |
.for_attachment_by_name(name) ⇒ Object
49 50 51 |
# File 'lib/mkvtoolnix/propedit_selector.rb', line 49 def self.(name) "name:#{name}" end |
.for_info ⇒ Object
6 7 8 |
# File 'lib/mkvtoolnix/propedit_selector.rb', line 6 def self.for_info 'info' end |
.for_nth_audio(nth) ⇒ Object
22 23 24 25 26 |
# File 'lib/mkvtoolnix/propedit_selector.rb', line 22 def self.for_nth_audio(nth) raise Errors::MkvToolNixError, "Number must be > 0, got #{nth}" if nth.nil? || nth.negative? "track:a#{nth}" end |
.for_nth_subtitle(nth) ⇒ Object
28 29 30 31 32 |
# File 'lib/mkvtoolnix/propedit_selector.rb', line 28 def self.for_nth_subtitle(nth) raise Errors::MkvToolNixError, "Number must be > 0, got #{nth}" if nth.nil? || nth.negative? "track:s#{nth}" end |
.for_nth_track(nth) ⇒ Object
10 11 12 13 14 |
# File 'lib/mkvtoolnix/propedit_selector.rb', line 10 def self.for_nth_track(nth) raise Errors::MkvToolNixError, "Number must be > 0, got #{nth}" if nth.nil? || nth.negative? "track:#{nth}" end |
.for_nth_video(nth) ⇒ Object
16 17 18 19 20 |
# File 'lib/mkvtoolnix/propedit_selector.rb', line 16 def self.for_nth_video(nth) raise Errors::MkvToolNixError, "Number must be > 0, got #{nth}" if nth.nil? || nth.negative? "track:v#{nth}" end |
.tag_all ⇒ Object
57 58 59 |
# File 'lib/mkvtoolnix/propedit_selector.rb', line 57 def self.tag_all 'all' end |
.tag_global ⇒ Object
61 62 63 |
# File 'lib/mkvtoolnix/propedit_selector.rb', line 61 def self.tag_global 'global' end |