Use struct for allocations

pull/733/head
Omar Roth 6 years ago
parent 36c0eae7ed
commit 1b78001201

@ -1,4 +1,4 @@
class InvidiousChannel
struct InvidiousChannel
add_mapping({
id: String,
author: String,
@ -8,7 +8,7 @@ class InvidiousChannel
})
end
class ChannelVideo
struct ChannelVideo
add_mapping({
id: String,
title: String,

@ -29,7 +29,7 @@ class RedditComment
})
end
class RedditLink
struct RedditLink
JSON.mapping({
author: String,
score: Int32,
@ -41,7 +41,7 @@ class RedditLink
})
end
class RedditMore
struct RedditMore
JSON.mapping({
children: Array(String),
count: Int32,

@ -1,4 +1,4 @@
class Config
struct Config
YAML.mapping({
channel_threads: Int32, # Number of threads to use for crawling videos from channels (for updating subscriptions)
feed_threads: Int32, # Number of threads to use for updating feeds

@ -1,4 +1,4 @@
class MixVideo
struct MixVideo
add_mapping({
title: String,
id: String,
@ -10,7 +10,7 @@ class MixVideo
})
end
class Mix
struct Mix
add_mapping({
title: String,
id: String,

@ -1,4 +1,4 @@
class PlaylistVideo
struct PlaylistVideo
add_mapping({
title: String,
id: String,
@ -12,7 +12,7 @@ class PlaylistVideo
})
end
class Playlist
struct Playlist
add_mapping({
title: String,
id: String,

@ -1,4 +1,4 @@
class SearchVideo
struct SearchVideo
add_mapping({
title: String,
id: String,
@ -16,7 +16,7 @@ class SearchVideo
})
end
class SearchPlaylistVideo
struct SearchPlaylistVideo
add_mapping({
title: String,
id: String,
@ -24,7 +24,7 @@ class SearchPlaylistVideo
})
end
class SearchPlaylist
struct SearchPlaylist
add_mapping({
title: String,
id: String,
@ -36,7 +36,7 @@ class SearchPlaylist
})
end
class SearchChannel
struct SearchChannel
add_mapping({
author: String,
ucid: String,

@ -1,6 +1,6 @@
require "crypto/bcrypt/password"
class User
struct User
module PreferencesConverter
def self.from_rs(rs)
begin

@ -241,7 +241,7 @@ VIDEO_FORMATS = {
"251" => {"ext" => "webm", "format" => "DASH audio", "acodec" => "opus", "abr" => 160},
}
class Video
struct Video
property player_json : JSON::Any?
module HTTPParamConverter
@ -549,7 +549,7 @@ class Video
})
end
class Caption
struct Caption
JSON.mapping(
name: CaptionName,
baseUrl: String,
@ -557,7 +557,7 @@ class Caption
)
end
class CaptionName
struct CaptionName
JSON.mapping(
simpleText: String,
)

Loading…
Cancel
Save