Minor open videos improvements

This commit is contained in:
Arkadiusz Fal 2022-11-10 22:20:35 +01:00
parent 50479d6b2f
commit aeb7bac886
2 changed files with 6 additions and 2 deletions

View File

@ -67,6 +67,10 @@ struct OpenVideosModel {
} }
func openURLs(_ urls: [URL], removeQueueItems: Bool, playbackMode: OpenVideosModel.PlaybackMode) { func openURLs(_ urls: [URL], removeQueueItems: Bool, playbackMode: OpenVideosModel.PlaybackMode) {
guard !urls.isEmpty else {
return
}
logger.info("opening \(urls.count) urls") logger.info("opening \(urls.count) urls")
urls.forEach { logger.info("\($0.absoluteString)") } urls.forEach { logger.info("\($0.absoluteString)") }

View File

@ -2,7 +2,7 @@ import SwiftUI
struct OpenVideosView: View { struct OpenVideosView: View {
@State private var presentingFileImporter = false @State private var presentingFileImporter = false
@State private var urlsToOpenText = "https://r.yattee.stream/demo/mp4/1.mp4\nhttps://r.yattee.stream/demo/mp4/2.mp4\nhttps://r.yattee.stream/demo/mp4/3.mp4\nhttps://www.youtube.com/watch?v=N9WHp8DG2WY" @State private var urlsToOpenText = ""
@State private var playbackMode = OpenVideosModel.PlaybackMode.playNow @State private var playbackMode = OpenVideosModel.PlaybackMode.playNow
@State private var removeQueueItems = false @State private var removeQueueItems = false
@ -46,7 +46,7 @@ struct OpenVideosView: View {
TextEditor(text: $urlsToOpenText) TextEditor(text: $urlsToOpenText)
.padding(2) .padding(2)
.border(Color(white: 0.8), width: 1) .border(Color(white: 0.8), width: 1)
.frame(maxHeight: 200) .frame(minHeight: 100, maxHeight: 200)
#if !os(macOS) #if !os(macOS)
.keyboardType(.URL) .keyboardType(.URL)
#endif #endif