From 2942b81a2c4445cf87239429c42d21b8a48ae556 Mon Sep 17 00:00:00 2001 From: casey langen Date: Tue, 28 Nov 2017 21:53:45 -0800 Subject: [PATCH] Updated to Kotlin 1.2.0 and ExoPlayer 2.6.0 --- src/musikdroid/app/build.gradle | 4 ++-- .../service/playback/impl/player/ExoPlayerWrapper.kt | 8 +++++++- .../playback/impl/player/GaplessExoPlayerWrapper.kt | 8 +++++++- src/musikdroid/build.gradle | 2 +- 4 files changed, 17 insertions(+), 5 deletions(-) diff --git a/src/musikdroid/app/build.gradle b/src/musikdroid/app/build.gradle index 7c9db7f03..4c5131172 100644 --- a/src/musikdroid/app/build.gradle +++ b/src/musikdroid/app/build.gradle @@ -88,8 +88,8 @@ dependencies { implementation 'io.reactivex.rxjava2:rxjava:2.1.6' implementation 'io.reactivex.rxjava2:rxandroid:2.0.1' implementation 'io.reactivex.rxjava2:rxkotlin:2.1.0' - implementation 'com.google.android.exoplayer:exoplayer:r2.5.4' - implementation 'com.google.android.exoplayer:extension-okhttp:r2.5.4' + implementation 'com.google.android.exoplayer:exoplayer:2.6.0' + implementation 'com.google.android.exoplayer:extension-okhttp:2.6.0' implementation 'com.simplecityapps:recyclerview-fastscroll:1.0.16' implementation 'com.facebook.stetho:stetho:1.5.0' implementation 'com.github.wooplr:Spotlight:1.2.3' diff --git a/src/musikdroid/app/src/main/java/io/casey/musikcube/remote/service/playback/impl/player/ExoPlayerWrapper.kt b/src/musikdroid/app/src/main/java/io/casey/musikcube/remote/service/playback/impl/player/ExoPlayerWrapper.kt index e2855790c..b2a5fe7c1 100644 --- a/src/musikdroid/app/src/main/java/io/casey/musikcube/remote/service/playback/impl/player/ExoPlayerWrapper.kt +++ b/src/musikdroid/app/src/main/java/io/casey/musikcube/remote/service/playback/impl/player/ExoPlayerWrapper.kt @@ -236,6 +236,12 @@ class ExoPlayerWrapper : PlayerWrapper() { override fun onLoadingChanged(isLoading: Boolean) { } + override fun onSeekProcessed() { + } + + override fun onShuffleModeEnabledChanged(shuffleModeEnabled: Boolean) { + } + override fun onPlayerStateChanged(playWhenReady: Boolean, playbackState: Int) { Preconditions.throwIfNotOnMainThread() @@ -286,7 +292,7 @@ class ExoPlayerWrapper : PlayerWrapper() { } } - override fun onPositionDiscontinuity() { + override fun onPositionDiscontinuity(type: Int) { } override fun onPlaybackParametersChanged(playbackParameters: PlaybackParameters) { diff --git a/src/musikdroid/app/src/main/java/io/casey/musikcube/remote/service/playback/impl/player/GaplessExoPlayerWrapper.kt b/src/musikdroid/app/src/main/java/io/casey/musikcube/remote/service/playback/impl/player/GaplessExoPlayerWrapper.kt index dc5a5be95..0d0f098c9 100644 --- a/src/musikdroid/app/src/main/java/io/casey/musikcube/remote/service/playback/impl/player/GaplessExoPlayerWrapper.kt +++ b/src/musikdroid/app/src/main/java/io/casey/musikcube/remote/service/playback/impl/player/GaplessExoPlayerWrapper.kt @@ -213,6 +213,12 @@ class GaplessExoPlayerWrapper : PlayerWrapper() { override fun onLoadingChanged(isLoading: Boolean) { } + override fun onSeekProcessed() { + } + + override fun onShuffleModeEnabledChanged(shuffleModeEnabled: Boolean) { + } + override fun onPlayerStateChanged(playWhenReady: Boolean, playbackState: Int) { Preconditions.throwIfNotOnMainThread() @@ -263,7 +269,7 @@ class GaplessExoPlayerWrapper : PlayerWrapper() { } } - override fun onPositionDiscontinuity() { + override fun onPositionDiscontinuity(type: Int) { /* window index corresponds to the position of the current song in the queue. the current song should always be 0! if it's not, then that means we advanced to the next one... */ diff --git a/src/musikdroid/build.gradle b/src/musikdroid/build.gradle index c3b7df7ff..8480d6444 100644 --- a/src/musikdroid/build.gradle +++ b/src/musikdroid/build.gradle @@ -1,5 +1,5 @@ buildscript { - ext.kotlin_version = '1.1.61' + ext.kotlin_version = '1.2.0' repositories { jcenter()