Overwirte CONFIG.po_token and CONFIG.visitor_data by the tokens stored
Some checks failed
Invidious CI / build (push) Has been cancelled
Some checks failed
Invidious CI / build (push) Has been cancelled
on redis This approach is better to prevent conflicts with the upstream repository.
This commit is contained in:
parent
13e00e674b
commit
47ef5dfe4c
2 changed files with 9 additions and 18 deletions
|
@ -7,13 +7,19 @@ module Tokens
|
|||
@@po_token = REDIS_DB.get("invidious:po_token")
|
||||
@@visitor_data = REDIS_DB.get("invidious:visitor_data")
|
||||
if !@@po_token.nil? && !@@visitor_data.nil?
|
||||
LOGGER.debug("RefreshTokens: Successfully updated tokens")
|
||||
set_tokens
|
||||
LOGGER.debug("RefreshTokens: Successfully updated po_token and visitor_data")
|
||||
else
|
||||
LOGGER.warn("RefreshTokens: Tokens are empty!")
|
||||
end
|
||||
LOGGER.trace("RefreshTokens: Tokens are:")
|
||||
LOGGER.trace("RefreshTokens: po_token: #{@@po_token}")
|
||||
LOGGER.trace("RefreshTokens: visitor_data: #{@@visitor_data}")
|
||||
LOGGER.trace("RefreshTokens: po_token: #{CONFIG.po_token}")
|
||||
LOGGER.trace("RefreshTokens: visitor_data: #{CONFIG.visitor_data}")
|
||||
end
|
||||
|
||||
def set_tokens
|
||||
CONFIG.po_token = @@po_token
|
||||
CONFIG.visitor_data = @@visitor_data
|
||||
end
|
||||
|
||||
def get_tokens
|
||||
|
|
|
@ -1,15 +0,0 @@
|
|||
<% content_for "header" do %>
|
||||
<title><%= translate(locale, "Invidious token generator") %> - Invidious</title>
|
||||
<% end %>
|
||||
|
||||
<div class="pure-g">
|
||||
<div class="pure-u-1 pure-u-lg-1-5"></div>
|
||||
<div class="pure-u-1 pure-u-lg-3-5">
|
||||
<div class="h-box">
|
||||
<p>po_token and visitor_data successfully generated!</p>
|
||||
<p>po_token: <%= po_token %></p>
|
||||
<p>visitor_data: <%= visitor_data %></p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="pure-u-1 pure-u-lg-1-5"></div>
|
||||
</div>
|
Loading…
Reference in a new issue