mirror of
https://github.com/yattee/yattee.git
synced 2026-10-29 16:07:20 +00:00
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:
@@ -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)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user