style: run ktlint

This commit is contained in:
FineFindus 2023-08-21 20:09:34 +02:00
parent cada23a816
commit 03d598a559
No known key found for this signature in database
GPG Key ID: 64873EE210FF8E6B
3 changed files with 12 additions and 7 deletions

View File

@ -172,8 +172,7 @@ class OnlinePlayerService : LifecycleService() {
if (PlayingQueue.isEmpty()) {
PlayingQueue.updateQueue(streams!!.toStreamItem(videoId), playlistId, channelId)
insertRelatedStreamsToQueue()
}
else if (PlayingQueue.isLast() && playlistId == null && channelId == null) {
} else if (PlayingQueue.isLast() && playlistId == null && channelId == null) {
insertRelatedStreamsToQueue()
}

View File

@ -4,7 +4,6 @@ import android.annotation.SuppressLint
import android.content.Intent
import android.content.res.Configuration
import android.os.Bundle
import android.util.Log
import android.view.Menu
import android.view.MenuItem
import android.view.ViewGroup

View File

@ -31,7 +31,10 @@ object PlayingQueue {
for (stream in streamItem) {
if (skipExisting && contains(stream)) continue
if (currentStream?.url?.toID() == stream.url?.toID() ||
stream.title.isNullOrBlank()) continue
stream.title.isNullOrBlank()
) {
continue
}
// remove if already present
queue.remove(stream)
queue.add(stream)
@ -187,9 +190,13 @@ object PlayingQueue {
}
fun updateQueue(streamItem: StreamItem, playlistId: String?, channelId: String?) {
if (playlistId != null) insertPlaylist(playlistId, streamItem)
else if (channelId != null) insertChannel(channelId, streamItem)
else updateCurrent(streamItem)
if (playlistId != null) {
insertPlaylist(playlistId, streamItem)
} else if (channelId != null) {
insertChannel(channelId, streamItem)
} else {
updateCurrent(streamItem)
}
}
fun onQueueItemSelected(index: Int) {