diff --git a/src/invidious/helpers/utils.cr b/src/invidious/helpers/utils.cr index 68ba76f99..af5f553b2 100644 --- a/src/invidious/helpers/utils.cr +++ b/src/invidious/helpers/utils.cr @@ -397,19 +397,6 @@ def parse_range(range) return 0_i64, nil end -def convert_theme(theme) - case theme - when "true" - "dark" - when "false" - "light" - when "", nil - nil - else - theme - end -end - def fetch_random_instance begin instance_api_client = make_client(URI.parse("https://api.invidious.io")) diff --git a/src/invidious/user/converters.cr b/src/invidious/user/converters.cr new file mode 100644 index 000000000..dcbf8c534 --- /dev/null +++ b/src/invidious/user/converters.cr @@ -0,0 +1,12 @@ +def convert_theme(theme) + case theme + when "true" + "dark" + when "false" + "light" + when "", nil + nil + else + theme + end +end