Commit Graph

12 Commits

Author SHA1 Message Date
aditya-K2
3c12b7905d Utility Functions to Interact with the Search View
The Following Utility Functions have been added:

    1. AddAlbum : Adds Album to the Playlist
    2. AddArtist : Adds all the Track of the Artist to Playlist
    3. QueryArtistTree : Searches the Artist Tree for the track name
	and returns a map of [ artist, album, track ] -> path
2021-11-16 00:16:15 +05:30
aditya-K2
b1199e9b1c Using My Fork Of tview
Things that I needed are not included in rivo's tview version
and waiting for them to be merged will take time. So using My Fork.
2021-11-15 21:48:17 +05:30
aditya-K2
f529fd556c Generating Album and Artist Tree
Artist tree is a map that maps the artist names to a map of albums
Similarly the Album tree is a map that maps album names to their
content.

Album trees are generated from artist trees.
the content of the album is a map of title to the destinationFile.
2021-11-14 14:36:24 +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
452d6913f2 minor changes: Rename t -> inputTable 2021-10-29 09:44:55 +05:30
aditya-K2
fb3a70a1ee color changes 2021-10-18 13:18:56 +05:30
aditya-K2
1fa411fb1d Layout for Playlist/ Song View
There are two ways the information is shown if the Node is a directory
then the relativePath is shown else the attributes of the song are
shown.
For this Layout ( song attributes ) We can divide the Screen three Part

|   Title     |     Artist    |   Album     |
|             |               |             |
|             |               |             |
|             |               |             |
|             |               |             |

~~~~~~~~~~~~~  Screen Width  ~~~~~~~~~~~~~~~~~~~~~~

if the length of each of the attribute is less than ( Screen Width / 3 )
    then we can add spaces to the end else we can shorten the string to
    fit into the screen width
    this functionality is done with the help of `getFormattedString()`
2021-10-18 12:12:10 +05:30
aditya-K2
db9887c041 Added UpdatePlaylist Function
the UpdatePlaylist function updates the table `t` that has been passed
to it and fills it with the current playlist. Also I have removed the
addsong function which felt unneccesary and unused.
2021-10-18 01:27:30 +05:30
aditya-K2
24f94fc4e5 Minor Changes : Rename totalPath -> absolutePath 2021-10-17 21:53:39 +05:30
aditya-K2
eecb86ed8f Updated the Client Functions
Before the Update Function needed the currentDirectoryMap ( the
Functionality was not confirmed ) as a parameter but now I have removed
the currentDirectoryMap. Instead I have added totalPath ( going to
rename this to `absolutePath` )  to the FileNode Struct which is added
during the generation of the directory Tree whenever the selected field
is called we can just pass the totalPath.
2021-10-17 21:42:02 +05:30
aditya-K2
b4e6402a25 Added Update Function
This function will be useful to update the expanded view whenever user
navigates the file browser. The expanded view is a table which shows the
directory content.
2021-10-14 22:02:29 +05:30
aditya-K2
c0f3b6e920 All the Client related activities are in client.go 2021-10-09 17:21:47 +05:30