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
TagLib
namespace).Using
open
is preferable to usingnew
and 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.
51 52 |
# File 'docs/taglib/flac.rb', line 51 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
.
43 44 |
# File 'docs/taglib/flac.rb', line 43 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.
108 109 |
# File 'docs/taglib/flac.rb', line 108 def add_picture(picture) end |
#audio_properties ⇒ TagLib::FLAC::Properties
Returns audio properties.
81 82 |
# File 'docs/taglib/flac.rb', line 81 def audio_properties end |
#id3v1_tag ⇒ TagLib::ID3v1::Tag
Returns the ID3v1 tag.
69 70 |
# File 'docs/taglib/flac.rb', line 69 def id3v1_tag end |
#id3v1_tag? ⇒ Boolean
Returns Whether or not the file on disk actually has an ID3v1 tag.
129 130 |
# File 'docs/taglib/flac.rb', line 129 def id3v1_tag? end |
#id3v2_tag ⇒ TagLib::ID3v2::Tag
Returns the ID3v2 tag.
75 76 |
# File 'docs/taglib/flac.rb', line 75 def id3v2_tag end |
#id3v2_tag? ⇒ Boolean
Returns Whether or not the file on disk actually has an ID3v2 tag.
135 136 |
# File 'docs/taglib/flac.rb', line 135 def id3v2_tag? end |
#picture_list ⇒ Array<TagLib::FLAC::Picture>
Returns an array of the pictures attached to the file.
87 88 |
# File 'docs/taglib/flac.rb', line 87 def picture_list end |
#remove_picture(picture) ⇒ Object
Remove the specified picture.
95 96 |
# File 'docs/taglib/flac.rb', line 95 def remove_picture(picture) end |
#remove_pictures ⇒ void
This method returns an undefined value.
Remove all pictures.
101 102 |
# File 'docs/taglib/flac.rb', line 101 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.
117 118 |
# File 'docs/taglib/flac.rb', line 117 def strip(=TagLib::FLAC::File::AllTags) end |
#tag ⇒ TagLib::Tag
Returns the union of the Xiph comment, ID3v1 and ID3v2 tag.
57 58 |
# File 'docs/taglib/flac.rb', line 57 def tag end |
#xiph_comment ⇒ TagLib::Ogg::XiphComment
Returns the Xiph comment tag.
63 64 |
# File 'docs/taglib/flac.rb', line 63 def xiph_comment end |
#xiph_comment? ⇒ Boolean
Returns Whether or not the file on disk actually has a XiphComment.
123 124 |
# File 'docs/taglib/flac.rb', line 123 def xiph_comment? end |