D-Bus Interface
Table of Contents
- D-Bus Examples
- D-Bus API
- Open file or folder
- Unload the tags of all files which are not modified or selected
- Save all modified files
- Get a detailed error message provided by some methods
- Revert changes in the selected files
- Start an automatic batch import
- Import tags from a file
- Import tags from other tags
- Import tags from other tags on selected files
- Download album cover art
- Export tags to a file
- Create a playlist
- Get items of a playlist
- Set items of a playlist
- Quit the application
- Select all files
- Deselect all files
- Set the first file as the current file
- Set the previous file as the current file
- Set the next file as the current file
- Select the first file
- Select the previous file
- Select the next file
- Select the current file
- Expand or collapse the current file item if it is a folder
- Apply the file name format
- Apply the tag format
- Apply text encoding
- Set the folder name from the tags
- Set subsequent track numbers in the selected files
- Filter the files
- Convert ID3v2.3 tags to ID3v2.4
- Convert ID3v2.4 tags to ID3v2.3
- Get path of folder
- Get name of current file
- Set name of selected file
- Set format to use when setting the filename from the tags
- Set the file names of the selected files from the tags
- Get value of frame
- Set value of frame
- Get all frames of a tag
- Get technical information about file
- Set tag from file name
- Set tag from other tag
- Copy tag
- Paste tag
- Remove tag
- Reparse the configuration
- Plays the selected files
On Linux® a D-Bus-interface can be used to control Kid3 by scripts. Scripts can be written in any language with D-Bus-bindings (e.g. in Python) and can be added to the User Actions to extend the functionality of Kid3.
The artist in tag 2 of the current file can be set to the value "One Hit Wonder" with the following code:
- Shell
dbus-send --dest=org.kde.kid3 --print-reply=literal \ /Kid3 org.kde.Kid3.setFrame int32:2 string:'Artist' \ string:'One Hit Wonder'
or easier with Qt™'s qdbus (qdbusviewer can be used to explore the interface in a GUI):
qdbus org.kde.kid3 /Kid3 setFrame 2 Artist \ 'One Hit Wonder'
- Python
import dbus kid3 = dbus.SessionBus().get_object( 'org.kde.kid3', '/Kid3') kid3.setFrame(2, 'Artist', 'One Hit Wonder')
- Perl
use Net::DBus; $kid3 = Net::DBus->session->get_service( "org.kde.kid3")->get_object( "/Kid3", "org.kde.Kid3"); $kid3->setFrame(2, "Artist", "One Hit Wonder");