mirror of
https://github.com/iv-org/invidious.git
synced 2026-11-10 22:07:17 +00:00
Compare commits
1 Commits
master
...
release-v2
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
857c53cf87 |
@@ -507,6 +507,5 @@
|
|||||||
"timeline_parse_error_placeholder_heading": "Unable to parse item",
|
"timeline_parse_error_placeholder_heading": "Unable to parse item",
|
||||||
"timeline_parse_error_placeholder_message": "Invidious encountered an error while trying to parse this item. For more information see below:",
|
"timeline_parse_error_placeholder_message": "Invidious encountered an error while trying to parse this item. For more information see below:",
|
||||||
"timeline_parse_error_show_technical_details": "Show technical details",
|
"timeline_parse_error_show_technical_details": "Show technical details",
|
||||||
"dmca_content": "This video cannot be downloaded on this instance due to a DMCA/copyright infringement letter sent to the instance administrator.",
|
"dmca_content": "This video cannot be downloaded on this instance due to a DMCA/copyright infringement letter sent to the instance administrator."
|
||||||
"video_details_ai_made": "AI Made video?:"
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
name: invidious
|
name: invidious
|
||||||
version: 2.20261103.0-dev
|
version: 2.20261103.0
|
||||||
|
|
||||||
authors:
|
authors:
|
||||||
- Invidious team <contact@invidious.io>
|
- Invidious team <contact@invidious.io>
|
||||||
|
|||||||
@@ -228,16 +228,7 @@ class Config
|
|||||||
env_config_yaml = "INVIDIOUS_CONFIG"
|
env_config_yaml = "INVIDIOUS_CONFIG"
|
||||||
|
|
||||||
config_file = ENV.has_key?(env_config_file) ? ENV.fetch(env_config_file) : "config/config.yml"
|
config_file = ENV.has_key?(env_config_file) ? ENV.fetch(env_config_file) : "config/config.yml"
|
||||||
config_yaml = if ENV.has_key?(env_config_yaml)
|
config_yaml = ENV.has_key?(env_config_yaml) ? ENV.fetch(env_config_yaml) : File.read(config_file)
|
||||||
ENV.fetch(env_config_yaml)
|
|
||||||
else
|
|
||||||
begin
|
|
||||||
File.read(config_file)
|
|
||||||
rescue ex
|
|
||||||
puts "Config: Failed to load configuration file: #{ex.message}"
|
|
||||||
exit(1)
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
config = Config.from_yaml(config_yaml)
|
config = Config.from_yaml(config_yaml)
|
||||||
|
|
||||||
|
|||||||
@@ -64,7 +64,6 @@ module Invidious::JSONify::APIv1
|
|||||||
json.field "liveNow", video.live_now
|
json.field "liveNow", video.live_now
|
||||||
json.field "isPostLiveDvr", video.post_live_dvr
|
json.field "isPostLiveDvr", video.post_live_dvr
|
||||||
json.field "isUpcoming", video.upcoming?
|
json.field "isUpcoming", video.upcoming?
|
||||||
json.field "aiMade", video.ai_made
|
|
||||||
|
|
||||||
if video.premiere_timestamp
|
if video.premiere_timestamp
|
||||||
json.field "premiereTimestamp", video.premiere_timestamp.try &.to_unix
|
json.field "premiereTimestamp", video.premiere_timestamp.try &.to_unix
|
||||||
|
|||||||
@@ -234,10 +234,6 @@ module Invidious::Videos::Parser
|
|||||||
keywords = video_details["keywords"]?
|
keywords = video_details["keywords"]?
|
||||||
.try &.as_a.map &.as_s || [] of String
|
.try &.as_a.map &.as_s || [] of String
|
||||||
|
|
||||||
ai_made = video_primary_renderer
|
|
||||||
.try &.dig?("badges")
|
|
||||||
.try { |badges| badges.as_a.any? { |badge| badge.dig?("metadataBadgeRenderer", "label").try(&.as_s) == "AI" } } || false
|
|
||||||
|
|
||||||
# Related videos
|
# Related videos
|
||||||
|
|
||||||
LOGGER.debug("extract_video_info: parsing related videos...")
|
LOGGER.debug("extract_video_info: parsing related videos...")
|
||||||
@@ -458,7 +454,6 @@ module Invidious::Videos::Parser
|
|||||||
"authorThumbnail" => JSON::Any.new(author_thumbnail.try &.as_s || ""),
|
"authorThumbnail" => JSON::Any.new(author_thumbnail.try &.as_s || ""),
|
||||||
"authorVerified" => JSON::Any.new(author_verified || false),
|
"authorVerified" => JSON::Any.new(author_verified || false),
|
||||||
"subCountText" => JSON::Any.new(subs_text || "-"),
|
"subCountText" => JSON::Any.new(subs_text || "-"),
|
||||||
"aiMade" => JSON::Any.new(ai_made),
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return params
|
return params
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ struct Video
|
|||||||
# NOTE: don't forget to bump this number if any change is made to
|
# NOTE: don't forget to bump this number if any change is made to
|
||||||
# the `params` structure in videos/parser.cr!!!
|
# the `params` structure in videos/parser.cr!!!
|
||||||
#
|
#
|
||||||
SCHEMA_VERSION = 4
|
SCHEMA_VERSION = 3
|
||||||
|
|
||||||
property id : String
|
property id : String
|
||||||
|
|
||||||
@@ -297,7 +297,6 @@ struct Video
|
|||||||
getset_bool authorVerified
|
getset_bool authorVerified
|
||||||
getset_bool isFamilyFriendly
|
getset_bool isFamilyFriendly
|
||||||
getset_bool isListed
|
getset_bool isListed
|
||||||
getset_bool aiMade
|
|
||||||
predicate_bool upcoming, isUpcoming
|
predicate_bool upcoming, isUpcoming
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
@@ -202,11 +202,6 @@ we're going to need to do it here in order to allow for translations.
|
|||||||
<p id="views"><i class="icon ion-ios-eye"></i> <%= number_with_separator(video.views) %></p>
|
<p id="views"><i class="icon ion-ios-eye"></i> <%= number_with_separator(video.views) %></p>
|
||||||
<p id="likes"><i class="icon ion-ios-thumbs-up"></i> <%= number_with_separator(video.likes) %></p>
|
<p id="likes"><i class="icon ion-ios-thumbs-up"></i> <%= number_with_separator(video.likes) %></p>
|
||||||
<p id="dislikes" style="display: none; visibility: hidden;"></p>
|
<p id="dislikes" style="display: none; visibility: hidden;"></p>
|
||||||
<% if video.ai_made %>
|
|
||||||
<p id="ai_made"><%= I18n.translate(locale, "video_details_ai_made") %>
|
|
||||||
<%= I18n.translate_bool(locale, video.ai_made) %>
|
|
||||||
</p>
|
|
||||||
<% end %>
|
|
||||||
<p id="genre"><%= I18n.translate(locale, "Genre: ") %>
|
<p id="genre"><%= I18n.translate(locale, "Genre: ") %>
|
||||||
<% if !video.genre_url %>
|
<% if !video.genre_url %>
|
||||||
<%= video.genre %>
|
<%= video.genre %>
|
||||||
|
|||||||
@@ -715,13 +715,6 @@ private module Parsers
|
|||||||
# Contains the views of the video and the published time of the video.
|
# Contains the views of the video and the published time of the video.
|
||||||
if (metadata_rows = metadata.dig("metadata", "contentMetadataViewModel", "metadataRows").try &.as_a)
|
if (metadata_rows = metadata.dig("metadata", "contentMetadataViewModel", "metadataRows").try &.as_a)
|
||||||
metadata_rows.each do |row|
|
metadata_rows.each do |row|
|
||||||
# To filter members only videos, they do not have metadataParts available.
|
|
||||||
# This videos are not hidden from the channel videos list.
|
|
||||||
badges = row.dig?("badges").try &.as_a
|
|
||||||
if badges.try &.any? { |item| item.dig?("badgeViewModel", "badgeStyle").try &.as_s == "BADGE_MEMBERS_ONLY" }
|
|
||||||
next
|
|
||||||
end
|
|
||||||
|
|
||||||
metadata_parts = row.dig("metadataParts").try &.as_a
|
metadata_parts = row.dig("metadataParts").try &.as_a
|
||||||
|
|
||||||
if view_count_text.nil?
|
if view_count_text.nil?
|
||||||
|
|||||||
Reference in New Issue
Block a user