Moode Forum
[IDEA] Collections: create views on the library, a way to manage large libraries - Printable Version

+- Moode Forum (https://moodeaudio.org/forum)
+-- Forum: moOde audio player (https://moodeaudio.org/forum/forumdisplay.php?fid=3)
+--- Forum: Feature requests (https://moodeaudio.org/forum/forumdisplay.php?fid=8)
+--- Thread: [IDEA] Collections: create views on the library, a way to manage large libraries (/showthread.php?tid=4606)



Collections: create views on the library, a way to manage large libraries - JeroenWalter - 12-12-2021

Hi

I've been working on a feature 'Collections' that allows you to create views on the music library, which allows you to more easily manage large libraries. 
Collections on github
Source code

A collection basically runs one or multiple filters on the complete library returned by MPD, as opposed to the single filter that moOde uses when searching.
Therefor you can think of a collection as a way to do store multiple search commands. 
 
Internally it works by replacing the part of the genFlatList method in playerlib.php that retrieves and filters the filelist from MPD. Instead of running only 1 search/filter over the entire list, it performs multiple.
For now this is enough for my use case, but I see potential to develop this further into better library management feature.

For now, collections can be managed and activated from the configuration menu. 
In time I want to be able to select a collection from the main Library dropdown.

Here is a screenshot of the management screen:
[Image: moodeaudio_collections.JPG]
The 'Default' collection is the entire library, the 'Some folders' collection will only show the albums in the selected folders in the album list, also any searches will only be performed on those folders.


It is still a work in progress and I am open to suggestions, so I'm asking for input. 

Even the term 'collection' may be changed, if someone comes up with a better term.

So let's hear it  Smile


RE: Collections: create views on the library, a way to manage large libraries - Tim Curtis - 12-12-2021

Nice :-) I'll add to the TODO list for moOde 8 series (Q1 2022).


RE: Collections: create views on the library, a way to manage large libraries - Tim Curtis - 12-21-2021

FYI: The implementation can prolly be done within the existing Library search/filtering code as described below. It does not involve any PHP template screens (we don't want those) or overwriting the libcache_all.json file and it maintains full Library functionality on any particular View.

- Enhance existing search/filtering code and modal to allow/parse the "OR" operator
- Add ability to save searches as named items (Views) i.e., libcache_"viewname".json
- Add SQL table for maintaining View names and associated search criteria
- Add modal for listing all saved Views for Select/Edit/Refresh/Remove
- Add "Custom Views" to Library menu like below

Radio
Folder
Tag
Album
------
All Music
Recently Added
Custom Views

I won't be able to scope this out until moOde 8 series (Q1 2022) and we are not planning to make any changes to the existing 7 series codebase due to workload on a new development workflow and build system for 8 series.

At some point I'll post a moOde 8 status thread and report whats going to be in the initial release.

-Tim