4 libraries
Anna Schumaker edited this page 2023-05-10 17:04:22 -04:00

The libraries table holds information for library path playlists. Library paths can be disabled by the user, resulting in their tracks being removed from the Collection playlist.

Libraries have a "deleting" column which is set when a row is being removed from the database. This is intended to be used by playlists so they can select tracks that are not being removed.

Columns

Name Type Description
libraryid INTEGER The unique id of a library path
propertyid INTEGER The rowid of this library path's properties
path PATH The filepath of this library path
enabled BOOLEAN The user configured enabled property
deleting BOOLEAN The library path is being deleted

Triggers

Name When Description
libraries_insert_trigger After insert Create a new row in the playlist_properties table
libraries_delete_trigger After delete Delete this library path's entry in the playlist_properties table

The libraries_view

The libraries_view joins the libraries table with the playlist_properties table so the application can use one query to access all the relevant state for each library path.

Column Description
libraryid The libraryid of this library path
propertyid The rowid of the playlist_properties for this library path
path The filepath of this library path
name The filepath formatted as a string
enabled The user configured enabled property for this library path
active The active state of this library path
loop The loop state of this library path
shuffle The shuffle state of this library path
sort_order The sort order of this library path
current_trackid The current trackid of this library path

The library_tracks_view

The library_tracks_view joins the libraries table with the tracks table to form a list of tracks that belong to each library, but are not being deleted.

Column Description
trackid The trackid of the track
libraryid The libraryid of this library