Go to file
aditya-K2 10566d87a1 No Need to Load and Write Cache now. 2021-12-09 02:30:59 +05:30
cache Better Way of Caching 2021-12-09 02:25:46 +05:30
config Setting up Defaults 2021-12-09 02:28:42 +05:30
.gitignore minor changes 2021-11-05 15:06:42 +05:30
App.go Added Search Section 2021-11-16 20:06:12 +05:30
LICENSE Initial commit 2021-10-08 20:22:09 +05:30
README.md Update Readme 2021-12-09 02:13:06 +05:30
client.go Hopefully Fixes the bugs 2021-11-17 15:06:18 +05:30
fileBrowser.go Updated FileNode Struct 2021-10-17 21:51:01 +05:30
go.mod Using the fuzzy library 2021-11-28 23:33:25 +05:30
go.sum Using the fuzzy library 2021-11-28 23:33:25 +05:30
imageUtils.go if the image is not extracted copy the default image to the image path and return the path to the default image for checking the lastfm api 2021-12-09 02:29:53 +05:30
lastfm.go Now it is neccessary to pass the imagePath 2021-11-20 21:45:32 +05:30
main.go No Need to Load and Write Cache now. 2021-12-09 02:30:59 +05:30
notification.go Using My Fork Of tview 2021-11-15 21:48:17 +05:30
progressBar.go Fixes #12 2021-11-29 15:19:33 +05:30
render.go Sending Some Informational Notifications 2021-11-28 23:38:52 +05:30
sample_config.yml Added functionality to set image paths 2021-11-05 14:11:14 +05:30
utils.go Generating the Artist Tree CONTENT 2021-11-28 23:32:40 +05:30

README.md

goMP

MPD client inspired by ncmpcpp written in GO

https://user-images.githubusercontent.com/51816057/142734222-c211eae5-e497-4f1a-8f3f-9288f5375a8e.mp4

Table Of Contents

Roadmap

  • Add Functionality to Sort out most played songs
  • Add a config parser
  • Image Previews
  • User Key Mappings
  • Querying LastFM API for getting Album Art
  • Fuzzy Searching
  • Visual Mode (like vim) for updating playlists

Setting Up

  • Music Player Daemon must be setup
  • Go Should Be Installed ( for building )
  • Make a YAML/TOML file in $HOME/.config/goMP named config.yml / config.toml
  • Read the sample_config.yml for config options

Installing / Building

git clone https://github.com/aditya-K2/goMP &&
cd goMP &&
go build

Configuration

Image Rendering :

The Default Position of the Image without any configuration assumes that you have no padding or margin so Image will be rendered at different places in different terminals, Also the TUI calculates positions with the help of rows and columns and the image is rendered at pixel positions so the exact position can't be defined [ the app tries its best by calculating the font width and then predicting the position but it is best that you define extra padding and own image width ratio in config.yml. Please Read more about it in the sample_config

Setting Up Cache Directory and Cache File

The Images that are extracted are cached. In the config.yml file add the following

CACHE_DIR : "/path/to/the/cache/Directory"
CACHE_FILE : "/path/to/the/cache/file" # Cache file stores the path to all the images ( think of it like a database. )

Key Mappings

Following Keys can be used for Mappings

Keys Using them in Config
a-z a-z
A-Z A-z
{,},(,),[,],<,> {,},(,),[,],<,>
Enter(Return) ENTER/RETURN
Tab TAB
Space SPACE

See config/kMap.go for more information

For mapping a key to some function use the following format:

Function: [ firstMapping, secondMapping, thirdMapping]

for.eg

togglePlayBack : [ "p", "TAB", "[" ] # using the quotes is neccessary.

Following functions are provided :

Functions
showChildrenContent
togglePlayBack
showParentContent
nextSong
clearPlaylist
previousSong
addToPlaylist
toggleRandom
toggleRepeat
decreaseVolume
increaseVolume
navigateToFiles
navigateToPlaylist
navigateToMostPlayed
navigateToSearch
quit
stop
updateDB
deleteSongFromPlaylist
FocusSearch

Getting Album Art from LastFm API

  1. Generate API Key here

    Screenshot from 2021-11-13 21-54-54

  2. Add the api key and api secret to config.yml


GET_COVER_ART_FROM_LAST_FM : "TRUE" # Turn On Getting Album art from lastfm api
LASTFM_API_KEY: "YOUR API KEY HERE"
LASTFM_API_SECRET: "YOUR API SECRET HERE"
  1. Auto correct

Screenshot from 2021-11-13 21-59-46 :


LASTFM_AUTO_CORRECT: 1  # 0 means it is turned off

Tested on following terminals:

  • Alacritty
  • ST
  • URXVT ( URXVT sometimes crashes when downloading coverart from lastfm )