From fe55141a7b5ba3372cc0f850fc388ef115d94a0d Mon Sep 17 00:00:00 2001 From: jonas-w Date: Mon, 7 Feb 2022 02:04:50 +0100 Subject: [PATCH] Crystal format --- src/invidious/mixes.cr | 1 - src/invidious/playlists.cr | 5 ++--- src/invidious/routes/feeds.cr | 4 ++-- 3 files changed, 4 insertions(+), 6 deletions(-) diff --git a/src/invidious/mixes.cr b/src/invidious/mixes.cr index b3edea27..3f342b92 100644 --- a/src/invidious/mixes.cr +++ b/src/invidious/mixes.cr @@ -8,7 +8,6 @@ struct MixVideo property length_seconds : Int32 property index : Int32 property rdid : String - end struct Mix diff --git a/src/invidious/playlists.cr b/src/invidious/playlists.cr index 8383b185..88888a65 100644 --- a/src/invidious/playlists.cr +++ b/src/invidious/playlists.cr @@ -234,7 +234,6 @@ struct InvidiousPlaylist 0_i64 end - def description_html HTML.escape(self.description) end @@ -252,7 +251,7 @@ def create_playlist(title, privacy, user) created: Time.utc, updated: Time.utc, privacy: privacy, - index: [] of Int64 + index: [] of Int64, }) Invidious::Database::Playlists.insert(playlist) @@ -270,7 +269,7 @@ def subscribe_playlist(user, playlist) created: Time.utc, updated: playlist.updated, privacy: PlaylistPrivacy::Private, - index: [] of Int64 + index: [] of Int64, }) Invidious::Database::Playlists.insert(playlist) diff --git a/src/invidious/routes/feeds.cr b/src/invidious/routes/feeds.cr index c26e6da7..b5b58399 100644 --- a/src/invidious/routes/feeds.cr +++ b/src/invidious/routes/feeds.cr @@ -156,7 +156,7 @@ module Invidious::Routes::Feeds response = YT_POOL.client &.get("/feeds/videos.xml?channel_id=#{channel.ucid}") rss = XML.parse_html(response.body) - print(response) + videos = rss.xpath_nodes("//feed/entry").map do |entry| video_id = entry.xpath_node("videoid").not_nil!.content title = entry.xpath_node("title").not_nil!.content @@ -182,7 +182,7 @@ module Invidious::Routes::Feeds paid: false, premium: false, premiere_timestamp: nil, - author_verified: false, # ¯\_(ツ)_/¯ + author_verified: false, # ¯\_(ツ)_/¯ }) end