UI hints ======== * Enqueue tracks in the playlist with Ctrl+RightButtonClick, like in Amarok. * Mark a track as "stop after this track" with Ctrl+MiddleButtonClick. * Press return in the tree view search line to append all the search results to the playlist, starting playback if the playlist was empty and the player stopped. Press return as well in the playlist search line to start playing the first track in the search result. DCOP interface XXX-KDE4 ============== Minirok exports a DCOP interface containing functions to perform Playlist actions (play, pause, playPause, stop, next, previous, stopAfterCurrent), and a function to retrieve the currently playing track, "nowPlaying". This last functions comes in two flavours: without an argument, it will return a string like "Artist - Title", or just "Title" if there's no known artist. However, you can pass a string argument that will be formatted against a dict of the tags with the Python % operator. For example: % dcop minirok player nowPlaying "%(Artist)s - %(Title)s (%(Album)s)" Do not forget the "s" after the brackets, it's needed by Python. There is also a appendToPlaylist function, which does the same as `minirok --append`. The function takes a QStringList as argument, so to invoke it you must place the arguments between square brackets, like this: % dcop minirok player appendToPlaylist [ /path/to/file.mp3 ... ] Note that you have to specify the full paths of files, or it won't work. Finally, there is a toggleWindow function, which hides/shows the main window. Regular expressions =================== Instead of reading tags from audio files, a Python regular expression can be used to guess them from the filename. The full patch will be searched, but the regular expression does not need to match the full path (for pythonistas, it'll be a re.search, not a re.match). The tags will be extracted from the named groups of the match, namely: "title", "artist", "album", and "track". Even if a regular expression is configured, tags will still be read from the files in the background. This can be configured in the Preferences dialog so that they are never read, or only if the regular expression did not match. A regular expression match with an empty "title" group is considered as failure to match. An example of a simple regular expression that matches "Artist - Title.mp3" would be: '/((?P.+?) - )?(?P.+)\.[^.]+$' A more elaborated one, the one I use: '(?i).*?/(\(\d+\) )?(?P<album>[^/]+(/(CD|vol|disco) *\d+)?)/((?P<track>\d+)_)?((?P<artist>[^/]+?) - )?(?P<title>[^/]+)\.[^.]+$' This matches, case insensitively: .../Album/Artist - Title.mp3 .../Album/07_Artist - Title.mp3 .../(year) Album/07_Artist - Title.mp3 .../(year) Album/cd 1/07_Artist - Title.mp3 For more information on Python regular expression: http://docs.python.org/lib/module-re.html http://docs.python.org/lib/re-syntax.html