mirror of
https://github.com/libre-tube/LibreTube.git
synced 2025-04-29 16:30:31 +05:30
style: run ktlint
This commit is contained in:
parent
cada23a816
commit
03d598a559
@ -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()
|
||||
}
|
||||
|
||||
|
@ -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
|
||||
|
@ -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) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user