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. ]]
This commit is contained in:
aditya-K2
2021-12-28 10:32:48 +05:30
parent a8ae5fb426
commit 09297a4974
3 changed files with 13 additions and 21 deletions

View File

@@ -52,7 +52,7 @@ func main() {
// Connecting the Notification Server to the Main UI
notify.ConnectUI(UI)
fileMap, err := CONN.GetFiles()
fileMap, err := CONN.ListAllInfo("/")
// Generating the Directory Tree for File Navigation.
dirTree := client.GenerateDirectoryTree(fileMap)