Creating and Managing Playlists
===============================

Playlists are an important part of any music collection, and Funkwhale is no different. Funkwhale
allows you to create playlists for yourself, for other users on your server, or for the entire federated
network.

Creating a New Playlist
-----------------------

Once you've :doc:`uploaded some content to your instance <upload>`, or have
:doc:`followed some public libraries of your choosing <follow>`, you can get
started creating new playlists.

To create a playlist:

- Click on "Playlists" under the "Music" section on the left-hand side
- A pop-up will appear listing any of your existing playlists
- Enter a name for your playlist under the "Playlist name" section
- Choose a visibility setting:

   - **Nobody except me**: The playlist will be hidden from all users of the instance
   - **Everyone on this instance**: The playlist will be visible to local accounts, but not to external users
   - **Everyone**: The playlist will be public

- Click "Create Playlist" to commit your changes

.. note::

   If you create a public library with non-public content, users will be able to see all tracks but
   will only be able to play those that are accessible by them.

Add Content to Playlist
-----------------------

Now that you've created your playlist, you need to put some music in it. Music can be added in a
few different ways:

Add Currently Playing Song
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

To add the currently playing song to a playlist:

- On the player at the bottom left of the screen, select the list icon to bring up the playlists pop-up
- Find the playlist you would like to add the song to and click "Add track"
- The changes will be saved automatically. Click "Stop Editing" to stop editing the playlist

Add Music From Library
^^^^^^^^^^^^^^^^^^^^^^^^^

To add tracks from anywhere in Funkwhale:

- Search for the song or album you want to add to the playlist in the Search menu
- Next to the song in question, you will see a list icon. Click on this to bring up the playlists pop-up
- Find the playlist you would like to add the song to
- The changes will be saved automatically. Click "Stop Editing" to stop editing the playlist

Add Music From Queue
^^^^^^^^^^^^^^^^^^^^^^^

To store the music that is currently in your queue:

- Click on "Playlists" under the "Music" section on the left-hand side
- A pop-up will appear listing any of your existing playlists
- Click on the playlist you want to add your content to
- In the window that appears, select "Edit" to start a new edition
- In the "Playlist editor" that appears, select "Insert from Queue" to add all content
- The changes will be saved automatically. Click "Stop Editing" to stop editing the playlist

Edit Playlist Contents
----------------------

Delete Music From Playlist
^^^^^^^^^^^^^^^^^^^^^^^^^^

To remove a song or songs from a playlist:

- Click on "Playlists" under the "Music" section on the left-hand side
- A pop-up will appear listing any of your existing playlists
- Click on the playlist you want to remove content from
- In the window that appears, select "Edit" to start a new edition
- For any track you want to remove, click on the red trash can icon on the right-hand side
- To remove all tracks at once, click "Clear Playlist"
- The changes will save automatically. Click "Stop Editing" to stop editing the playlist

Reorder Music in a Playlist
^^^^^^^^^^^^^^^^^^^^^^^^^^^

To change the order of songs in a playlist:

- Click on "Playlists" under the "Music" section on the left-hand side
- A pop-up will appear listing any of your existing playlists
- Click on the playlist you want to reorder
- In the window that appears, select "Edit" to start a new edition
- Drag the songs into the new order you want to store them in
- The changes will save automatically. Click "Stop Editing" to stop editing the playlist

Edit Playlist Settings
----------------------

If you want to change the name or visibility of a playlist, you will need to edit the playlist's settings.

- Click on "Playlists" under the "Music" section on the left-hand side
- A pop-up will appear listing any of your existing playlists
- Click on the playlist you want to add your content to
- In the window that appears, select "Edit" to start a new edition
- Change the "Playlist name" or "Playlist visibility" to their new values
- Click "Update playlist" to commit your changes
- Click "Stop Editing" to stop editing the playlist

Delete a Playlist
-----------------

.. warning::

   Deleting a playlist is permanent and will remove access for all other users. Only do this if you're sure you want to!

To delete a playlist:

- Click on "Playlists" under the "Music" section on the left-hand side
- A pop-up will appear listing any of your existing playlists
- Click on the playlist you want to delete
- Click on "Delete". A pop-up will appear warning you that this action is permanent. If you wish to continue, select "Delete playlist"
