Squashed commit of the following:
commitc7d9af4529
Author: Holger Müller <github@euhm.de> Date: Sat Apr 16 17:56:41 2022 +0200 fixed CI failure commit59e18bc5c0
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:
parent
762aeec5d3
commit
788538ee6a
|
@ -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) {
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue