Commit Graph

27 Commits

Author SHA1 Message Date
aditya-K2
baa063a712 Implementing the library 2021-11-28 23:33:34 +05:30
aditya-K2
2a2e6336e4 Implementing the previous commit
In main.go we are setting the default image path.
and whenever we don't find the image through lastfm we pointhepath to
default image in render.go
2021-11-26 22:02:20 +05:30
aditya-K2
68ef09544c Doing Cache Related Initilisations and Setup 2021-11-20 21:47:29 +05:30
aditya-K2
7f1c3f7c55 Simple Implementation of Searching.
This is a very simple Implementation of searching like playlist view
and file view there is an boolean value that is checked in the draw
function to check if whether or not to draw the Search view
Later on I am thinking of rewriting this whole mechanism with pages
which will make this more modular.

The Boolean values are set and unset by the navigation menu and the done
functions.
2021-11-16 20:53:22 +05:30
aditya-K2
41c77722e9 Change in Formatting 2021-11-16 00:14:00 +05:30
aditya-K2
a5268a6754 Simple Implementation of Search 2021-11-15 16:32:59 +05:30
aditya-K2
eca4cc47f9 Rename notificationServer -> NOTIFICATION_SERVER
making notificationServer global as other services might need access to
it.
2021-11-14 12:02:36 +05:30
aditya-K2
8f995c2357 Minor changes 2021-11-14 01:31:17 +05:30
aditya-K2
b01deba484 Utilising the Notification Server
Following Changes have been made:

1. UI is now global
2. Simple Notifications are sent when some events are called.
2021-11-13 23:53:59 +05:30
aditya-K2
dbfc617037 Rename Application Fields 2021-11-13 16:57:54 +05:30
aditya-K2
e4ed3bbab7 Rename conn -> CONN ( Also made it Global )
Following Changes have been made:

1. conn -> CONN
2. CONN is now a global as a lot of functions were requiring it and
   passing them as a parameter didn't seem intuitive.
3. In progressBar.go now we are sending only the short path instead of
   absolute path.
2021-11-13 11:32:00 +05:30
aditya-K2
4623f0d63c RENAME kMap -> FUNC_MAP
this naming makes more sense
2021-11-12 14:06:51 +05:30
aditya-K2
3492ec9349 Using the KEY_MAP map for handling events
Following Changes have been made:
    1. Using GenerateMappings() function
    2. Using the KEY_MAP map to handle events which shortens the code
       and adds modularity.
2021-11-11 23:30:40 +05:30
aditya-K2
602fc193fc minor changes 2021-11-11 22:30:14 +05:30
aditya-K2
1572a460b0 Making a config package for Generating keymappings
Following changes have been made:
    1. Moving the getMusicDirectory() to config package
    2. Moving the config.go to config package
    3. Generating a Function Map that will be used for Generating keymappings in main.go
    4. Using the config packge in main.go
    5. First we are reading the user configuration values with
       config.ReadConfig() and then we are reading the mappings with
       config.ReadMappings() with the help of Function Map that is
       generated.
2021-11-11 21:57:01 +05:30
aditya-K2
af9b9a1c0a Delete selected song from Playlist.
Now, Pressing d deletes the selected song.
2021-11-06 19:25:23 +05:30
aditya-K2
a365ca8c08 minor changes 2021-11-05 14:47:27 +05:30
aditya-K2
5ad7b90844 Added a config parser
Add a config.yml/config.toml file to $HOME/.config/goMP/ so that user
configurations are read.
2021-11-05 12:40:46 +05:30
aditya-K2
3ad3e58019 Image Previews Implementation 2021-10-24 13:26:10 +05:30
aditya-K2
46d721ffb4 pressing q now quits out of the application 2021-10-24 01:33:20 +05:30
aditya-K2
e137dc6c1e added Draw Function for expanded View
The Draw function is decided with the help of the InsidePlaylist boolean
value.
2021-10-18 12:18:51 +05:30
aditya-K2
e84e317079 Refactored the Startup Setup into A new Struct
- Added A new Struct Application which has all the other components as
  its fields
  -- the `newApplication()` Function returns a pointer to the newly
  created Application from which other fields can be accessed. The
  fields are as follows

	|   App          *tview.Application
	|   expandedView *tview.Table
	|   Navbar       *tview.Table
	|   searchBar    *tview.Table
	|   pBar         *progressBar

- Minor changes to main.go
2021-10-18 08:13:21 +05:30
aditya-K2
c6d2e8d8af Added Playlist Functionality
Using Switch case for mappings and removed Cycling

The Feature of Cycling through all the windows now seems useless instead
I am assigning each of the windows a number and one can cycle through
them using the number keys.

Also now the default window is the playlist window instead of the files
tab. The mappings are separated with the help of the global boolean value
InPlaylist
2021-10-18 07:51:57 +05:30
aditya-K2
11eb7c35b6 Working Prototype for the Files Navigation
Heavy Refactoring is needed for this. The Required Mappings have been
added and the Delay in keyboard input has been fixed. The Delay in
keyboard input was due to Queueing the events ( although it was a go
routine ). The Solution was to use just Draw() Method from tview.Application.
2021-10-17 22:30:57 +05:30
aditya-K2
0b08b284ab Refactoring of the Components
To Achieve focus functionality we need to separate each of this
Components so I have extracted the Components out.
2021-10-14 22:04:16 +05:30
aditya-K2
a41e060866 minor changes in formatting 2021-10-13 00:07:39 +05:30
aditya-K2
5f9c5fde52 Added Basic Layout and Using tview package for TUI
Decided to Go with tview package for building TUIs and
just added the basic layout of the app.
The Idea is to have a side menu to navigate between the other options.
Just like spotify-tui ( Which has taken inspiration from the orignal
spotify Client) and Having a progress bar at bottom ( Still figuring out
how to implement this )
2021-10-13 00:00:16 +05:30