Skip to content
  • Michael Pyne's avatar
    Flesh out the rest of the DCOP interface. · 117c8e05
    Michael Pyne authored
    The DCOP interface is called Collection.
    The master playlist is called "Collection List".
    
    * playlists() - Returns list of playlists
    * createPlaylist(QString) - Creates an empty playlist with the given name.
    * remove() - Removes the currently selected playlist.  May ask user for confirmation.
    * openFile(playlist,file) - Adds file to the given playlist.
    * openFile(playlist,files) - Adds files (QStringList of filenames) to the given playlist.
    * removeTrack(playlist,key) - Removes the track ID'd by key from the playlist.
    * removeTrack(playlist,keys) - Removes the tracks (QStringList of keys) from the playlist.
    * playlist() - Returns name of currently selected playlist.
    * setPlaylist() - Selects the given playlist.
    * playlistTracks() - Returns a QStringList of the keys of the songs in the given playlist.
    * trackProperty(key,property) - Similar to trackProperty() in the Player interface, returns the given property of the given file.
    
    Notes:
    Scott and I agree that a DCOP call to erase a file from disk won't happen.
    You can simulate this in a script by first removing the file from Collection
    List, and then removing the file from disk in your script.  Use
    Collection/trackProperty(), with a Property name of Path to get the file name.
    
    To see a list of all valid properties for trackProperty(), use the
    trackProperties() call in the DCOP Player interface for JuK.
    
    In the current implementation, the key for a song will actually be its filename.
    Don't rely on this behavior, as the code may be changed later to return a
    string ID that, although unique, bears no resemblance to a filename.  You can
    always retrieve the file name for a song from its key using the trackProperty()
    DCOP call.
    
    Also, it's sort of a hack, but you can start playing a different playlist by
    stopping playback, selecting the playlist you want to play, and then starting
    playback.
    Example:
      $ dcop juk Player stop
      $ dcop juk Collection setPlaylist <playlist-name-here>
      $ dcop juk Player play
    
    It's also now possible to show the track announcement popup via DCOP, by
    activating the showPopup action.
    Example: $ dcop juk juk-mainwindow#1 activateAction showPopup
    
    I'll try to work on e.g. search functionality for DCOP, but I won't guarantee
    that it will make it for 3.3.
    
    CCMAIL:64419-done@bugs.kde.org
    CCMAIL:69083-done@bugs.kde.org
    CCMAIL:80327-done@bugs.kde.org
    
    svn path=/trunk/kdemultimedia/juk/; revision=318068
    117c8e05