2021-08-29 21:36:18 +00:00
|
|
|
import Siesta
|
|
|
|
import SwiftUI
|
|
|
|
|
|
|
|
struct PlaylistVideosView: View {
|
|
|
|
let playlist: Playlist
|
|
|
|
|
2021-10-21 23:29:10 +00:00
|
|
|
var videos: [ContentItem] {
|
|
|
|
ContentItem.array(of: playlist.videos)
|
|
|
|
}
|
|
|
|
|
2021-08-29 21:36:18 +00:00
|
|
|
init(_ playlist: Playlist) {
|
|
|
|
self.playlist = playlist
|
|
|
|
}
|
|
|
|
|
|
|
|
var body: some View {
|
2021-10-05 20:20:09 +00:00
|
|
|
PlayerControlsView {
|
2021-10-21 23:29:10 +00:00
|
|
|
VerticalCells(items: videos)
|
2021-10-05 20:20:09 +00:00
|
|
|
#if !os(tvOS)
|
|
|
|
.navigationTitle("\(playlist.title) Playlist")
|
|
|
|
#endif
|
|
|
|
}
|
2021-11-01 21:56:18 +00:00
|
|
|
.toolbar {
|
|
|
|
ToolbarItem {
|
|
|
|
FavoriteButton(item: FavoriteItem(section: .playlist(playlist.id)))
|
|
|
|
}
|
|
|
|
}
|
2021-08-29 21:36:18 +00:00
|
|
|
}
|
|
|
|
}
|