LibraryApi

class LibraryApi(api: ApiClient) : Api

Constructors

Link copied to clipboard
constructor(api: ApiClient)

Functions

Link copied to clipboard
suspend fun deleteItem(itemId: UUID): Response<Unit>

Deletes an item from the library and filesystem.

Link copied to clipboard
suspend fun deleteItems(ids: Collection<UUID>? = emptyList()): Response<Unit>

Deletes items from the library and filesystem.

Link copied to clipboard
suspend fun getAncestors(itemId: UUID, userId: UUID? = null): Response<List<BaseItemDto>>

Gets all parents of an item.

Link copied to clipboard
suspend fun getDownload(itemId: UUID): Response<ByteArray>

Downloads item media.

Link copied to clipboard
fun getDownloadUrl(itemId: UUID): String

Downloads item media.

Link copied to clipboard
suspend fun getFile(itemId: UUID): Response<ByteArray>

Get the original file of an item.

Link copied to clipboard
fun getFileUrl(itemId: UUID): String

Get the original file of an item.

Link copied to clipboard
suspend fun getIntros(itemId: UUID, userId: UUID? = null): Response<BaseItemDtoQueryResult>

Gets intros to play before the main media item plays.

Link copied to clipboard
suspend fun getItem(itemId: UUID, userId: UUID? = null): Response<BaseItemDto>

Gets an item from a user's library.

Link copied to clipboard
suspend fun getItemCounts(userId: UUID? = null, isFavorite: Boolean? = null): Response<ItemCounts>

Get item counts.

Link copied to clipboard
suspend fun getItems(request: GetItemsRequest = GetItemsRequest()): Response<BaseItemDtoQueryResult>
suspend fun getItems(userId: UUID? = null, maxOfficialRating: String? = null, hasThemeSong: Boolean? = null, hasThemeVideo: Boolean? = null, hasSubtitles: Boolean? = null, hasSpecialFeature: Boolean? = null, hasTrailer: Boolean? = null, adjacentTo: UUID? = null, indexNumber: Int? = null, parentIndexNumber: Int? = null, hasParentalRating: Boolean? = null, isHd: Boolean? = null, is4k: Boolean? = null, locationTypes: Collection<LocationType>? = emptyList(), excludeLocationTypes: Collection<LocationType>? = emptyList(), isMissing: Boolean? = null, isUnaired: Boolean? = null, minCommunityRating: Double? = null, minCriticRating: Double? = null, minPremiereDate: DateTime? = null, minDateLastSaved: DateTime? = null, minDateLastSavedForUser: DateTime? = null, maxPremiereDate: DateTime? = null, hasOverview: Boolean? = null, hasImdbId: Boolean? = null, hasTmdbId: Boolean? = null, hasTvdbId: Boolean? = null, isMovie: Boolean? = null, isSeries: Boolean? = null, isNews: Boolean? = null, isKids: Boolean? = null, isSports: Boolean? = null, excludeItemIds: Collection<UUID>? = emptyList(), startIndex: Int? = null, limit: Int? = null, recursive: Boolean? = null, searchTerm: String? = null, sortOrder: Collection<SortOrder>? = emptyList(), parentId: UUID? = null, fields: Collection<ItemFields>? = emptyList(), excludeItemTypes: Collection<BaseItemKind>? = emptyList(), includeItemTypes: Collection<BaseItemKind>? = emptyList(), filters: Collection<ItemFilter>? = emptyList(), isFavorite: Boolean? = null, mediaTypes: Collection<MediaType>? = emptyList(), imageTypes: Collection<ImageType>? = emptyList(), sortBy: Collection<ItemSortBy>? = emptyList(), isPlayed: Boolean? = null, genres: Collection<String>? = emptyList(), officialRatings: Collection<String>? = emptyList(), tags: Collection<String>? = emptyList(), years: Collection<Int>? = emptyList(), enableUserData: Boolean? = null, imageTypeLimit: Int? = null, enableImageTypes: Collection<ImageType>? = emptyList(), person: String? = null, personIds: Collection<UUID>? = emptyList(), personTypes: Collection<String>? = emptyList(), studios: Collection<String>? = emptyList(), artists: Collection<String>? = emptyList(), excludeArtistIds: Collection<UUID>? = emptyList(), artistIds: Collection<UUID>? = emptyList(), albumArtistIds: Collection<UUID>? = emptyList(), contributingArtistIds: Collection<UUID>? = emptyList(), albums: Collection<String>? = emptyList(), albumIds: Collection<UUID>? = emptyList(), ids: Collection<UUID>? = emptyList(), videoTypes: Collection<VideoType>? = emptyList(), minOfficialRating: String? = null, isLocked: Boolean? = null, isPlaceHolder: Boolean? = null, hasOfficialRating: Boolean? = null, collapseBoxSetItems: Boolean? = null, minWidth: Int? = null, minHeight: Int? = null, maxWidth: Int? = null, maxHeight: Int? = null, is3d: Boolean? = null, seriesStatus: Collection<SeriesStatus>? = emptyList(), nameStartsWithOrGreater: String? = null, nameStartsWith: String? = null, nameLessThan: String? = null, studioIds: Collection<UUID>? = emptyList(), genreIds: Collection<UUID>? = emptyList(), enableTotalRecordCount: Boolean? = true, enableImages: Boolean? = true): Response<BaseItemDtoQueryResult>

Gets items based on a query.

Link copied to clipboard
suspend fun getLatestMedia(request: GetLatestMediaRequest = GetLatestMediaRequest()): Response<List<BaseItemDto>>
suspend fun getLatestMedia(userId: UUID? = null, parentId: UUID? = null, fields: Collection<ItemFields>? = emptyList(), includeItemTypes: Collection<BaseItemKind>? = emptyList(), isPlayed: Boolean? = null, enableImages: Boolean? = null, imageTypeLimit: Int? = null, enableImageTypes: Collection<ImageType>? = emptyList(), enableUserData: Boolean? = null, limit: Int? = 20, groupItems: Boolean? = true): Response<List<BaseItemDto>>

Gets latest media.

Link copied to clipboard
suspend fun getLibraryOptionsInfo(libraryContentType: CollectionType? = null, isNewLibrary: Boolean? = false): Response<LibraryOptionsResultDto>

Gets the library options info.

Link copied to clipboard
suspend fun getLocalTrailers(itemId: UUID, userId: UUID? = null): Response<List<BaseItemDto>>

Gets local trailers for an item.

Link copied to clipboard
suspend fun getMediaFolders(isHidden: Boolean? = null): Response<BaseItemDtoQueryResult>

Gets all user media folders.

Link copied to clipboard

Gets a list of physical paths from virtual folders.

Link copied to clipboard
suspend fun getResumeItems(request: GetResumeItemsRequest = GetResumeItemsRequest()): Response<BaseItemDtoQueryResult>
suspend fun getResumeItems(userId: UUID? = null, startIndex: Int? = null, limit: Int? = null, searchTerm: String? = null, parentId: UUID? = null, fields: Collection<ItemFields>? = emptyList(), mediaTypes: Collection<MediaType>? = emptyList(), enableUserData: Boolean? = null, imageTypeLimit: Int? = null, enableImageTypes: Collection<ImageType>? = emptyList(), excludeItemTypes: Collection<BaseItemKind>? = emptyList(), includeItemTypes: Collection<BaseItemKind>? = emptyList(), enableTotalRecordCount: Boolean? = true, enableImages: Boolean? = true, excludeActiveSessions: Boolean? = false): Response<BaseItemDtoQueryResult>

Gets items based on a query.

Link copied to clipboard
suspend fun getRootFolder(userId: UUID? = null): Response<BaseItemDto>

Gets the root folder from a user's library.

Link copied to clipboard
suspend fun getSimilarAlbums(itemId: UUID, excludeArtistIds: Collection<UUID>? = emptyList(), userId: UUID? = null, limit: Int? = null, fields: Collection<ItemFields>? = emptyList()): Response<BaseItemDtoQueryResult>

Gets similar items.

Link copied to clipboard
suspend fun getSimilarArtists(itemId: UUID, excludeArtistIds: Collection<UUID>? = emptyList(), userId: UUID? = null, limit: Int? = null, fields: Collection<ItemFields>? = emptyList()): Response<BaseItemDtoQueryResult>

Gets similar items.

Link copied to clipboard
suspend fun getSimilarItems(itemId: UUID, excludeArtistIds: Collection<UUID>? = emptyList(), userId: UUID? = null, limit: Int? = null, fields: Collection<ItemFields>? = emptyList()): Response<BaseItemDtoQueryResult>

Gets similar items.

Link copied to clipboard
suspend fun getSimilarMovies(itemId: UUID, excludeArtistIds: Collection<UUID>? = emptyList(), userId: UUID? = null, limit: Int? = null, fields: Collection<ItemFields>? = emptyList()): Response<BaseItemDtoQueryResult>

Gets similar items.

Link copied to clipboard
suspend fun getSimilarShows(itemId: UUID, excludeArtistIds: Collection<UUID>? = emptyList(), userId: UUID? = null, limit: Int? = null, fields: Collection<ItemFields>? = emptyList()): Response<BaseItemDtoQueryResult>

Gets similar items.

Link copied to clipboard
suspend fun getSimilarTrailers(itemId: UUID, excludeArtistIds: Collection<UUID>? = emptyList(), userId: UUID? = null, limit: Int? = null, fields: Collection<ItemFields>? = emptyList()): Response<BaseItemDtoQueryResult>

Gets similar items.

Link copied to clipboard
suspend fun getSpecialFeatures(itemId: UUID, userId: UUID? = null): Response<List<BaseItemDto>>

Gets special features for an item.

Link copied to clipboard
suspend fun getThemeMedia(itemId: UUID, userId: UUID? = null, inheritFromParent: Boolean? = false, sortBy: Collection<ItemSortBy>? = emptyList(), sortOrder: Collection<SortOrder>? = emptyList()): Response<AllThemeMediaResult>

Get theme songs and videos for an item.

Link copied to clipboard
suspend fun getThemeSongs(itemId: UUID, userId: UUID? = null, inheritFromParent: Boolean? = false, sortBy: Collection<ItemSortBy>? = emptyList(), sortOrder: Collection<SortOrder>? = emptyList()): Response<ThemeMediaResult>

Get theme songs for an item.

Link copied to clipboard
suspend fun getThemeVideos(itemId: UUID, userId: UUID? = null, inheritFromParent: Boolean? = false, sortBy: Collection<ItemSortBy>? = emptyList(), sortOrder: Collection<SortOrder>? = emptyList()): Response<ThemeMediaResult>

Get theme videos for an item.

Link copied to clipboard
suspend fun postAddedMovies(tmdbId: String? = null, imdbId: String? = null): Response<Unit>

Reports that new movies have been added by an external source.

Link copied to clipboard
suspend fun postAddedSeries(tvdbId: String? = null): Response<Unit>

Reports that new episodes of a series have been added by an external source.

Link copied to clipboard

Reports that new movies have been added by an external source.

Link copied to clipboard
suspend fun postUpdatedMovies(tmdbId: String? = null, imdbId: String? = null): Response<Unit>

Reports that new movies have been added by an external source.

Link copied to clipboard
suspend fun postUpdatedSeries(tvdbId: String? = null): Response<Unit>

Reports that new episodes of a series have been added by an external source.

Link copied to clipboard
suspend fun refreshItem(itemId: UUID, metadataRefreshMode: MetadataRefreshMode? = MetadataRefreshMode.NONE, imageRefreshMode: MetadataRefreshMode? = MetadataRefreshMode.NONE, replaceAllMetadata: Boolean? = false, replaceAllImages: Boolean? = false, regenerateTrickplay: Boolean? = false): Response<Unit>

Refreshes metadata for an item.

Link copied to clipboard
suspend fun refreshLibrary(): Response<Unit>

Starts a library scan.