summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorOmar Roth <omarroth@protonmail.com>2019-08-30 23:57:33 -0400
committerOmar Roth <omarroth@protonmail.com>2019-08-31 01:11:45 -0400
commit38962301995df1ea763370e13fdb4244b6ca3daa (patch)
tree3949e5ddcebaaf62f9a1e074556469555105b7bd /src
parentb902880a05437539859fa30a81644d9a9cae1581 (diff)
downloadinvidious-38962301995df1ea763370e13fdb4244b6ca3daa.tar.gz
invidious-38962301995df1ea763370e13fdb4244b6ca3daa.tar.bz2
invidious-38962301995df1ea763370e13fdb4244b6ca3daa.zip
Fix type cast for viewCount
Diffstat (limited to 'src')
-rw-r--r--src/invidious/videos.cr6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/invidious/videos.cr b/src/invidious/videos.cr
index 85ccb9a2..e454638e 100644
--- a/src/invidious/videos.cr
+++ b/src/invidious/videos.cr
@@ -428,8 +428,8 @@ struct Video
end
json.field "author", rv["author"]
- json.field "authorUrl", rv["author_url"] if rv["author_url"]?
- json.field "authorId", rv["ucid"] if rv["ucid"]?
+ json.field "authorUrl", rv["author_url"]?
+ json.field "authorId", rv["ucid"]?
if rv["author_thumbnail"]?
json.field "authorThumbnails" do
json.array do
@@ -448,7 +448,7 @@ struct Video
json.field "lengthSeconds", rv["length_seconds"].to_i
json.field "viewCountText", rv["short_view_count_text"]
- json.field "viewCount", rv["view_count"].to_i if rv["view_count"]?
+ json.field "viewCount", rv["view_count"]?.try &.to_i64
end
end
end
n when required configs for playback is missing * Add link to documentation in warnings * Direct users to /installation instead 2025-02-26Fix lint and formattingsyeopite 2025-02-26i18n: Enable Tamilsyeopite 2025-02-21Fix an issue with the HLS manifest check for livestream videosAlex Maras Originally, the HLS manifest check was essentially a boolean: if the HLS manifest field was present, it was assumed to be a livestream. Some videos include the HLS Manifest but aren't livestreams. In the case where they are livestreams, the video contains a videoType field with the value "Livestream". In the case that they're normal videos, the videoType is "Video". This is exposed via the video.live_now method. This commit just checks that video.live_now is true before treating it as a livestream 2025-02-18Typosyeopite Co-authored-by: Samantaz Fox <coding@samantaz.fr> 2025-02-18Channels: Fix community tabFijxu 2025-01-28Use Crystal compiler cache in docker buildssyeopite 2025-01-28fix 5161 by checking recommended videos published field for presence instead ↵Drikanis of just not nil 2025-01-26remove ! on rejectepicsam123 2025-01-25Add Courses to channel page and channel APIChunkyProgrammer