Merge remote-tracking branch 'origin/main'
This commit is contained in:
@ -21,7 +21,7 @@ pip install miniplayer
|
|||||||
|
|
||||||
## Configuration
|
## Configuration
|
||||||
|
|
||||||
The config file is located at `~/.config/miniplayer/config`. The example configuration file, `config.example`, has all the default values. You will need to create the file yourself.
|
The config file is located at `~/.config/miniplayer/config`. The example configuration file, [`config.example`](config.example), has all the default values. You will need to create the file yourself.
|
||||||
|
|
||||||
#### player
|
#### player
|
||||||
* ***music_directory*:** The path to your music directory for extracting album art.
|
* ***music_directory*:** The path to your music directory for extracting album art.
|
||||||
@ -37,6 +37,7 @@ The config file is located at `~/.config/miniplayer/config`. The example configu
|
|||||||
#### mpd
|
#### mpd
|
||||||
* ***host*:** The mpd host
|
* ***host*:** The mpd host
|
||||||
* ***port*:** The mpd port
|
* ***port*:** The mpd port
|
||||||
|
* ***pass*:** The mpd password
|
||||||
|
|
||||||
|
|
||||||
## Keybinds
|
## Keybinds
|
||||||
|
@ -24,7 +24,8 @@ if "player" not in config.sections():
|
|||||||
|
|
||||||
if "mpd" not in config.sections():
|
if "mpd" not in config.sections():
|
||||||
config["mpd"] = {"host": "localhost",
|
config["mpd"] = {"host": "localhost",
|
||||||
"port": "6600"
|
"port": "6600",
|
||||||
|
"pass": False
|
||||||
}
|
}
|
||||||
|
|
||||||
# Initialise keybindings
|
# Initialise keybindings
|
||||||
@ -72,6 +73,7 @@ MUSICDIR = os.path.expanduser(MUSICDIR)
|
|||||||
# MPD config
|
# MPD config
|
||||||
MPDHOST = mpd_config.get("host", "localhost")
|
MPDHOST = mpd_config.get("host", "localhost")
|
||||||
MPDPORT = mpd_config.getint("port", 6600)
|
MPDPORT = mpd_config.getint("port", 6600)
|
||||||
|
MPDPASS = mpd_config.get("pass", False)
|
||||||
|
|
||||||
# What to use to draw images
|
# What to use to draw images
|
||||||
IMAGEMETHOD = player_config.get("image_method", "pixcat")
|
IMAGEMETHOD = player_config.get("image_method", "pixcat")
|
||||||
@ -116,6 +118,8 @@ class Player:
|
|||||||
# MPD init
|
# MPD init
|
||||||
self.client = MPDClient()
|
self.client = MPDClient()
|
||||||
self.client.connect(MPDHOST, MPDPORT)
|
self.client.connect(MPDHOST, MPDPORT)
|
||||||
|
if MPDPASS:
|
||||||
|
self.client.password(MPDPASS)
|
||||||
|
|
||||||
self.last_song = None
|
self.last_song = None
|
||||||
|
|
||||||
|
@ -8,6 +8,7 @@ volume_step = 5
|
|||||||
[mpd]
|
[mpd]
|
||||||
host = localhost
|
host = localhost
|
||||||
port = 6600
|
port = 6600
|
||||||
|
# pass = example
|
||||||
|
|
||||||
# [keybindings]
|
# [keybindings]
|
||||||
# > = next_track
|
# > = next_track
|
||||||
|
Reference in New Issue
Block a user