Invidious is an alternative front-end to YouTube
move theme converter function to a separate file
Samantaz Fox080d9a8dc72a
diff --git a/src/invidious/helpers/utils.cr b/src/invidious/helpers/utils.crindex 68ba76f9..af5f553b 100644--- a/src/invidious/helpers/utils.cr+++ b/src/invidious/helpers/utils.cr@@ -397,19 +397,6 @@ def parse_range(range)return 0_i64, nilend-def convert_theme(theme)- case theme- when "true"- "dark"- when "false"- "light"- when "", nil- nil- else- theme- end-end-def fetch_random_instancebegininstance_api_client = make_client(URI.parse("https://api.invidious.io"))diff --git a/src/invidious/user/converters.cr b/src/invidious/user/converters.crnew file mode 100644index 00000000..dcbf8c53--- /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