mirror of
https://git.nadeko.net/Fijxu/invidious.git
synced 2025-12-18 02:48:50 +00:00
Update management of channel_refresh_interval
Follow indications: https://github.com/iv-org/invidious/pull/2915#discussion_r811373503
This commit is contained in:
@@ -259,15 +259,15 @@ struct Preferences
|
||||
|
||||
module TimeSpanConverter
|
||||
def self.to_yaml(value : Time::Span, yaml : YAML::Nodes::Builder)
|
||||
return yaml.scalar recode_length_seconds(value.total_seconds.to_i32)
|
||||
return yaml.scalar value.total_minutes.to_i32
|
||||
end
|
||||
|
||||
def self.from_yaml(ctx : YAML::ParseContext, node : YAML::Nodes::Node) : Time::Span
|
||||
if node.is_a?(YAML::Nodes::Scalar)
|
||||
return decode_time_span(node.value)
|
||||
return decode_interval(node.value)
|
||||
else
|
||||
node.raise "Expected scalar, not #{node.class}"
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user