Created
April 7, 2018 16:21
-
-
Save AOrobator/da34d39c7eb5a67ce1ac377a23bd1866 to your computer and use it in GitHub Desktop.
OnUnscannedSongClicked
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fun onUnscannedSongClicked(song: DirectoryItemSong) { | |
val songFile = File(song.path) | |
if (songFile.extension in supportedFormats) { | |
target?.showLoading() | |
songRepo | |
.addSongToLibrary(song.path) | |
.subscribe { | |
target?.hideLoading() | |
target?.playSong(it) | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment