JVCL Help:TJvID3Controller.AddFrame
From Project JEDI Wiki
Jump to navigationJump to searchJVCL Help: TJvID3Controller.AddFrame Method
[+] TJvID3Controller Methods
[+] TJvID3Controller Properties
Search in JVCL Help
Search in all projectsSummary
Adds a frame with a specific frame identifier to the tag.
Pascal
functionAddFrame(constAFrameID: TJvID3FrameID): TJvID3Frame;
Parameters
Parameters | Description |
const AFrameID: TJvID3FrameID | Specifies the frame identifier to add. |
Return Value
Returns the added frame.
Description
Call AddFrame to add a frame with frame identifier AFrameID to the tag.
Certain frames may only appear once in a tag regardless of its value. For example, there may only be one fiAlbum frame in a tag. So you might want to check CanAddFrame before calling AddFrame.
Alternatively, you can use the FindOrCreate methods of frames to a specific frame component:var
Frame: TJvID3Frame;
begin
{ JvID3v21 is the tag controller }
JvID3v21.Open;
Frame := JvID3v21.Frames.FrameByID(fiAlbum);
ifnot Assigned(Frame) then
Frame := JvID3v21.AddFrame(fiAlbum);
if Frame isTJvID3TextFramethen
TJvID3TextFrame(Frame).Text := 'The white album';
end;
Or:begin
{ JvID3v21 is the tag controller }
JvID3v21.Open;
TJvID3TextFrame.FindOrCreate(fiAlbum).Text := 'The White Album';
end;
See Also
TJvID3Controller.CanAddFrame, TJvID3Frames.FrameByID
About
Contribute to this help topic
This documentation wiki is based on the collaborative effort of Project JEDI users. Your edits are welcome in order to improve documentation quality: edit this page