mirror of
https://github.com/yattee/yattee.git
synced 2025-08-06 10:44:06 +00:00
Local videos fixes
This commit is contained in:
@@ -806,7 +806,7 @@ final class PlayerModel: ObservableObject {
|
||||
|
||||
#if os(macOS)
|
||||
var windowTitle: String {
|
||||
currentVideo.isNil ? "Not Playing" : "\(currentVideo!.title) - \(currentVideo!.author)"
|
||||
currentVideo.isNil ? "Not Playing" : "\(currentVideo!.displayTitle) - \(currentVideo!.displayAuthor)"
|
||||
}
|
||||
#else
|
||||
func handleEnterForeground() {
|
||||
|
@@ -59,16 +59,21 @@ extension PlayerModel {
|
||||
|
||||
DispatchQueue.main.async { [weak self] in
|
||||
guard let self else { return }
|
||||
guard let video = self.currentVideo else {
|
||||
guard let video = item.video else {
|
||||
return
|
||||
}
|
||||
|
||||
self.videoBeingOpened = nil
|
||||
|
||||
if video.isLocal {
|
||||
self.availableStreams = video.streams
|
||||
return
|
||||
}
|
||||
|
||||
guard let playerInstance = self.playerInstance else { return }
|
||||
let streamsInstance = video.streams.compactMap(\.instance).first
|
||||
|
||||
if !video.isLocal, video.streams.isEmpty || streamsInstance != playerInstance {
|
||||
if video.streams.isEmpty || streamsInstance != playerInstance {
|
||||
self.loadAvailableStreams(video)
|
||||
} else {
|
||||
self.availableStreams = self.streamsWithInstance(instance: playerInstance, streams: video.streams)
|
||||
|
Reference in New Issue
Block a user