Skip to main content

spoolframe_types/
lib.rs

1//! The types every Spoolframe client sees: the media model and its
2//! identifiers.
3//!
4//! These are Spoolframe's own models, not Plex's. Plex is a source of
5//! metadata behind the server; these types do not depend on it.
6//!
7//! Permissively licensed (MIT OR Apache-2.0) so that any client, open or
8//! proprietary, can link it. It never depends on an AGPL server crate.
9
10pub mod browse;
11pub mod codec;
12pub mod codec_string;
13pub mod date;
14mod duration_ms;
15pub mod id;
16pub mod language;
17pub mod media;
18pub mod model;
19pub mod platform;
20pub mod preferences;
21pub mod required;
22pub mod role;
23pub mod search;
24#[cfg(test)]
25mod test_support;
26
27pub use browse::{
28    Counted, DynamicRange, FilterPart, ItemFilter, ItemFilterValues, ItemSort, Resolution, SortKey,
29    WatchedState,
30};
31pub use codec::{
32    AudioCodec, ClientCapabilities, Container, Delivery, DisplayCapabilities, HdrFormat,
33    SubtitleFormat, VideoCodec, VideoLimits,
34};
35pub use codec_string::{CodecString, CodecStringError, Tier};
36pub use date::{CalendarDate, DateError};
37pub use id::{ArtworkId, IdError, LibraryId, MediaId, MediaKind, Namespace, PersonId};
38pub use media::{
39    AudioRole, AudioTrack, MediaTracks, QuotaOf, SubtitleDownload, SubtitleDownloaded,
40    SubtitleOrigin, SubtitleResult, SubtitleRole, SubtitleSearch, SubtitleSource,
41    SubtitleSourceState, SubtitleSourceStatus, SubtitleSync, SubtitleTiming, SubtitleTrack,
42    VideoTrack,
43};
44pub use model::{
45    Album, Artist, Artwork, ArtworkKind, CastMember, Episode, Item, Library, LibraryKind,
46    LibraryServer, Marker, MarkerKind, Movie, PlaybackState, Season, Show, Track,
47};
48pub use platform::Platform;
49pub use preferences::{
50    AudioPreferences, BitmapPreference, ForcedPreference, SdhPreference, SubtitleMode,
51    SubtitlePreferences, TrackPreferences,
52};
53pub use role::Role;
54pub use search::{Person, PersonRole, SearchKind, SearchScope};
55
56pub mod pin;
57
58/// The domain every server's app passkeys are made under: a server's
59/// relying party is `<server id>.spoolframe.app`. Every client and the
60/// admin API use this one value.
61pub const APP_RP_DOMAIN: &str = "spoolframe.app";