mirror of
https://github.com/TeamNewPipe/NewPipe
synced 2025-01-08 16:30:34 +00:00
media browser: rename remote -> isRemote
This commit is contained in:
parent
7062009223
commit
fad463a403
@ -123,8 +123,8 @@ class MediaBrowserConnector(private val playerService: PlayerService) : Playback
|
|||||||
|
|
||||||
private fun createPlaylistMediaItem(playlist: PlaylistLocalItem): MediaBrowserCompat.MediaItem {
|
private fun createPlaylistMediaItem(playlist: PlaylistLocalItem): MediaBrowserCompat.MediaItem {
|
||||||
val builder = MediaDescriptionCompat.Builder()
|
val builder = MediaDescriptionCompat.Builder()
|
||||||
val remote = playlist is PlaylistRemoteEntity
|
val isRemote = playlist is PlaylistRemoteEntity
|
||||||
builder.setMediaId(createMediaIdForInfoItem(remote, playlist.uid))
|
builder.setMediaId(createMediaIdForInfoItem(isRemote, playlist.uid))
|
||||||
.setTitle(playlist.orderingName)
|
.setTitle(playlist.orderingName)
|
||||||
.setIconUri(Uri.parse(playlist.thumbnailUrl))
|
.setIconUri(Uri.parse(playlist.thumbnailUrl))
|
||||||
|
|
||||||
@ -168,9 +168,9 @@ class MediaBrowserConnector(private val playerService: PlayerService) : Playback
|
|||||||
.appendPath(playlistType)
|
.appendPath(playlistType)
|
||||||
|
|
||||||
private fun buildLocalPlaylistItemMediaId(
|
private fun buildLocalPlaylistItemMediaId(
|
||||||
remote: Boolean,
|
isRemote: Boolean,
|
||||||
playlistId: Long,
|
playlistId: Long,
|
||||||
) = buildPlaylistMediaId(if (remote) ID_REMOTE else ID_LOCAL)
|
) = buildPlaylistMediaId(if (isRemote) ID_REMOTE else ID_LOCAL)
|
||||||
.appendPath(playlistId.toString())
|
.appendPath(playlistId.toString())
|
||||||
|
|
||||||
private fun buildInfoItemMediaId(item: InfoItem) =
|
private fun buildInfoItemMediaId(item: InfoItem) =
|
||||||
@ -181,9 +181,9 @@ class MediaBrowserConnector(private val playerService: PlayerService) : Playback
|
|||||||
.appendQueryParameter(ID_URL, item.url)
|
.appendQueryParameter(ID_URL, item.url)
|
||||||
|
|
||||||
private fun createMediaIdForInfoItem(
|
private fun createMediaIdForInfoItem(
|
||||||
remote: Boolean,
|
isRemote: Boolean,
|
||||||
playlistId: Long,
|
playlistId: Long,
|
||||||
) = buildLocalPlaylistItemMediaId(remote, playlistId)
|
) = buildLocalPlaylistItemMediaId(isRemote, playlistId)
|
||||||
.build()
|
.build()
|
||||||
.toString()
|
.toString()
|
||||||
|
|
||||||
@ -224,10 +224,10 @@ class MediaBrowserConnector(private val playerService: PlayerService) : Playback
|
|||||||
}
|
}
|
||||||
|
|
||||||
private fun createMediaIdForPlaylistIndex(
|
private fun createMediaIdForPlaylistIndex(
|
||||||
remote: Boolean,
|
isRemote: Boolean,
|
||||||
playlistId: Long,
|
playlistId: Long,
|
||||||
index: Int,
|
index: Int,
|
||||||
) = buildLocalPlaylistItemMediaId(remote, playlistId)
|
) = buildLocalPlaylistItemMediaId(isRemote, playlistId)
|
||||||
.appendPath(index.toString())
|
.appendPath(index.toString())
|
||||||
.build()
|
.build()
|
||||||
.toString()
|
.toString()
|
||||||
|
Loading…
Reference in New Issue
Block a user