The D-Bus API is specified
in org.kde.Kid3.xml
. The Kid3 interface has the
following methods:
boolean openDirectory( | path) ; |
string path
;path
path to file or folder
Returns true if OK.
string getErrorMessage( | ) ; |
Returns detailed error message.
boolean batchImport( | tagMask, | |
profileName) ; |
int32 tagMask
;string profileName
;tagMask
tag mask (bit 0 for tag 1, bit 1 for tag 2)
profileName
name of batch import profile to use
boolean importFromFile( | tagMask, | |
path, | ||
fmtIdx) ; |
int32 tagMask
;string path
;int32 fmtIdx
;tagMask
tag bit (1 for tag 1, 2 for tag 2)
path
path of file
fmtIdx
index of format
Returns true if OK.
importFromTags( | tagMask, | |
source, | ||
extraction) ; |
int32 tagMask
;string source
;string extraction
;tagMask
tag bit (1 for tag 1, 2 for tag 2)
source
format to get source text from tags
extraction
regular expression with frame names and captures to extract from source text
array importFromTagsToSelection( | tagMask, | |
source, | ||
extraction) ; |
int32 tagMask
;string source
;string extraction
;tagMask
tag bit (1 for tag 1, 2 for tag 2)
source
format to get source text from tags
extraction
regular expression with frame names and captures to extract from source text
returnValues
extracted value for "%{__return}(.+)"
downloadAlbumArt( | url, | |
allFilesInDir) ; |
string url
;boolean allFilesInDir
;url
URL of picture file or album art resource
allFilesInDir
true to add the image to all files in the folder
boolean exportToFile( | tagMask, | |
path, | ||
fmtIdx) ; |
int32 tagMask
;string path
;int32 fmtIdx
;tagMask
tag bit (1 for tag 1, 2 for tag 2)
path
path of file
fmtIdx
index of format
Returns true if OK.
array getPlaylistItems( | path) ; |
string path
;path
path to playlist file
Returns list of absolute paths to playlist items.
boolean setPlaylistItems( | path, | |
items) ; |
string path
;array items
;path
path to playlist file
items
list 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
;tagMask
tag mask (bit 0 for tag 1, bit 1 for tag 2)
format
folder name format
create
true to create, false to rename
Returns true if OK, else the error message is available using getErrorMessage().
numberTracks( | tagMask, | |
firstTrackNr) ; |
int32 tagMask
;int32 firstTrackNr
;tagMask
tag mask (bit 0 for tag 1, bit 1 for tag 2)
firstTrackNr
number to use for first file
string getFileName( | ) ; |
Returns true absolute file name, ends with "/" if it is a folder.
setFileName( | name) ; |
string name
;name
file name
The file will be renamed when the folder is saved.
setFileNameFormat( | format) ; |
string format
;format
file name format
setFileNameFromTag( | tagMask) ; |
int32 tagMask
;tagMask
tag bit (1 for tag 1, 2 for tag 2)
string getFrame( | tagMask, | |
name) ; |
int32 tagMask
;string name
;tagMask
tag bit (1 for tag 1, 2 for tag 2)
name
name 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
;tagMask
tag bit (1 for tag 1, 2 for tag 2)
name
name of frame (e.g. "artist")
value
value 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
;tagMask
tag 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
;tagMask
tag bit (1 for tag 1, 2 for tag 2)
setTagFromOtherTag( | tagMask) ; |
int32 tagMask
;tagMask
tag 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.