Documentation
¶
Overview ¶
Package library declares the Library value type used to represent a Plex library (Movies, TV, Music, etc.) along with the pure classification helpers (IsType, ContentTypeLabel, Build, ItemCountTypes). It depends only on the plexapi wire types; all behaviour here is deterministic and side-effect free.
Index ¶
Constants ¶
const ( TypeMovie = "movie" TypeShow = "show" TypeArtist = "artist" TypePhoto = "photo" TypeHomevideo = "homevideo" )
Library types recognised by the exporter. Values match the Plex server's "type" field on a library directory; they are part of the frozen wire/log/metric contract and must not change.
const ( TypeEpisode = "episode" TypeTrack = "track" TypeClip = "clip" )
Session media types observed in Plex playback notifications.
const ( PluginIdentifier = "com.plexapp.plugins.library" FeatureContent = "content" CountLabelItems = "items" )
Plex API identifiers and feature types.
Variables ¶
var KnownSessionMediaTypes = map[string]bool{ TypeMovie: true, TypeEpisode: true, TypeTrack: true, TypeClip: true, TypePhoto: true, }
KnownSessionMediaTypes is the set of media types valid as Prometheus label values for session metrics. Unknown values are normalised to "other" by the collector.
Functions ¶
func ContentTypeLabel ¶
ContentTypeLabel returns the plural noun used as the "content_type" Prometheus label for libraries of libType.
func ItemCountTypes ¶
ItemCountTypes returns the `type=` query params to try in order for the given library type. Empty string means no filter (default path).