2021-08-30 03:06:18 +05:30
|
|
|
import Siesta
|
|
|
|
import SwiftUI
|
|
|
|
|
|
|
|
struct PlaylistVideosView: View {
|
|
|
|
let playlist: Playlist
|
|
|
|
|
2021-10-22 04:59:10 +05:30
|
|
|
var videos: [ContentItem] {
|
|
|
|
ContentItem.array(of: playlist.videos)
|
|
|
|
}
|
|
|
|
|
2021-08-30 03:06:18 +05:30
|
|
|
init(_ playlist: Playlist) {
|
|
|
|
self.playlist = playlist
|
|
|
|
}
|
|
|
|
|
|
|
|
var body: some View {
|
2021-10-06 01:50:09 +05:30
|
|
|
PlayerControlsView {
|
2021-10-22 04:59:10 +05:30
|
|
|
VerticalCells(items: videos)
|
2021-10-06 01:50:09 +05:30
|
|
|
#if !os(tvOS)
|
|
|
|
.navigationTitle("\(playlist.title) Playlist")
|
|
|
|
#endif
|
|
|
|
}
|
2021-11-02 03:26:18 +05:30
|
|
|
.toolbar {
|
|
|
|
ToolbarItem {
|
|
|
|
FavoriteButton(item: FavoriteItem(section: .playlist(playlist.id)))
|
|
|
|
}
|
|
|
|
}
|
2021-08-30 03:06:18 +05:30
|
|
|
}
|
|
|
|
}
|