mirror of
https://github.com/yattee/yattee.git
synced 2025-08-09 20:24:06 +00:00
Minor fixes
This commit is contained in:
@@ -464,6 +464,7 @@ final class InvidiousAPI: Service, ObservableObject, VideosAPI {
|
||||
instanceID: account.instanceID,
|
||||
app: .invidious,
|
||||
instanceURL: account.instance.apiURL,
|
||||
id: id,
|
||||
videoID: videoID,
|
||||
title: json["title"].stringValue,
|
||||
author: json["author"].stringValue,
|
||||
|
@@ -217,7 +217,15 @@ struct Video: Identifiable, Equatable, Hashable {
|
||||
}
|
||||
|
||||
var publishedDate: String? {
|
||||
(published.isEmpty || published == "0 seconds ago") ? publishedAt?.timeIntervalSince1970.formattedAsRelativeTime() : published
|
||||
guard let publishedAt else {
|
||||
return (published.isEmpty || published == "0 seconds ago") ? nil : published
|
||||
}
|
||||
|
||||
let dateFormatter = DateFormatter()
|
||||
dateFormatter.dateStyle = .short
|
||||
dateFormatter.timeStyle = .none
|
||||
|
||||
return dateFormatter.string(from: publishedAt)
|
||||
}
|
||||
|
||||
var viewsCount: String? {
|
||||
|
Reference in New Issue
Block a user