GitXplorerGitXplorer
x

mpdknotifier

public
2 stars
1 forks
0 issues

Commits

List of commits on branch master.
Unverified
6acd53f2d200eca0d9579d29958609ede7da3f1f

Merge branch 'fix-linkage-with-qtnetwork'

xxaizek committed 13 years ago
Unverified
182481b83f1fa043118cf0717ae152ee9ae7db98

Add QtNetwork library dependency to CMakeLists.txt

xxaizek committed 13 years ago
Unverified
28b6db14c6e508594034c13f62c490777e1c55af

Merge branch 'infrastructure-updates'

xxaizek committed 13 years ago
Unverified
b7f8a1df984c9107dd48b2c83652f896e3f37b21

Add THANKS file

xxaizek committed 13 years ago
Unverified
22b7df8468287bf0046f1a5761621e703804a1f2

Bump version number

xxaizek committed 13 years ago
Unverified
6484bf588c3a7f053a4bff0a041e6f31db5e5d43

Merge branch 'support-password-protected-servers'

xxaizek committed 13 years ago

README

The README file for this repository.

Contents

  1. Authors

  2. Description

  3. Arguments

  4. Options in mpdknotifierrc file

  5. Album art search algorithm

  6. Troubleshooting

  7. See also

  8. Authors

Developer of MpdKNotifier v1.0: Jakub Horák kubahorak@gmail.com Further development: xaizek xaizek@gmail.com

  1. Description

This small program shows notifications with short information about current track of MPD using libnotify (http://www.galago-project.org/news/index.php). It can:

  • display album art
  • use external application to get cover (format is supported)
  • resize album art if its bigger than needed
  • display custom list of commands (format is supported)
  1. Arguments

    -d, --debug Use this argument to enable debug mode (which is disabled by default) if you want to see what happens at runtime. All debug messages will be printed out on stderr, not to log. So, you may want to redirect messages to a file like this:
    mpdknotifier --debug 2> debug.out

  2. Options in mpdknotifierrc file

In configuration file mpdknotifierrc (that should be copied into ~/.kde/share/config/) in group "General" you can use options from the list below:

  1. MPDHost
  2. MPDPort
  3. MusicDir
  4. CommandsNames
  5. Commands
  6. Format
  7. ArtFindCmd
  8. LogFile
  9. PreferredCoverWidth
  10. PreferredCoverHeight
  11. ArtResizeCmd
  12. NoCoverImg

Note: There is a default value for each option. So you can skip some of theme in your configuration file. You can see them below in brackets after equals ('=') symbol. Here is full format of each entry: n) parameter_name [=default_value] Description.

  1. MPDHost [=localhost] Sets IP address or DNS name of MPD server host and host password in the following format: [password@]host, where password is optional.

  2. MPDPort [=6600] Sets number of port to connect to MPD server.

  3. MusicDir [=/mnt/music/] Sets path to the music collection, should be same as one in mpd.conf. Needed for getting album art.

  4. CommandsNames [=Open ncmpcpp] List of semicolon (';') separated command names.

  5. Commands [=terminal -x ncmpcpp] List of semicolon (';') commands. Next special sequences can be used:

  • '%a' - full path to album art
  • '%f' - full path to current track
  • '%d' - full path to parent directory of current track
  • '%с' - name of album art file
  • '%%' - percent symbol
  1. Format [=%Artist% - %Title%{\n%Album%} {(%Date%)}] Format string for text message in the notification. You can use any tags that are supported by your version of MPD server. Just surround them with percent ('%') symbol. Also you can use conditional blocks using curly brackets ('{' and '}'). Conditional block will be displayed only if all tags it includes had been expanded. For additional formating HTML tags (, ,
    , ...) and escape sequences ('\t', '\n', ...) can be used. But depending on your notify daemon you can use both types together or only one at a time.

  2. ArtFindCmd [=] If MPDKNotifier can't find album art, then this command is executed and search is repeated.

  3. LogFile [=/.mpdknotifier/log.txt] Log file name. You can use '' symbol to refer to your home directory.

  4. PreferredCoverWidth [=200] Preferred width of album art in pixels. This option is used for scaling album art and to decide if we need to call ArtResizeCmd.

  5. PreferredCoverHeight [=200] Preferred height of album art in pixels. This option is also used for scaling album art and to decide if we need to call ArtResizeCmd.

  6. ArtResizeCmd [=] Contains command for resizing images bigger than PreferredCoverWidth x PreferredCoverHeight. You can use all special sequences like in Commands option.

  7. NoCoverImg [=/usr/share/apps/mpdknotifier/nocover.jpg] Path to the image file, that would be used when no cover was found.

  1. Album art search algorithm

Firstly a search for any jpg, png or gif file in parent directory of current track is performed. If we found nothing than executing command from ArtFindCmd option and repeating this algorithm from start (but only once). If we found only 1 image, then use it as a cover. Otherwise try to find best match. Perform the second search using next patterns: [fF]ront.jpg [fF]ront.png [cC]over.jpg [cC]over.png if we have matches take first of them and finish. Else perform third search with this patterns: [fF]ront.jpg [fF]ront.png [cC]over.jpg [cC]over.png if we found something take any of results and finish. Else take first image from results of first search.

  1. Troubleshooting

If you've found a bug or have some problems using this program, please inform the developers. Thus you can help to make this software better. If you have an account on GitHub.com you can create an issue there. Or you can always contact developers by email (see 'Authors' section).

  1. See also

For additional instructions: http://mpd.wikia.com/wiki/Client:MpdKNotifier

For latest version: https://github.com/xaizek/mpdknotifier

For homepage of original developer: http://zee.cz/