Timeline

interface Timeline

Functions

Link copied to clipboard
abstract suspend fun addToFavorite(mediaIds: Set<Long>)

Mark media by mediaIds as favorites.

Link copied to clipboard
abstract suspend fun copyToAnotherUser(targetUserId: Long, mediaIds: Set<Long>): OperationResult

Copies media for the specified user with targetUserId.

Link copied to clipboard
abstract fun createFilteredFlow(userId: Long, visible: Boolean = true): Flow<List<MediaItem>>
Link copied to clipboard
abstract fun createFilteredPagingFlow(userId: Long, visible: Boolean = true, config: PagingConfig = defaultPagingConfig): Flow<PagingData<MediaItem>>

Creates new flow for for filtered timeline.

Link copied to clipboard
abstract fun createFilteredSectionFlow(userId: Long, range: LongRange, visible: Boolean = true): Flow<List<MediaItem>>
Link copied to clipboard
abstract fun createFilterFlow(userId: Long): Flow<TimelineFilter>
Link copied to clipboard
abstract fun createFlow(userId: Long, visibleOnly: Boolean = true): Flow<List<MediaItem>>
Link copied to clipboard
abstract fun createMediaFlowByIds(mediaIds: Set<Long>): Flow<List<MediaItem>>
Link copied to clipboard
abstract fun createMonthlySectionsGroupedByYearsFlow(userId: Long, visible: Boolean = true): Flow<List<YearSectionInfo>>
Link copied to clipboard
abstract fun createPagingFlow(userId: Long, visibleOnly: Boolean = true, config: PagingConfig = defaultPagingConfig): Flow<PagingData<MediaItem>>

Creates new flow for timeline: all images, videos, uploaded and local.

Link copied to clipboard
abstract fun createSectionFlow(userId: Long, range: LongRange, visible: Boolean = true): Flow<List<MediaItem>>
Link copied to clipboard
abstract fun createSimilarMediaFlow(mediaId: Long): Flow<List<MediaItem>>
Link copied to clipboard
abstract suspend fun deleteFromFavorite(mediaIds: Set<Long>)

Mark media by mediaIds as non favorites.

Link copied to clipboard
abstract suspend fun deleteMedia(mediaIds: Set<Long>): OperationResult

Moves the backend media with the mediaIds to the trash and hide local media.

Link copied to clipboard
abstract suspend fun enqueueToDownload(mediaIds: Set<Long>, priority: DownloadPriority, cacheMode: CacheMode? = null, targetDirUri: Uri? = null)

Adds media with mediaIds to the download queue.

Link copied to clipboard
abstract suspend fun fetchMediaAndCreateFlow(userId: Long, mediaBackendIds: Set<String>): Flow<List<MediaItem>>

Gets media by mediaBackendIds for user with userId.

Link copied to clipboard
abstract suspend fun fetchSimilarMedia(mediaId: Long)

Gets similar for media with mediaId.

Link copied to clipboard
abstract suspend fun getMediaBackendUrl(mediaId: Long): String?
Link copied to clipboard
abstract suspend fun getMediaContent(mediaId: Long): MediaItemContent

Gets media content for media with mediaId.

Link copied to clipboard
abstract suspend fun getMediaExtension(mediaId: Long, type: MediaExtensionType): MediaExtensionItem

Gets media extension with type for media with mediaId.

Link copied to clipboard
abstract suspend fun getMediaExtensions(mediaId: Long): List<MediaExtensionItem>

Gets media extensions for media with mediaId.

Link copied to clipboard
abstract suspend fun getMediaItemsByIds(mediaIds: Set<Long>): List<MediaItem>
Link copied to clipboard
abstract suspend fun moveToAnotherUser(targetUserId: Long, mediaIds: Set<Long>): OperationResult

Move media for the specified user with targetUserId.

Link copied to clipboard
abstract suspend fun setFilter(userId: Long, filter: TimelineFilter)

Controls the filter of the timeline. Filter affects PagingData returned by createFilteredPagingFlow and createFilteredPagingFlow.