Load a single link from Open Link into its details screen

Open Link gets a Load action that resolves one link and shows its video
details page, playlist or channel screen instead of only playing or
downloading it. Play and Download stay as shortcuts for video links.
Timed links start at their timestamp from the details page, the Show
Details link action opens the details page, and a short extraction cache
avoids re-extracting the same link for details and playback.
This commit is contained in:
Arkadiusz Fal
2026-10-08 18:25:32 +02:00
parent b9e7d88a12
commit 03be964c66
8 changed files with 245 additions and 68 deletions

View File

@@ -47,6 +47,10 @@ struct VideoQueueContext {
/// When set, playback from VideoInfoView must route through
/// `QueueManager.playFromMediaBrowser` using this payload.
var mediaBrowserPlayback: MediaBrowserPlaybackInfo? = nil
/// Position requested by an opened timed link (`?t=`). Unlike `startTime`
/// (a resume position), it is honored as-is and skips the resume prompt.
var linkStartTime: TimeInterval? = nil
/// Whether this context has valid queue information
var hasQueueInfo: Bool {
@@ -91,7 +95,8 @@ extension VideoQueueContext: Equatable {
lhs.videoList == rhs.videoList &&
lhs.videoIndex == rhs.videoIndex &&
lhs.startTime == rhs.startTime &&
lhs.mediaBrowserPlayback == rhs.mediaBrowserPlayback
lhs.mediaBrowserPlayback == rhs.mediaBrowserPlayback &&
lhs.linkStartTime == rhs.linkStartTime
}
}
@@ -104,5 +109,6 @@ extension VideoQueueContext: Hashable {
hasher.combine(videoIndex)
hasher.combine(startTime)
hasher.combine(mediaBrowserPlayback)
hasher.combine(linkStartTime)
}
}