Code reference · Source
:source:api
The protocol contract. Adding a format means implementing these and nothing else.
dev.quiblo.source.api
The architectural invariant this package exists to serve: the source layer is abstracted. Adding Stalker, XMLTV or any future protocol means adding one implementation and changing zero feature modules.
Capabilities beyond the base contract are separate interfaces. A source
that cannot describe films simply does not implement VodSource, so asking one for
a plot is a compile-time impossibility rather than a runtime null — and the distinction
between "this failed" and "this was never possible" survives all the way to the UI, where an
M3U film shows its artwork and title without an error.
interfaceMediaSource
The base contract: authenticate and return a catalogue.
interfaceVodSource
Optional: a film's plot, cover and runtime.
interfaceSeriesSource
Optional: seasons and episodes for a series.
interfaceGuideSource
Optional: programme data for a channel — now and next, or the whole listing.
Separate for the same reason as the others. An M3U playlist carries no schedule, so it does not implement this — the absence of a guide is a property of the format, not a failure.
Two calls, because they are asked for at different moments and cost different amounts.
guideFor is the small window a list row shows; fullGuideFor is
everything the provider holds, for a timeline, and is made only when a viewer asks. On Xtream
they are get_short_epg and get_simple_data_table.
fullGuideFor defaults to guideFor, so a provider
with only one kind of guide call is complete without writing anything: it returns the window it
has, the timeline draws that window, and the screen is honest about being short rather than
empty.
interfaceContentFetcher
Fetches a URL as text. The seam that keeps parsers pure JVM.
Because the parsers depend on this interface rather than on OkHttp, they can be tested
against a string in a plain JVM test — which is why :source:m3u carries the
highest coverage in the project.
interfaceCredentialStore
Reads credentials without the source layer knowing how they are stored.
interfacePanelBlockStore
Remembers that a panel refused the account, across restarts.
classCredentials
A username and password, kept out of logs and exports.
data classSourceRequest
Which source is being asked, and at what base URL.
data classSourceReport
How a refresh went: entries parsed, and entries skipped.
Skipped entries are counted and surfaced — "Loaded 20002 channels. 2 entries could not be read and were skipped" — rather than failing the whole import or silently dropping them.
sealed interfaceSourceError
Why something failed: unreachable, unauthorised, blocked, not found, malformed.
A closed set rather than an exception, so every caller has to decide what to do about a blocked panel — the case that used to be swallowed as "this account has no films".
sealed interfaceSourceResult / FetchResult / GuideResult / VodDetailsResult / SeriesDetailsResult
Success-or-failure results, one per call shape.