move theme converter function to a separate file

pull/2477/head
Samantaz Fox 2021-10-07 21:55:21 +02:00
rodzic 984a4acc7b
commit 080d9a8dc7
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: F42821059186176E
2 zmienionych plików z 12 dodań i 13 usunięć

Wyświetl plik

@ -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"))

Wyświetl plik

@ -0,0 +1,12 @@
def convert_theme(theme)
case theme
when "true"
"dark"
when "false"
"light"
when "", nil
nil
else
theme
end
end