|
|
@ -301,6 +301,7 @@ struct Video
|
|
|
|
json.field "likeCount", self.likes
|
|
|
|
json.field "likeCount", self.likes
|
|
|
|
json.field "dislikeCount", self.dislikes
|
|
|
|
json.field "dislikeCount", self.dislikes
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
json.field "paid", self.paid
|
|
|
|
json.field "premium", self.premium
|
|
|
|
json.field "premium", self.premium
|
|
|
|
json.field "isFamilyFriendly", self.is_family_friendly
|
|
|
|
json.field "isFamilyFriendly", self.is_family_friendly
|
|
|
|
json.field "allowedRegions", self.allowed_regions
|
|
|
|
json.field "allowedRegions", self.allowed_regions
|
|
|
@ -688,6 +689,12 @@ struct Video
|
|
|
|
items
|
|
|
|
items
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def paid
|
|
|
|
|
|
|
|
reason = info["playabilityStatus"]?.try &.["reason"]?
|
|
|
|
|
|
|
|
paid = reason == "This video requires payment to watch." ? true : false
|
|
|
|
|
|
|
|
paid
|
|
|
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|
def premium
|
|
|
|
def premium
|
|
|
|
keywords.includes? "YouTube Red"
|
|
|
|
keywords.includes? "YouTube Red"
|
|
|
|
end
|
|
|
|
end
|
|
|
|