Create a library
Use the create_library
command to create new libraries for a given user.
Parameter |
Data type |
Description |
---|---|---|
|
String |
The user you want to create the library for. |
|
String |
The name of the library. Defaults to “default”. |
|
Enum (String) |
The privacy level of the library
|
Examples
Create a new library
Use the following command to create a new library with a custom name and privacy level.
venv/bin/funkwhale-manage create_library username1 --name="Library 1" --privacy-level="everyone"
docker compose run --rm api funkwhale-manage create_library username1 --name="Library 1" --privacy-level="everyone"
Returns
Created library Library 1 for user username1 with UUID 436da05b-8cb1-4a4d-b870-4a3b235d8517
Create a new library with no name or privacy level
You can create a library using only a username. The script substitutes default values for the library name and privacy level.
venv/bin/funkwhale-manage create_library username1
docker compose run --rm api funkwhale-manage create_library username1
Returns
Created library default for user username1 with UUID 436da05b-8cb1-4a4d-b870-4a3b235d8517
Library with the same name already exists
If a library with the same name already exists for the given user, the script will not create a new library.
venv/bin/funkwhale-manage create_library username1 --name="Library 1" --privacy-level="everyone"
docker compose run --rm api funkwhale-manage create_library username1 --name="Library 1" --privacy-level="everyone"
Returns
Found existing library Library 1 for user username1 with UUID 436da05b-8cb1-4a4d-b870-4a3b235d8517