removed unused dataSourceFactory, commented debug output
This commit is contained in:
parent
e7601e1dd5
commit
59e18bc5c0
|
@ -220,7 +220,7 @@ open class APIDataSource private constructor(
|
||||||
|
|
||||||
@Throws(HttpDataSourceException::class)
|
@Throws(HttpDataSourceException::class)
|
||||||
override fun read(buffer: ByteArray, offset: Int, length: Int): Int {
|
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 {
|
return try {
|
||||||
readInternal(buffer, offset, length)
|
readInternal(buffer, offset, length)
|
||||||
} catch (e: IOException) {
|
} catch (e: IOException) {
|
||||||
|
|
|
@ -85,8 +85,8 @@ class CachedDataSource(
|
||||||
|
|
||||||
@Suppress("MagicNumber")
|
@Suppress("MagicNumber")
|
||||||
override fun read(buffer: ByteArray, offset: Int, length: Int): Int {
|
override fun read(buffer: ByteArray, offset: Int, length: Int): Int {
|
||||||
if (offset > 0 || length > 4)
|
//if (offset > 0 || length > 4)
|
||||||
Timber.d("CachedDatasource: Read: %s %s", offset, length)
|
// Timber.d("CachedDatasource: Read: %s %s", offset, length)
|
||||||
return if (cachePath != null) {
|
return if (cachePath != null) {
|
||||||
try {
|
try {
|
||||||
readInternal(buffer, offset, length)
|
readInternal(buffer, offset, length)
|
||||||
|
|
|
@ -44,7 +44,6 @@ class PlaybackService : MediaLibraryService(), KoinComponent {
|
||||||
private lateinit var player: ExoPlayer
|
private lateinit var player: ExoPlayer
|
||||||
private lateinit var mediaLibrarySession: MediaLibrarySession
|
private lateinit var mediaLibrarySession: MediaLibrarySession
|
||||||
private lateinit var apiDataSource: APIDataSource.Factory
|
private lateinit var apiDataSource: APIDataSource.Factory
|
||||||
private lateinit var dataSourceFactory: DataSource.Factory
|
|
||||||
|
|
||||||
private lateinit var librarySessionCallback: MediaLibrarySession.MediaLibrarySessionCallback
|
private lateinit var librarySessionCallback: MediaLibrarySession.MediaLibrarySessionCallback
|
||||||
|
|
||||||
|
@ -102,8 +101,6 @@ class PlaybackService : MediaLibraryService(), KoinComponent {
|
||||||
|
|
||||||
// Create a MediaSource which passes calls through our OkHttp Stack
|
// Create a MediaSource which passes calls through our OkHttp Stack
|
||||||
apiDataSource = APIDataSource.Factory(subsonicAPIClient)
|
apiDataSource = APIDataSource.Factory(subsonicAPIClient)
|
||||||
|
|
||||||
dataSourceFactory = APIDataSource.Factory(subsonicAPIClient)
|
|
||||||
val cacheDataSourceFactory: DataSource.Factory = CachedDataSource.Factory(apiDataSource)
|
val cacheDataSourceFactory: DataSource.Factory = CachedDataSource.Factory(apiDataSource)
|
||||||
|
|
||||||
// Create a renderer with HW rendering support
|
// Create a renderer with HW rendering support
|
||||||
|
|
Loading…
Reference in New Issue