mirror of
https://github.com/yattee/yattee.git
synced 2026-10-23 21:22:53 +00:00
Add a Hide Shorts toggle to the view options
Videos carry isShort from Yattee Server and Piped, and Invidious feed entries are taken as Shorts when they arrive with no length and aren't live or upcoming: the feed comes from RSS, which lists Shorts, while lengths come from the Videos tab, which doesn't. Subscriptions, search and instance browse hide videos known to be Shorts when the toggle is on; videos whose source can't tell are always shown.
This commit is contained in:
@@ -884,7 +884,8 @@ private struct PipedVideo: Decodable, Sendable {
|
||||
thumbnails: Thumbnail.fallbackChain(for: thumbnail.flatMap { URL(string: $0) }),
|
||||
isLive: duration == -1,
|
||||
isUpcoming: false,
|
||||
scheduledStartTime: nil
|
||||
scheduledStartTime: nil,
|
||||
isShort: isShort
|
||||
)
|
||||
}
|
||||
}
|
||||
@@ -1092,6 +1093,7 @@ private struct PipedSearchItem: Decodable, Sendable {
|
||||
let views: Int64?
|
||||
let videos: Int64?
|
||||
let subscribers: Int64?
|
||||
let isShort: Bool?
|
||||
|
||||
var videoId: String? {
|
||||
url?.replacingOccurrences(of: "/watch?v=", with: "")
|
||||
@@ -1123,7 +1125,8 @@ private struct PipedSearchItem: Decodable, Sendable {
|
||||
thumbnails: Thumbnail.fallbackChain(for: thumbnail.flatMap { URL(string: $0) }),
|
||||
isLive: duration == -1,
|
||||
isUpcoming: false,
|
||||
scheduledStartTime: nil
|
||||
scheduledStartTime: nil,
|
||||
isShort: isShort
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user