mirror of
https://github.com/iv-org/invidious.git
synced 2024-11-08 13:42:27 +05:30
Compare commits
8 Commits
96b1f409ae
...
0cada899a5
Author | SHA1 | Date | |
---|---|---|---|
|
0cada899a5 | ||
|
4782a67038 | ||
|
5baaedfa39 | ||
|
4f066e880c | ||
|
e485773928 | ||
|
60de5e91c0 | ||
|
a9cc012542 | ||
|
d26ecbfc2f |
7
.github/workflows/build-stable-container.yml
vendored
7
.github/workflows/build-stable-container.yml
vendored
@ -47,9 +47,11 @@ jobs:
|
|||||||
uses: docker/metadata-action@v5
|
uses: docker/metadata-action@v5
|
||||||
with:
|
with:
|
||||||
images: quay.io/invidious/invidious
|
images: quay.io/invidious/invidious
|
||||||
|
flavor: |
|
||||||
|
latest=false
|
||||||
tags: |
|
tags: |
|
||||||
type=semver,pattern={{version}}
|
type=semver,pattern={{version}}
|
||||||
type=raw,value=latest,enable=${{ github.ref == format('refs/heads/{0}', 'master') }}
|
type=raw,value=latest
|
||||||
labels: |
|
labels: |
|
||||||
quay.expires-after=12w
|
quay.expires-after=12w
|
||||||
|
|
||||||
@ -71,10 +73,11 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
images: quay.io/invidious/invidious
|
images: quay.io/invidious/invidious
|
||||||
flavor: |
|
flavor: |
|
||||||
|
latest=false
|
||||||
suffix=-arm64
|
suffix=-arm64
|
||||||
tags: |
|
tags: |
|
||||||
type=semver,pattern={{version}}
|
type=semver,pattern={{version}}
|
||||||
type=raw,value=latest,enable=${{ github.ref == format('refs/heads/{0}', 'master') }}
|
type=raw,value=latest
|
||||||
labels: |
|
labels: |
|
||||||
quay.expires-after=12w
|
quay.expires-after=12w
|
||||||
|
|
||||||
|
16
CHANGELOG.md
16
CHANGELOG.md
@ -1,5 +1,18 @@
|
|||||||
# CHANGELOG
|
# CHANGELOG
|
||||||
|
|
||||||
|
|
||||||
|
## v2.20240825.2 (2024-08-26)
|
||||||
|
|
||||||
|
This releases fixes the container tags pushed on quay.io.
|
||||||
|
Previously, the ARM64 build was released under the `latest` tag, instead of `latest-arm64`.
|
||||||
|
|
||||||
|
### Full list of pull requests merged since the last release (newest first)
|
||||||
|
|
||||||
|
CI: Fix docker container tags ([#4883], by @SamantazFox)
|
||||||
|
|
||||||
|
[#4877]: https://github.com/iv-org/invidious/pull/4877
|
||||||
|
|
||||||
|
|
||||||
## v2.20240825.1 (2024-08-25)
|
## v2.20240825.1 (2024-08-25)
|
||||||
|
|
||||||
Add patch component to be [semver] compliant and make github actions happy.
|
Add patch component to be [semver] compliant and make github actions happy.
|
||||||
@ -8,8 +21,9 @@ Add patch component to be [semver] compliant and make github actions happy.
|
|||||||
|
|
||||||
### Full list of pull requests merged since the last release (newest first)
|
### Full list of pull requests merged since the last release (newest first)
|
||||||
|
|
||||||
Allow manual trigger of release-container build (#4877, thanks @syeopite)
|
Allow manual trigger of release-container build ([#4877], thanks @syeopite)
|
||||||
|
|
||||||
|
[#4877]: https://github.com/iv-org/invidious/pull/4877
|
||||||
|
|
||||||
|
|
||||||
## v2.20240825.0 (2024-08-25)
|
## v2.20240825.0 (2024-08-25)
|
||||||
|
@ -27,8 +27,8 @@ Spectator.describe Invidious::Hashtag do
|
|||||||
expect(video_11.length_seconds).to eq((56.minutes + 41.seconds).total_seconds.to_i32)
|
expect(video_11.length_seconds).to eq((56.minutes + 41.seconds).total_seconds.to_i32)
|
||||||
expect(video_11.views).to eq(40_504_893)
|
expect(video_11.views).to eq(40_504_893)
|
||||||
|
|
||||||
expect(video_11.live_now).to be_false
|
expect(video_11.badges.live_now?).to be_false
|
||||||
expect(video_11.premium).to be_false
|
expect(video_11.badges.premium?).to be_false
|
||||||
expect(video_11.premiere_timestamp).to be_nil
|
expect(video_11.premiere_timestamp).to be_nil
|
||||||
|
|
||||||
#
|
#
|
||||||
@ -49,8 +49,8 @@ Spectator.describe Invidious::Hashtag do
|
|||||||
expect(video_35.length_seconds).to eq((3.minutes + 14.seconds).total_seconds.to_i32)
|
expect(video_35.length_seconds).to eq((3.minutes + 14.seconds).total_seconds.to_i32)
|
||||||
expect(video_35.views).to eq(30_790_049)
|
expect(video_35.views).to eq(30_790_049)
|
||||||
|
|
||||||
expect(video_35.live_now).to be_false
|
expect(video_35.badges.live_now?).to be_false
|
||||||
expect(video_35.premium).to be_false
|
expect(video_35.badges.premium?).to be_false
|
||||||
expect(video_35.premiere_timestamp).to be_nil
|
expect(video_35.premiere_timestamp).to be_nil
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -80,8 +80,8 @@ Spectator.describe Invidious::Hashtag do
|
|||||||
expect(video_41.length_seconds).to eq((1.hour).total_seconds.to_i32)
|
expect(video_41.length_seconds).to eq((1.hour).total_seconds.to_i32)
|
||||||
expect(video_41.views).to eq(63_240)
|
expect(video_41.views).to eq(63_240)
|
||||||
|
|
||||||
expect(video_41.live_now).to be_false
|
expect(video_41.badges.live_now?).to be_false
|
||||||
expect(video_41.premium).to be_false
|
expect(video_41.badges.premium?).to be_false
|
||||||
expect(video_41.premiere_timestamp).to be_nil
|
expect(video_41.premiere_timestamp).to be_nil
|
||||||
|
|
||||||
#
|
#
|
||||||
@ -102,8 +102,8 @@ Spectator.describe Invidious::Hashtag do
|
|||||||
expect(video_48.length_seconds).to eq((35.minutes + 46.seconds).total_seconds.to_i32)
|
expect(video_48.length_seconds).to eq((35.minutes + 46.seconds).total_seconds.to_i32)
|
||||||
expect(video_48.views).to eq(68_704)
|
expect(video_48.views).to eq(68_704)
|
||||||
|
|
||||||
expect(video_48.live_now).to be_false
|
expect(video_48.badges.live_now?).to be_false
|
||||||
expect(video_48.premium).to be_false
|
expect(video_48.badges.premium?).to be_false
|
||||||
expect(video_48.premiere_timestamp).to be_nil
|
expect(video_48.premiere_timestamp).to be_nil
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -223,7 +223,7 @@ def fetch_channel(ucid, pull_all_videos : Bool)
|
|||||||
length_seconds = channel_video.try &.length_seconds
|
length_seconds = channel_video.try &.length_seconds
|
||||||
length_seconds ||= 0
|
length_seconds ||= 0
|
||||||
|
|
||||||
live_now = channel_video.try &.live_now
|
live_now = channel_video.try &.badges.live_now?
|
||||||
live_now ||= false
|
live_now ||= false
|
||||||
|
|
||||||
premiere_timestamp = channel_video.try &.premiere_timestamp
|
premiere_timestamp = channel_video.try &.premiere_timestamp
|
||||||
@ -275,7 +275,7 @@ def fetch_channel(ucid, pull_all_videos : Bool)
|
|||||||
ucid: video.ucid,
|
ucid: video.ucid,
|
||||||
author: video.author,
|
author: video.author,
|
||||||
length_seconds: video.length_seconds,
|
length_seconds: video.length_seconds,
|
||||||
live_now: video.live_now,
|
live_now: video.badges.live_now?,
|
||||||
premiere_timestamp: video.premiere_timestamp,
|
premiere_timestamp: video.premiere_timestamp,
|
||||||
views: video.views,
|
views: video.views,
|
||||||
})
|
})
|
||||||
|
@ -1,3 +1,16 @@
|
|||||||
|
@[Flags]
|
||||||
|
enum VideoBadges
|
||||||
|
LiveNow
|
||||||
|
Premium
|
||||||
|
ThreeD
|
||||||
|
FourK
|
||||||
|
New
|
||||||
|
EightK
|
||||||
|
VR180
|
||||||
|
VR360
|
||||||
|
ClosedCaptions
|
||||||
|
end
|
||||||
|
|
||||||
struct SearchVideo
|
struct SearchVideo
|
||||||
include DB::Serializable
|
include DB::Serializable
|
||||||
|
|
||||||
@ -9,10 +22,9 @@ struct SearchVideo
|
|||||||
property views : Int64
|
property views : Int64
|
||||||
property description_html : String
|
property description_html : String
|
||||||
property length_seconds : Int32
|
property length_seconds : Int32
|
||||||
property live_now : Bool
|
|
||||||
property premium : Bool
|
|
||||||
property premiere_timestamp : Time?
|
property premiere_timestamp : Time?
|
||||||
property author_verified : Bool
|
property author_verified : Bool
|
||||||
|
property badges : VideoBadges
|
||||||
|
|
||||||
def to_xml(auto_generated, query_params, xml : XML::Builder)
|
def to_xml(auto_generated, query_params, xml : XML::Builder)
|
||||||
query_params["v"] = self.id
|
query_params["v"] = self.id
|
||||||
@ -88,13 +100,20 @@ struct SearchVideo
|
|||||||
json.field "published", self.published.to_unix
|
json.field "published", self.published.to_unix
|
||||||
json.field "publishedText", translate(locale, "`x` ago", recode_date(self.published, locale))
|
json.field "publishedText", translate(locale, "`x` ago", recode_date(self.published, locale))
|
||||||
json.field "lengthSeconds", self.length_seconds
|
json.field "lengthSeconds", self.length_seconds
|
||||||
json.field "liveNow", self.live_now
|
json.field "liveNow", self.badges.live_now?
|
||||||
json.field "premium", self.premium
|
json.field "premium", self.badges.premium?
|
||||||
json.field "isUpcoming", self.upcoming?
|
json.field "isUpcoming", self.upcoming?
|
||||||
|
|
||||||
if self.premiere_timestamp
|
if self.premiere_timestamp
|
||||||
json.field "premiereTimestamp", self.premiere_timestamp.try &.to_unix
|
json.field "premiereTimestamp", self.premiere_timestamp.try &.to_unix
|
||||||
end
|
end
|
||||||
|
json.field "isNew", self.badges.new?
|
||||||
|
json.field "is4k", self.badges.four_k?
|
||||||
|
json.field "is8k", self.badges.eight_k?
|
||||||
|
json.field "isVr180", self.badges.vr180?
|
||||||
|
json.field "isVr360", self.badges.vr360?
|
||||||
|
json.field "is3d", self.badges.three_d?
|
||||||
|
json.field "hasCaptions", self.badges.closed_captions?
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -192,11 +192,9 @@ module Invidious::Routes::Feeds
|
|||||||
views: views,
|
views: views,
|
||||||
description_html: description_html,
|
description_html: description_html,
|
||||||
length_seconds: 0,
|
length_seconds: 0,
|
||||||
live_now: false,
|
|
||||||
paid: false,
|
|
||||||
premium: false,
|
|
||||||
premiere_timestamp: nil,
|
premiere_timestamp: nil,
|
||||||
author_verified: false,
|
author_verified: false,
|
||||||
|
badges: VideoBadges::None,
|
||||||
})
|
})
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -108,21 +108,30 @@ private module Parsers
|
|||||||
length_seconds = 0
|
length_seconds = 0
|
||||||
end
|
end
|
||||||
|
|
||||||
live_now = false
|
|
||||||
premium = false
|
|
||||||
|
|
||||||
premiere_timestamp = item_contents.dig?("upcomingEventData", "startTime").try { |t| Time.unix(t.as_s.to_i64) }
|
premiere_timestamp = item_contents.dig?("upcomingEventData", "startTime").try { |t| Time.unix(t.as_s.to_i64) }
|
||||||
|
badges = VideoBadges::None
|
||||||
item_contents["badges"]?.try &.as_a.each do |badge|
|
item_contents["badges"]?.try &.as_a.each do |badge|
|
||||||
b = badge["metadataBadgeRenderer"]
|
b = badge["metadataBadgeRenderer"]
|
||||||
case b["label"].as_s
|
case b["label"].as_s
|
||||||
when "LIVE NOW"
|
when "LIVE NOW"
|
||||||
live_now = true
|
badges |= VideoBadges::LiveNow
|
||||||
when "New", "4K", "CC"
|
when "New"
|
||||||
# TODO
|
badges |= VideoBadges::New
|
||||||
|
when "4K"
|
||||||
|
badges |= VideoBadges::FourK
|
||||||
|
when "8K"
|
||||||
|
badges |= VideoBadges::EightK
|
||||||
|
when "VR180"
|
||||||
|
badges |= VideoBadges::VR180
|
||||||
|
when "360°"
|
||||||
|
badges |= VideoBadges::VR360
|
||||||
|
when "3D"
|
||||||
|
badges |= VideoBadges::ThreeD
|
||||||
|
when "CC"
|
||||||
|
badges |= VideoBadges::ClosedCaptions
|
||||||
when "Premium"
|
when "Premium"
|
||||||
# TODO: Potentially available as item_contents["topStandaloneBadge"]["metadataBadgeRenderer"]
|
# TODO: Potentially available as item_contents["topStandaloneBadge"]["metadataBadgeRenderer"]
|
||||||
premium = true
|
badges |= VideoBadges::Premium
|
||||||
else nil # Ignore
|
else nil # Ignore
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@ -136,10 +145,9 @@ private module Parsers
|
|||||||
views: view_count,
|
views: view_count,
|
||||||
description_html: description_html,
|
description_html: description_html,
|
||||||
length_seconds: length_seconds,
|
length_seconds: length_seconds,
|
||||||
live_now: live_now,
|
|
||||||
premium: premium,
|
|
||||||
premiere_timestamp: premiere_timestamp,
|
premiere_timestamp: premiere_timestamp,
|
||||||
author_verified: author_verified,
|
author_verified: author_verified,
|
||||||
|
badges: badges,
|
||||||
})
|
})
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -563,10 +571,9 @@ private module Parsers
|
|||||||
views: view_count,
|
views: view_count,
|
||||||
description_html: "",
|
description_html: "",
|
||||||
length_seconds: duration,
|
length_seconds: duration,
|
||||||
live_now: false,
|
|
||||||
premium: false,
|
|
||||||
premiere_timestamp: Time.unix(0),
|
premiere_timestamp: Time.unix(0),
|
||||||
author_verified: false,
|
author_verified: false,
|
||||||
|
badges: VideoBadges::None,
|
||||||
})
|
})
|
||||||
end
|
end
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user