From 4baa7bc0463e0f46e879ca33e2ef4a916ed52c9d Mon Sep 17 00:00:00 2001 From: nomadics9 Date: Fri, 19 Jul 2024 05:10:32 +0300 Subject: [PATCH] lint: klint standard --- .../jellyfin/repository/JellyfinRepository.kt | 68 ++++++++++++++++--- .../repository/JellyfinRepositoryImpl.kt | 1 + 2 files changed, 59 insertions(+), 10 deletions(-) diff --git a/data/src/main/java/dev/jdtech/jellyfin/repository/JellyfinRepository.kt b/data/src/main/java/dev/jdtech/jellyfin/repository/JellyfinRepository.kt index 2b4380c0..7c1d6725 100644 --- a/data/src/main/java/dev/jdtech/jellyfin/repository/JellyfinRepository.kt +++ b/data/src/main/java/dev/jdtech/jellyfin/repository/JellyfinRepository.kt @@ -29,7 +29,9 @@ interface JellyfinRepository { suspend fun getUserViews(): List suspend fun getItem(itemId: UUID): BaseItemDto + suspend fun getEpisode(itemId: UUID): FindroidEpisode + suspend fun getMovie(itemId: UUID): FindroidMovie suspend fun getShow(itemId: UUID): FindroidShow @@ -70,7 +72,10 @@ interface JellyfinRepository { suspend fun getLatestMedia(parentId: UUID): List - suspend fun getSeasons(seriesId: UUID, offline: Boolean = false): List + suspend fun getSeasons( + seriesId: UUID, + offline: Boolean = false, + ): List suspend fun getNextUp(seriesId: UUID? = null): List @@ -83,21 +88,40 @@ interface JellyfinRepository { offline: Boolean = false, ): List - suspend fun getMediaSources(itemId: UUID, includePath: Boolean = false): List + suspend fun getMediaSources( + itemId: UUID, + includePath: Boolean = false, + ): List - suspend fun getStreamUrl(itemId: UUID, mediaSourceId: String, playSessionId: String? = null): String + suspend fun getStreamUrl( + itemId: UUID, + mediaSourceId: String, + playSessionId: String? = null, + ): String suspend fun getIntroTimestamps(itemId: UUID): Intro? - suspend fun getTrickplayData(itemId: UUID, width: Int, index: Int): ByteArray? + suspend fun getTrickplayData( + itemId: UUID, + width: Int, + index: Int, + ): ByteArray? suspend fun postCapabilities() suspend fun postPlaybackStart(itemId: UUID) - suspend fun postPlaybackStop(itemId: UUID, positionTicks: Long, playedPercentage: Int) + suspend fun postPlaybackStop( + itemId: UUID, + positionTicks: Long, + playedPercentage: Int, + ) - suspend fun postPlaybackProgress(itemId: UUID, positionTicks: Long, isPaused: Boolean) + suspend fun postPlaybackProgress( + itemId: UUID, + positionTicks: Long, + isPaused: Boolean, + ) suspend fun markAsFavorite(itemId: UUID) @@ -121,13 +145,37 @@ interface JellyfinRepository { suspend fun getVideoTranscodeBitRate(transcodeResolution: Int): Pair - suspend fun buildDeviceProfile(maxBitrate: Int, container: String, context: EncodingContext): DeviceProfile + suspend fun buildDeviceProfile( + maxBitrate: Int, + container: String, + context: EncodingContext, + ): DeviceProfile - suspend fun getVideoStreambyContainerUrl(itemId: UUID, deviceId: String, mediaSourceId: String, playSessionId: String, videoBitrate: Int, container: String): String + suspend fun getVideoStreambyContainerUrl( + itemId: UUID, + deviceId: String, + mediaSourceId: String, + playSessionId: String, + videoBitrate: + @Suppress("ktlint:standard:max-line-length") + Int, + container: String, + ): String - suspend fun getTranscodedVideoStream(itemId: UUID, deviceId: String, mediaSourceId: String, playSessionId: String, videoBitrate: Int): String + suspend fun getTranscodedVideoStream( + itemId: UUID, + deviceId: String, + mediaSourceId: String, + playSessionId: String, + videoBitrate: Int, + ): String - suspend fun getPostedPlaybackInfo(itemId: UUID, enableDirectStream: Boolean, deviceProfile: DeviceProfile ,maxBitrate: Int): Response + suspend fun getPostedPlaybackInfo( + itemId: UUID, + enableDirectStream: Boolean, + deviceProfile: DeviceProfile, + maxBitrate: Int, + ): Response suspend fun stopEncodingProcess(playSessionId: String) } diff --git a/data/src/main/java/dev/jdtech/jellyfin/repository/JellyfinRepositoryImpl.kt b/data/src/main/java/dev/jdtech/jellyfin/repository/JellyfinRepositoryImpl.kt index c8d6d66d..5e4e1a6e 100644 --- a/data/src/main/java/dev/jdtech/jellyfin/repository/JellyfinRepositoryImpl.kt +++ b/data/src/main/java/dev/jdtech/jellyfin/repository/JellyfinRepositoryImpl.kt @@ -710,6 +710,7 @@ class JellyfinRepositoryImpl( deviceId: String, mediaSourceId: String, playSessionId: String, + @Suppress("ktlint:standard:max-line-length") videoBitrate: Int, container: String, ): String {