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