diff --git a/config_default.json b/config_default.json index 538090f..0d65307 100644 --- a/config_default.json +++ b/config_default.json @@ -116,4 +116,4 @@ "create_share_links": true, "plex_auth": true, "winter_theme": true - } +} diff --git a/files/admin.go b/files/admin.go index d05041b..ccca226 100644 --- a/files/admin.go +++ b/files/admin.go @@ -18,11 +18,11 @@ func GetAdminState() (bool, error) { // Retrieve config object from function admin_config, err := GetAdminConfig() if err != nil { - log.Println("Admin config state retrival threw error.") + log.Println("Admin config state retrieval threw error.") return false, err } - // Check if certain parameters are set. These are essential paramteres the user must configure for basic functionality. + // Check if certain parameters are set. These are essential parameters the user must configure for basic functionality. if admin_config.AdminUsername != "" && admin_config.AdminPassword != "" { return true, nil } else { diff --git a/files/config.go b/files/config.go index 924b1cb..3df1204 100644 --- a/files/config.go +++ b/files/config.go @@ -37,7 +37,7 @@ func GetConfigState() (bool, error) { return false, err } - // Check if certain parameters are set. These are essential paramteres the user must configure for basic functionality. + // Check if certain parameters are set. These are essential parameters the user must configure for basic functionality. if config.TautulliConfig[0].TautulliApiKey != "" && config.TautulliConfig[0].TautulliIP != "" && config.TautulliConfig[0].TautulliLength != 0 && config.Timezone != "" && config.WrappedStart != 0 && config.WrappedEnd != 0 && config.WrapperrVersion != "" { return true, nil } else { @@ -118,7 +118,7 @@ func CreateConfigFile() error { var config models.WrapperrConfig - // Define default boolean values since they are harder to seperate from deliberate boolean values + // Define default boolean values since they are harder to separate from deliberate boolean values config.UseCache = true config.PlexAuth = true config.UseLogs = true diff --git a/modules/tautulli.go b/modules/tautulli.go index 3ee2bd9..401de57 100644 --- a/modules/tautulli.go +++ b/modules/tautulli.go @@ -76,8 +76,8 @@ func TautulliTestConnection(TautulliPort int, TautulliIP string, TautulliHttps b } else if body_reply.Response.Result == "error" { errString := strings.Replace(body_reply.Response.Message, TautulliApiKey, "REDACTED", -1) - log.Println("Tautulli server responsed with an error. Error: " + errString) - return false, errors.New("Tautulli server responsed with an error. Error: " + errString) + log.Println("Tautulli server responded with an error. Error: " + errString) + return false, errors.New("Tautulli server responded with an error. Error: " + errString) } diff --git a/routes/admin_auth.go b/routes/admin_auth.go index 8cba30d..71d2fe0 100644 --- a/routes/admin_auth.go +++ b/routes/admin_auth.go @@ -143,7 +143,7 @@ func ApiSetConfig(w http.ResponseWriter, r *http.Request) { } else { log.Println("Cannot set new config. Invalid data type received. Type: " + config_payload.DataType) - utilities.RespondDefaultError(w, r, errors.New("Failed to save new Wrapperr confguration."), 400) + utilities.RespondDefaultError(w, r, errors.New("Failed to save new Wrapperr configuration."), 400) return } diff --git a/routes/no_auth.go b/routes/no_auth.go index cabcbb7..14341cb 100644 --- a/routes/no_auth.go +++ b/routes/no_auth.go @@ -184,7 +184,7 @@ func ApiWrapperrConfigured(w http.ResponseWriter, r *http.Request) { if err != nil { log.Panicln(err) - utilities.RespondDefaultError(w, r, errors.New("Failed to retrieve confguration state."), 500) + utilities.RespondDefaultError(w, r, errors.New("Failed to retrieve configuration state."), 500) return } else { diff --git a/routes/statistics.go b/routes/statistics.go index ed2d4b4..2dfc5c4 100644 --- a/routes/statistics.go +++ b/routes/statistics.go @@ -25,7 +25,7 @@ func ApiWrapperGetStatistics(w http.ResponseWriter, r *http.Request) { bool_state, err := files.GetConfigState() if err != nil { log.Println(err) - utilities.RespondDefaultError(w, r, errors.New("Failed to retrieve confguration state."), 500) + utilities.RespondDefaultError(w, r, errors.New("Failed to retrieve configuration state."), 500) return } else if !bool_state { log.Println("Wrapperr get statistics failed. Configuration state function retrieved false response.") @@ -104,7 +104,7 @@ func ApiWrapperGetStatistics(w http.ResponseWriter, r *http.Request) { var wrapperr_request models.SearchWrapperrRequest json.Unmarshal(reqBody, &wrapperr_request) - // If auth is not passed, caching mode is false, and no PlexIdentity was recieved, mark it as a bad request + // If auth is not passed, caching mode is false, and no PlexIdentity was received, mark it as a bad request if wrapperr_request.PlexIdentity == "" && !auth_passed && !wrapperr_request.CachingMode { log.Println("Cannot retrieve statistics because search parameter is invalid.") utilities.RespondDefaultError(w, r, errors.New("Invalid search parameter."), 400) @@ -202,7 +202,7 @@ func ApiWrapperGetStatistics(w http.ResponseWriter, r *http.Request) { log.Println("7. Cache saving stage completed for " + user_name + " (" + strconv.Itoa(user_id) + ")." + ip_string) - // If caching mode is in use, stop the proccess here and return the result to the user + // If caching mode is in use, stop the process here and return the result to the user if wrapperr_request.CachingMode { boolean_reply := models.BooleanReply{ @@ -305,7 +305,7 @@ func WrapperrDownloadDays(ID int, wrapperr_data []models.WrapperrDay, loop_inter found_date_index = j found_date = true - // Look at proccessed servers for current server + // Look at processed servers for current server for y := 0; y < len(wrapperr_data[j].TautulliServers); y++ { if wrapperr_data[j].TautulliServers[y] == config.TautulliConfig[q].TautulliName { tautulli_server_processed = true @@ -406,7 +406,7 @@ func WrapperrDownloadDays(ID int, wrapperr_data []models.WrapperrDay, loop_inter } - // If the date is the current day, mark as imcomplete so it can be refreshed the next time + // If the date is the current day, mark as incomplete so it can be refreshed the next time if loop_time.Format("2006-01-02") == now.Format("2006-01-02") { wrapperr_day.DataComplete = false } diff --git a/routes/user_auth.go b/routes/user_auth.go index 6ebebd7..13b0a16 100644 --- a/routes/user_auth.go +++ b/routes/user_auth.go @@ -24,7 +24,7 @@ func ApiGetLoginURL(w http.ResponseWriter, r *http.Request) { if err != nil { log.Println(err) - utilities.RespondDefaultError(w, r, errors.New("Failed to retrieve confguration state."), 500) + utilities.RespondDefaultError(w, r, errors.New("Failed to retrieve configuration state."), 500) return } else if !config_bool { @@ -38,7 +38,7 @@ func ApiGetLoginURL(w http.ResponseWriter, r *http.Request) { config, err := files.GetConfig() if err != nil { log.Println(err) - utilities.RespondDefaultError(w, r, errors.New("Failed to load Wrapperr confguration."), 500) + utilities.RespondDefaultError(w, r, errors.New("Failed to load Wrapperr configuration."), 500) return } @@ -152,7 +152,7 @@ func ApiLoginPlexAuth(w http.ResponseWriter, r *http.Request) { token, err := modules.CreateToken("Plex Auth", false, plex_auth.AuthToken) if err != nil { log.Println(err) - utilities.RespondDefaultError(w, r, errors.New("Faield to create JWT token."), 500) + utilities.RespondDefaultError(w, r, errors.New("Failed to create JWT token."), 500) return } diff --git a/web/html/frontpage.html b/web/html/frontpage.html index 6a154f5..93f77e7 100644 --- a/web/html/frontpage.html +++ b/web/html/frontpage.html @@ -253,7 +253,7 @@ return; } - // If a hash is recieved, attempt to load shared link + // If a hash is received, attempt to load shared link if(hash !== null) { document.getElementById('loading').style.display = "none"; link_mode = true; diff --git a/web/js/admin.js b/web/js/admin.js index e66bfe9..7bd9d5e 100644 --- a/web/js/admin.js +++ b/web/js/admin.js @@ -1163,7 +1163,7 @@ function set_wrapperr_customization() { html += ''; html += '
'; - html += '
';