The D-Bus API is specified
in org.kde.Kid3.xml. The Kid3 interface has the
following methods:
boolean openDirectory( | path); |
string path;pathpath to file or folder
Returns true if OK.
string getErrorMessage( | ); |
Returns detailed error message.
boolean batchImport( | tagMask, | |
profileName); |
int32 tagMask;string profileName;tagMasktag mask (bit 0 for tag 1, bit 1 for tag 2)
profileNamename of batch import profile to use
boolean importFromFile( | tagMask, | |
| path, | ||
fmtIdx); |
int32 tagMask;string path;int32 fmtIdx;tagMasktag bit (1 for tag 1, 2 for tag 2)
pathpath of file
fmtIdxindex of format
Returns true if OK.
importFromTags( | tagMask, | |
| source, | ||
extraction); |
int32 tagMask;string source;string extraction;tagMasktag bit (1 for tag 1, 2 for tag 2)
sourceformat to get source text from tags
extractionregular expression with frame names and captures to extract from source text
array importFromTagsToSelection( | tagMask, | |
| source, | ||
extraction); |
int32 tagMask;string source;string extraction;tagMasktag bit (1 for tag 1, 2 for tag 2)
sourceformat to get source text from tags
extractionregular expression with frame names and captures to extract from source text
returnValuesextracted value for "%{__return}(.+)"
downloadAlbumArt( | url, | |
allFilesInDir); |
string url;boolean allFilesInDir;urlURL of picture file or album art resource
allFilesInDirtrue to add the image to all files in the folder
boolean exportToFile( | tagMask, | |
| path, | ||
fmtIdx); |
int32 tagMask;string path;int32 fmtIdx;tagMasktag bit (1 for tag 1, 2 for tag 2)
pathpath of file
fmtIdxindex of format
Returns true if OK.
array getPlaylistItems( | path); |
string path;pathpath to playlist file
Returns list of absolute paths to playlist items.
boolean setPlaylistItems( | path, | |
items); |
string path;array items;pathpath to playlist file
itemslist of absolute paths to playlist items
Returns true if OK, false if not all items were found and added or saving failed.
boolean previousFile( | ); |
Returns true if there is a previous file.
boolean expandDirectory( | ); |
A file list item is a folder if getFileName() returns a name with '/' as the last character.
Returns true if current file item is a folder.
boolean setDirNameFromTag( | tagMask, | |
| format, | ||
create); |
int32 tagMask;string format;boolean create;tagMasktag mask (bit 0 for tag 1, bit 1 for tag 2)
formatfolder name format
createtrue to create, false to rename
Returns true if OK, else the error message is available using getErrorMessage().
numberTracks( | tagMask, | |
firstTrackNr); |
int32 tagMask;int32 firstTrackNr;tagMasktag mask (bit 0 for tag 1, bit 1 for tag 2)
firstTrackNrnumber to use for first file
string getFileName( | ); |
Returns true absolute file name, ends with "/" if it is a folder.
setFileName( | name); |
string name;namefile name
The file will be renamed when the folder is saved.
setFileNameFormat( | format); |
string format;formatfile name format
setFileNameFromTag( | tagMask); |
int32 tagMask;tagMasktag bit (1 for tag 1, 2 for tag 2)
string getFrame( | tagMask, | |
name); |
int32 tagMask;string name;tagMasktag bit (1 for tag 1, 2 for tag 2)
namename of frame (e.g. "artist")
To get binary data like a picture, the name of a file to write can be
added after the name, e.g. "Picture:/path/to/file".
In the same way, synchronized lyrics can be exported, e.g. "SYLT:/path/to/file".
Returns value of frame.
boolean setFrame( | tagMask, | |
| name, | ||
value); |
int32 tagMask;string name;string value;tagMasktag bit (1 for tag 1, 2 for tag 2)
namename of frame (e.g. "artist")
valuevalue of frame
For tag 2 (tagMask 2), if no frame with name exists, a new frame
is added, if value is empty, the frame is deleted.
To add binary data like a picture, a file can be added after the
name, e.g. "Picture:/path/to/file".
"SYLT:/path/to/file" can be used to import synchronized lyrics.
Returns true if OK.
array of string getTag( | tagMask); |
int32 tagMask;tagMasktag bit (1 for tag 1, 2 for tag 2)
Returns list with alternating frame names and values.
array of string getInformation( | ); |
Properties are Format, Bitrate, Samplerate, Channels, Duration, Channel Mode, VBR, Tag 1, Tag 2. Properties which are not available are omitted.
Returns list with alternating property names and values.
setTagFromFileName( | tagMask); |
int32 tagMask;tagMasktag bit (1 for tag 1, 2 for tag 2)
setTagFromOtherTag( | tagMask); |
int32 tagMask;tagMasktag bit (1 for tag 1, 2 for tag 2)
reparseConfiguration( | ); |
Automated configuration changes are possible by modifying the configuration file and then reparsing the configuration.