Class: TagLib::FLAC::File
- Inherits:
-
TagLib::File
- Object
- TagLib::File
- TagLib::FLAC::File
- Defined in:
- docs/taglib/flac.rb
Overview
The file class for .flac files.
Note that Xiph comments is the primary tagging format for FLAC files. When saving a file, if there's not yet a Xiph comment, it is created from existing ID3 tags. ID3 tags will be updated if they exist, but not created automatically.
Constant Summary collapse
- NoTags =
0x0000- XiphComment =
0x0001- ID3v1 =
0x0002- ID3v2 =
0x0004- AllTags =
0xffff
Class Method Summary collapse
-
.open(filename, read_properties = true) {|file| ... } ⇒ Object
Creates a new file and passes it to the provided block, closing the file automatically at the end of the block.
Note that after the block is done, the file is closed and all memory is released for objects read from the file (basically everything from the
TagLibnamespace).Using
openis preferable to usingnewand then manuallyclose.
Instance Method Summary collapse
-
#add_picture(picture) ⇒ void
Add a picture to the file.
-
#audio_properties ⇒ TagLib::FLAC::Properties
Returns audio properties.
-
#id3v1_tag ⇒ TagLib::ID3v1::Tag
Returns the ID3v1 tag.
-
#id3v1_tag? ⇒ Boolean
Whether or not the file on disk actually has an ID3v1 tag.
-
#id3v2_tag ⇒ TagLib::ID3v2::Tag
Returns the ID3v2 tag.
-
#id3v2_tag? ⇒ Boolean
Whether or not the file on disk actually has an ID3v2 tag.
-
#initialize(filename, read_properties = true) ⇒ File
constructor
Load a FLAC file.
-
#picture_list ⇒ Array<TagLib::FLAC::Picture>
Returns an array of the pictures attached to the file.
-
#remove_picture(picture) ⇒ Object
Remove the specified picture.
-
#remove_pictures ⇒ void
Remove all pictures.
-
#strip(tags = TagLib::FLAC::File::AllTags) ⇒ void
Remove the tags matching the specified OR-ed types.
-
#tag ⇒ TagLib::Tag
Returns the union of the Xiph comment, ID3v1 and ID3v2 tag.
-
#xiph_comment ⇒ TagLib::Ogg::XiphComment
Returns the Xiph comment tag.
-
#xiph_comment? ⇒ Boolean
Whether or not the file on disk actually has a XiphComment.
Methods inherited from TagLib::File
Constructor Details
#initialize(filename, read_properties = true) ⇒ File
Load a FLAC file.
53 54 |
# File 'docs/taglib/flac.rb', line 53 def initialize(filename, read_properties=true) end |
Class Method Details
.open(filename, read_properties = true) {|file| ... } ⇒ Object
Creates a new file and passes it to the provided block, closing the file automatically at the end of the block.
Note that after the block is done, the file is closed and
all memory is released for objects read from the file
(basically everything from the TagLib namespace).
Using open is preferable to using new and then
manually close.
45 46 |
# File 'docs/taglib/flac.rb', line 45 def self.open(filename, read_properties=true) end |
Instance Method Details
#add_picture(picture) ⇒ void
This method returns an undefined value.
Add a picture to the file.
110 111 |
# File 'docs/taglib/flac.rb', line 110 def add_picture(picture) end |
#audio_properties ⇒ TagLib::FLAC::Properties
Returns audio properties.
83 84 |
# File 'docs/taglib/flac.rb', line 83 def audio_properties end |
#id3v1_tag ⇒ TagLib::ID3v1::Tag
Returns the ID3v1 tag.
71 72 |
# File 'docs/taglib/flac.rb', line 71 def id3v1_tag end |
#id3v1_tag? ⇒ Boolean
Returns Whether or not the file on disk actually has an ID3v1 tag.
131 132 |
# File 'docs/taglib/flac.rb', line 131 def id3v1_tag? end |
#id3v2_tag ⇒ TagLib::ID3v2::Tag
Returns the ID3v2 tag.
77 78 |
# File 'docs/taglib/flac.rb', line 77 def id3v2_tag end |
#id3v2_tag? ⇒ Boolean
Returns Whether or not the file on disk actually has an ID3v2 tag.
137 138 |
# File 'docs/taglib/flac.rb', line 137 def id3v2_tag? end |
#picture_list ⇒ Array<TagLib::FLAC::Picture>
Returns an array of the pictures attached to the file.
89 90 |
# File 'docs/taglib/flac.rb', line 89 def picture_list end |
#remove_picture(picture) ⇒ Object
Remove the specified picture.
97 98 |
# File 'docs/taglib/flac.rb', line 97 def remove_picture(picture) end |
#remove_pictures ⇒ void
This method returns an undefined value.
Remove all pictures.
103 104 |
# File 'docs/taglib/flac.rb', line 103 def remove_pictures end |
#strip(tags = TagLib::FLAC::File::AllTags) ⇒ void
This method returns an undefined value.
Remove the tags matching the specified OR-ed types.
119 120 |
# File 'docs/taglib/flac.rb', line 119 def strip(=TagLib::FLAC::File::AllTags) end |
#tag ⇒ TagLib::Tag
Returns the union of the Xiph comment, ID3v1 and ID3v2 tag.
59 60 |
# File 'docs/taglib/flac.rb', line 59 def tag end |
#xiph_comment ⇒ TagLib::Ogg::XiphComment
Returns the Xiph comment tag.
65 66 |
# File 'docs/taglib/flac.rb', line 65 def xiph_comment end |
#xiph_comment? ⇒ Boolean
Returns Whether or not the file on disk actually has a XiphComment.
125 126 |
# File 'docs/taglib/flac.rb', line 125 def xiph_comment? end |