-
Notifications
You must be signed in to change notification settings - Fork 175
Customizing Media Library Queries
Deadbeef's Media Library browser has the ability to select a query -- such as "Albums" or "Folders", and it comes with a few standard built-in queries.
![image](https://private-user-images.githubusercontent.com/1895698/282317179-9256e5c2-8f3b-424f-b68d-76d7cffd4b64.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjU4NTAzMDUsIm5iZiI6MTcyNTg1MDAwNSwicGF0aCI6Ii8xODk1Njk4LzI4MjMxNzE3OS05MjU2ZTVjMi04ZjNiLTQyNGYtYjY4ZC03NmQ3Y2ZmZDRiNjQucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI0MDkwOSUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNDA5MDlUMDI0NjQ1WiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9YTg4MWJjNzU2MTYxMmM0NzZiYWMzYzJjN2RhZDZiY2JjZWFiMDI5OTUyMGI0MzE2YzBlZWFjMGY0ZDUwNGMyNCZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QmYWN0b3JfaWQ9MCZrZXlfaWQ9MCZyZXBvX2lkPTAifQ.h9k3ukVAv16kbEG7QeAj48ghUZyemlgOwqEVjZKCiMo)
Additionally, you can create your own queries by clicking a little button next to the query dropdown:
There you can view and edit the existing presets:
![image](https://private-user-images.githubusercontent.com/1895698/282317458-23f92d92-bb62-40c8-9469-08018b4ab960.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjU4NTAzMDUsIm5iZiI6MTcyNTg1MDAwNSwicGF0aCI6Ii8xODk1Njk4LzI4MjMxNzQ1OC0yM2Y5MmQ5Mi1iYjYyLTQwYzgtOTQ2OS0wODAxOGI0YWI5NjAucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI0MDkwOSUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNDA5MDlUMDI0NjQ1WiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9ODE5YWE2NTE4N2I2MjE2YzNkYjRkYWE3ZjUwZjdiNWQ4YjhiZGZiM2UyMzlhNWMyODI1ZDlhYmZlOTk2YjM4YyZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QmYWN0b3JfaWQ9MCZrZXlfaWQ9MCZyZXBvX2lkPTAifQ.05HTEnE_qsG7zAPWGhMWrtWtRHpI8xQLj818QTcd7e8)
As well as create new query presets:
- by duplicating an existing one
- creating one from scratch
- or creating one from one of the built in templates
![image](https://private-user-images.githubusercontent.com/1895698/282317213-7f108a90-21ca-4877-aa45-da16d530b3c1.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjU4NTAzMDUsIm5iZiI6MTcyNTg1MDAwNSwicGF0aCI6Ii8xODk1Njk4LzI4MjMxNzIxMy03ZjEwOGE5MC0yMWNhLTQ4NzctYWE0NS1kYTE2ZDUzMGIzYzEucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI0MDkwOSUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNDA5MDlUMDI0NjQ1WiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9ZTM0M2NjNzY2NmE2MzQ2OTE3OGEwNzRkMWQ0M2MzOTMyMDAwOWIxODA0ODVmMWI2YzkwZTlhMGFjNThlZWI0ZCZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QmYWN0b3JfaWQ9MCZrZXlfaWQ9MCZyZXBvX2lkPTAifQ.dSbXYeokl5niNzRN64yyGyTR8_2-hUJsJnopnUWaJl4)
After creating the query preset, you will need to fill in the items in it, which are represented as a list of title formatting scripts, each defining one level in the tree hierarchy.
For example, for Genres query you will see something like this:
![image](https://private-user-images.githubusercontent.com/1895698/282317269-1f06e56c-06bb-4262-a672-5c4081187dea.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjU4NTAzMDUsIm5iZiI6MTcyNTg1MDAwNSwicGF0aCI6Ii8xODk1Njk4LzI4MjMxNzI2OS0xZjA2ZTU2Yy0wNmJiLTQyNjItYTY3Mi01YzQwODExODdkZWEucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI0MDkwOSUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNDA5MDlUMDI0NjQ1WiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9ZGIyMThhNjEyZDRkMzJiNWYxZTNlZmYyODQwN2RiOGZhZmEwZmM1ODQ2ZDY2OTcwNTNjMjAyM2MwZWZiMTI1ZCZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QmYWN0b3JfaWQ9MCZrZXlfaWQ9MCZyZXBvX2lkPTAifQ.zSGOZLXLZeFDi-KzIUx1cQfE3Y6BcoOGNIwHh0Hdh0c)
So top level is "genre" script, then "artist - album", then "track title".
You can customize this to your liking by editing these scripts directly in this list, like so:
![image](https://private-user-images.githubusercontent.com/1895698/282317328-bb227614-dd7f-461f-97fb-ec9980b2746c.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjU4NTAzMDUsIm5iZiI6MTcyNTg1MDAwNSwicGF0aCI6Ii8xODk1Njk4LzI4MjMxNzMyOC1iYjIyNzYxNC1kZDdmLTQ2MWYtOTdmYi1lYzk5ODBiMjc0NmMucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI0MDkwOSUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNDA5MDlUMDI0NjQ1WiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9Yzc5ZTlkODJlNmI4MmIzMTdiNzFlMjUwYzkxZmYwM2IzMzVjODQ1ODAxZDVjMzYwNTBiZTM0MjNhYTVmMjJiYiZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QmYWN0b3JfaWQ9MCZrZXlfaWQ9MCZyZXBvX2lkPTAifQ.fT-OZo7kbYa9oYkETpCdP1h-xF-JCOKnq8VtUuvMWow)
Hope this helps to customize your queries! Enjoy!