Revert changes

This commit is contained in:
Allen
2022-11-13 15:00:00 -06:00
parent 3e26cfe037
commit 8daa39ff02
3 changed files with 7 additions and 18 deletions

View File

@ -44,9 +44,8 @@ The `font_width` and `font_height` options are used to center the album art prop
Why listen to music if you can't look at the pretty album art? Why listen to music if you can't look at the pretty album art?
| Option | Description | | Option | Description |
| -------------------- | ------------------------------------------------------------------------------------------------------- | | -------------------- | --------------------------------------------------------------------------------------------- |
| image_method | The method to use for drawing album art. Available values are `pixcat` and `ueberzug`. | | image_method | The method to use for drawing album art. Available values are `pixcat` and `ueberzug`. |
| mpd_method | The method mpd should use to retrieve the album art. Available values are `albumart` and `readpicture`.<br />`albumart` - image is contained in the album folder along with the songs<br />`readpicture` - image is directly embedded in the audio files |
### mpd ### mpd
Tell me your mpd address please! Tell me your mpd address please!
@ -133,8 +132,7 @@ These keybinds can be changed by editing the config file. See the [`config.examp
## F.A.Q. ## F.A.Q.
- **Q:** Album art is not showing up. - **Q:** Album art is not showing up.
**A1:** Try changing `image_method` from `pixcat` to `ueberzug` or vice versa. **A:** Try changing `image_method` from `pixcat` to `ueberzug` or vice versa.
**A2:** Try changing `mpd_method` from `albumart` to `readpicture` or vice versa.
- **Q:** Album art is too big/too small. - **Q:** Album art is too big/too small.
**A:** You need to configure `font_height` and `font_width`. Their values should be the actual pixel height and width of a character in your terminal. **A:** You need to configure `font_height` and `font_width`. Their values should be the actual pixel height and width of a character in your terminal.

View File

@ -22,13 +22,11 @@ if "player" not in config.sections():
"album_art_only": False, "album_art_only": False,
"volume_step": 5, "volume_step": 5,
"auto_close": False, "auto_close": False,
"show_playlist": True "show_playlist": True,
} }
if "art" not in config.sections(): if "art" not in config.sections():
config["art"] = {"image_method": "pixcat", config["art"] = {"image_method": "pixcat"}
"mpd_method": "albumart"
}
if "mpd" not in config.sections(): if "mpd" not in config.sections():
config["mpd"] = {"host": "localhost", config["mpd"] = {"host": "localhost",
@ -99,7 +97,6 @@ MPDPASS = mpd_config.get("pass", False)
# What to use to draw images # What to use to draw images
IMAGEMETHOD = art_config.get("image_method", "pixcat") IMAGEMETHOD = art_config.get("image_method", "pixcat")
MPDMETHOD = art_config.get("mpd_method", "albumart")
# Volume step # Volume step
VOLUMESTEP = player_config.getint("volume_step", 5) VOLUMESTEP = player_config.getint("volume_step", 5)
@ -502,14 +499,9 @@ class Player:
A function that fetches the album art and saves A function that fetches the album art and saves
it to self.album_art_loc it to self.album_art_loc
""" """
try: try:
if MPDMETHOD == "albumart":
albumart_data = self.client.albumart(song_file) albumart_data = self.client.albumart(song_file)
elif MPDMETHOD == "readpicture":
albumart_data = self.client.readpicture(song_file)
with open(self.album_art_loc, "wb") as f: with open(self.album_art_loc, "wb") as f:
f.write(albumart_data["binary"]) f.write(albumart_data["binary"])

View File

@ -8,7 +8,6 @@ show_playlist = true
[art] [art]
image_method = pixcat image_method = pixcat
mpd_method = albumart
[mpd] [mpd]
host = localhost host = localhost