5 media
Anna Schumaker edited this page 2023-05-10 16:58:40 -04:00

The media table holds information for medium playlists.

Columns

Name Type Description
mediumid INTEGER The unique id of a singe medium
propertyid INTEGER The rowid of this medium's properties
albumid INTEGER The albumid of this medium's album
number INTEGER The number of this medium in the album
name TEXT The name of this medium ("Disc 1: Some Name")
type TEXT The type of this medium ("CD", "Digital Media")

Triggers

Name When Description
media_insert_trigger After insert Create a new row in the playlist_properties table
media_delete_trigger After delete Delete this medium's entry in the playlist_properties table

The media_view

The media_view joins the media table with the playlist_properties table so the application can use one query to access all the relevant state for each medium.

Column Description
mediumid The mediumid of this medium
propertyid The rowid of the playlist_properties for this medium
albumid The albumid of this medium
number The number of this medium
name The name of this medium
type The type of this medium
active The active state of this medium
loop The loop state of this medium
shuffle The shuffle state of this medium
sort_order The sort order of this medium
current_trackid The current trackid of this medium

The medium_tracks_view

The medium_tracks_view joins the media table with the tracks and libraries tables to form a list of tracks that belong to each medium, but are not being deleted.

Column Description
trackid The trackid of the track
mediumid The mediumid of this medium