Class: TagLib::MPEG::File
Overview
The file class for .mp3 and other MPEG files.
Constant Summary collapse
- NoTags =
0x0000- ID3v1 =
0x0001- ID3v2 =
0x0002- APE =
0x0004- AllTags =
0xffff
Class Method Summary collapse
Instance Method Summary collapse
-
#audio_properties ⇒ TagLib::MPEG::Properties
Returns audio properties.
-
#id3v1_tag(create = false) ⇒ TagLib::ID3v1::Tag?
Returns the ID3v1 tag.
-
#id3v2_tag(create = false) ⇒ TagLib::ID3v2::Tag?
Returns the ID3v2 tag.
-
#initialize(filename, read_properties = true) ⇒ File
constructor
Load an MPEG file.
-
#save(tags = TagLib::MPEG::File::AllTags, strip_others = true) ⇒ Boolean
Save the file and the associated tags.
-
#strip(tags = TagLib::MPEG::File::AllTags) ⇒ Boolean
Strip the specified tags from the file.
-
#tag ⇒ TagLib::Tag?
Returns a tag that contains attributes from both the ID3v2 and ID3v1 tag, with ID3v2 attributes having precendence.
Methods inherited from File
Constructor Details
#initialize(filename, read_properties = true) ⇒ File
Load an MPEG file.
32 33 |
# File 'docs/taglib/mpeg.rb', line 32 def initialize(filename, read_properties=true) end |
Class Method Details
.open(filename, read_properties = true) {|file| ... } ⇒ Object
24 25 |
# File 'docs/taglib/mpeg.rb', line 24 def self.open(filename, read_properties=true) end |
Instance Method Details
#audio_properties ⇒ TagLib::MPEG::Properties
Returns audio properties.
62 63 |
# File 'docs/taglib/mpeg.rb', line 62 def audio_properties end |
#id3v1_tag(create = false) ⇒ TagLib::ID3v1::Tag?
Returns the ID3v1 tag.
48 49 |
# File 'docs/taglib/mpeg.rb', line 48 def id3v1_tag(create=false) end |
#id3v2_tag(create = false) ⇒ TagLib::ID3v2::Tag?
Returns the ID3v2 tag.
56 57 |
# File 'docs/taglib/mpeg.rb', line 56 def id3v2_tag(create=false) end |
#save(tags = TagLib::MPEG::File::AllTags, strip_others = true) ⇒ Boolean
Save the file and the associated tags.
76 77 |
# File 'docs/taglib/mpeg.rb', line 76 def save(=TagLib::MPEG::File::AllTags, strip_others=true) end |
#strip(tags = TagLib::MPEG::File::AllTags) ⇒ Boolean
Strip the specified tags from the file. Note that this directly updates the file, a call to save afterwards is not necessary (closing the file is necessary as always, though).
89 90 |
# File 'docs/taglib/mpeg.rb', line 89 def strip(=TagLib::MPEG::File::AllTags) end |
#tag ⇒ TagLib::Tag?
Returns a tag that contains attributes from both the ID3v2 and ID3v1 tag, with ID3v2 attributes having precendence.
40 41 |
# File 'docs/taglib/mpeg.rb', line 40 def tag end |