Commit Graph

14 Commits

Author SHA1 Message Date
aditya-K2
fb2e2a831e Added Artist, Album fields to FileNode 2022-10-08 02:51:22 +05:30
aditya-K2
fdd390a731 Fixing Slow down of Playlists mentioned @ #20
As mentioned at https://github.com/aditya-K2/gomp/issues/20#issuecomment-1142443829

The Slow Down was caused due to constant calls to the MPD Server for
playlist info. Using Watcher to handle playlist event changes.

Also when In SearchView upon adding Artist/Album due to constant change
in playlists there was a slow down. Hence using CommandList for that.
2022-09-13 22:04:39 +05:30
aditya-K2
b2c5575c8b Using fhs/gompd/v2 2022-09-09 00:47:26 +05:30
aditya-K2
4ae005cbe7 No need to use globals as a separate package to avoid import cycles 2022-09-02 01:25:33 +05:30
aditya-K2
ff74bf02ba Initial Implementation of Views 2022-08-31 23:42:15 +05:30
aditya-K2
010f2473ca refactor: Minor Formatting Changes and Refactoring 2021-12-30 18:49:24 +05:30
aditya-K2
4a0a3e18f7 Using tcell.Colors instead of HardCoding Hex Values 2021-12-30 17:17:58 +05:30
aditya-K2
a3c5af06c8 Using a Unique Function
Previously the bug that I mentioned here `f7c2283355/utils/utils.go (L147)` was caused due to the
replication of matched Indexes.
Hence using the utils.Unique function to only get the unique elements in the slice.
2021-12-29 23:58:21 +05:30
aditya-K2
f7c2283355 Update Highlighting Algorithm & Using Tcell Styles
The Algorithm now only inserts the color string over a range i.e
if 1, 2, 3 are matches then instead of adding individually at 1, 2, 3
it adds the color string at 1 and null color string at 3. Also Using
tcell Styles for highlighting the table cells.
2021-12-29 22:28:57 +05:30
aditya-K2
09297a4974 Adding A new Field to the FileNode -> Title
Previously During Searching the Connection with mpd client was utilised
to get the title for the files this was slowing the search with large
number of files. Now after adding the Title field to the struct the
Field is accessed instead of querying the server this has lead to faster
searches.

[[ Please Note the Title of a Folder would be the last accessed
track from the FileMap. ]]
2021-12-28 10:32:48 +05:30
aditya-K2
175b694a4d Implementing Simple Buffer Searching
Searching the Global Database although is enough but I have felt a need to have a
quick and fast search option to search the current buffer.

Buffer Search is also one of the views It can be only turned on if the File Browser
has focus. ( Thinking of making it global ). The Searching is done
through the fuzzy module. FileNode now implements the Source Interface.
The Changed Function of the Search Bar checks for text changes and then
modifies the Matches Variable which is used by the Update Function to
Draw the Results. The Results have the Matching Characters Highlighted
Differently. Maximum of 15 results are displayed to avoid lag. Upon
Selecting the Result through the Search Bar navigation is possible and
selection of the item is done the same way it works for file Browser.
After Selection the Focus is returned Back to the File Browser. For The
Tracks only the title is used for searching.
2021-12-26 00:18:23 +05:30
aditya-K2
0118886d5e chore: Added More Informative Comments 2021-12-24 15:46:42 +05:30
aditya-K2
5031477cf8 Rename : fileBrowser.go -> files.go 2021-12-22 21:43:45 +05:30
aditya-K2
a54bfc4948 moving client.go filebrowser.go to the new client package 2021-12-22 19:56:57 +05:30