System topic
Read the server's info, counts and clock, run its administration, and read its lists for pickers.
System
Server info
// No token needed.
final public = await jellyfin.system.publicInfo();
print('${public.serverName} ${public.version} (${public.id})');
// With a token: adds the operating system, and admin fields for an admin.
final info = await jellyfin.system.info();
// True when the server answers; never throws.
if (await jellyfin.system.ping()) {
print('reachable');
}
Call publicInfo() before asking for credentials, to check that the URL
points at a Jellyfin server. ping() calls the same route and turns any
failure into false.
Counts, endpoint and clock
final counts = await jellyfin.library.counts();
print('${counts.albumCount} albums, ${counts.songCount} tracks');
final endpoint = await jellyfin.system.endpointInfo(); // isLocal, isInNetwork
final clock = await jellyfin.system.utcTime(); // for clock-skew correction
These return JellyfinItemCounts, JellyfinEndpointInfo and
JellyfinUtcTime. Like every model, each keeps the decoded body in
raw.
Server administration
These calls need an admin token.
final tasks = await jellyfin.scheduledTasks.list();
final devices = await jellyfin.devices.list();
final log = await jellyfin.activityLog.entries(limit: 50);
final scan = tasks.firstWhere((t) => t.key == 'RefreshLibrary');
await jellyfin.scheduledTasks.start(taskId: scan.id);
They return JellyfinScheduledTask, JellyfinDevice and a
JellyfinQueryResult<JellyfinActivityLogEntry>. The "Audio
Normalization" task fills JellyfinItem.normalizationGain in the
libraries that have EnableLUFSScan on.
The rest of the administration API:
| Sub-API | Covers |
|---|---|
system |
storage(), logs(), logFile(), restart(), shutdown() |
configuration |
Server configuration, named sections, branding, default metadata options |
libraryStructure |
Virtual folders: add, remove, rename, media paths, library options |
library |
refresh(), mediaFolders(), physicalPaths(), deleteItem(), the notify…() hooks for external managers |
items |
refresh(), updateMetadata(), updateContentType(), metadataEditorInfo() |
itemLookup |
Remote metadata search for movies, series, albums, artists and more, and applySearchResult() |
remoteImage |
Remote artwork providers, search and download |
plugins, packages |
Installed plugins, their configuration, the catalog and repositories |
startup |
The first-run wizard |
environment |
Directory browsing and path validation for the library setup |
branding |
Login disclaimer and custom CSS |
apiKey, backup, dashboard, clientLog |
API keys, backups, plugin configuration pages, client log upload |
liveTv |
Tuners, listing providers and channel mappings |
These answer typed models with raw too. configuration.getNamed(),
plugins.configuration() and liveTv.schedulesDirectCountries() answer
maps: their shape depends on the key, the plugin or the provider.
Localization
Countries, cultures and ratings
The server's lists for pickers. Read them instead of hard-coding values the server may not accept:
final countries = await jellyfin.localization.countries();
final cultures = await jellyfin.localization.cultures();
final options = await jellyfin.localization.options();
final ratings = await jellyfin.localization.parentalRatings();
for (final r in ratings) {
print('${r.value}: ${r.name}');
}
Each entry is a typed model with its raw map. A JellyfinCountry has
name, displayName and the ISO region codes; a JellyfinCulture the
two- and three-letter ISO codes and display names. A rating's value is
what the server stores, its name the label, such as PG-13.
options() lists the metadata languages the server offers.
Classes
- JellyfinActivityLogApi System
-
/System/ActivityLog— recent server activity. - JellyfinApiKeyApi System
-
/Auth/Keys— API key management. - JellyfinBackupApi System
-
/Backup— server-side backup and restore. - JellyfinBrandingApi System
-
/Branding— branding configuration and custom CSS. - JellyfinClientLogApi System
-
/ClientLog— upload a client-side log file to the server. - JellyfinConfigurationApi System
-
/System/Configuration— server-wide configuration. - JellyfinDashboardApi System
-
/web/Configuration*— admin dashboard configuration pages. - JellyfinDevicesApi System
-
/Devices— admin view of clients that have logged into the server. - JellyfinEnvironmentApi System
-
/Environment— server-host filesystem browse helpers. - JellyfinItemLookupApi System
-
/Items/RemoteSearch/*and/Items/{id}/ExternalIdInfos— metadata-provider lookup. - JellyfinLibraryStructureApi System
-
/Library/VirtualFolders— server-side library configuration. - JellyfinLocalizationApi System
-
/Localization/*— country, culture, and parental-rating catalogs maintained by the server. - JellyfinPackagesApi System
-
/Packagesand/Repositories— install new plugins from a repository. - JellyfinPluginsApi System
-
/Plugins— installed plugin management. - JellyfinRemoteImageApi System
-
/Items/{itemId}/RemoteImages*— fetch images from metadata providers. - JellyfinScheduledTasksApi System
-
/ScheduledTasks— server background tasks (library scan, thumbnail generation, cleanup, …). - JellyfinStartupApi System
-
/Startup— first-run wizard endpoints. - JellyfinSystemApi System
-
/System/*endpoints — server info, public info, ping.