Squashed commit of the following:

commit c7d9af4529
Author: Holger Müller <github@euhm.de>
Date:   Sat Apr 16 17:56:41 2022 +0200

    fixed CI failure

commit 59e18bc5c0
Author: Holger Müller <github@euhm.de>
Date:   Sat Apr 16 17:42:49 2022 +0200

    removed unused dataSourceFactory, commented debug output
This commit is contained in:
tzugen 2022-04-17 06:55:24 +02:00
parent 762aeec5d3
commit 788538ee6a
No known key found for this signature in database
GPG Key ID: 61E9C34BC10EC930
3 changed files with 5 additions and 7 deletions

View File

@ -220,7 +220,7 @@ open class APIDataSource private constructor(
@Throws(HttpDataSourceException::class)
override fun read(buffer: ByteArray, offset: Int, length: Int): Int {
Timber.d("APIDatasource: Read: %s %s", offset, length)
// Timber.d("APIDatasource: Read: %s %s", offset, length)
return try {
readInternal(buffer, offset, length)
} catch (e: IOException) {

View File

@ -85,8 +85,8 @@ class CachedDataSource(
@Suppress("MagicNumber")
override fun read(buffer: ByteArray, offset: Int, length: Int): Int {
if (offset > 0 || length > 4)
Timber.d("CachedDatasource: Read: %s %s", offset, length)
// if (offset > 0 || length > 4)
// Timber.d("CachedDatasource: Read: %s %s", offset, length)
return if (cachePath != null) {
try {
readInternal(buffer, offset, length)

View File

@ -44,7 +44,6 @@ class PlaybackService : MediaLibraryService(), KoinComponent {
private lateinit var player: ExoPlayer
private lateinit var mediaLibrarySession: MediaLibrarySession
private lateinit var apiDataSource: APIDataSource.Factory
private lateinit var dataSourceFactory: DataSource.Factory
private lateinit var librarySessionCallback: MediaLibrarySession.MediaLibrarySessionCallback
@ -102,14 +101,13 @@ class PlaybackService : MediaLibraryService(), KoinComponent {
// Create a MediaSource which passes calls through our OkHttp Stack
apiDataSource = APIDataSource.Factory(subsonicAPIClient)
dataSourceFactory = APIDataSource.Factory(subsonicAPIClient)
val cacheDataSourceFactory: DataSource.Factory = CachedDataSource.Factory(apiDataSource)
// Create a renderer with HW rendering support
val renderer = DefaultRenderersFactory(this)
if (Settings.useHwOffload) renderer.setEnableAudioOffload(true)
if (Settings.useHwOffload)
renderer.setEnableAudioOffload(true)
// Create the player
player = ExoPlayer.Builder(this)