Merge pull request #61 from JChris246/main

Correct some spelling issues
This commit is contained in:
Aune 2023-01-02 08:27:21 +01:00 committed by GitHub
commit bec82f7002
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
10 changed files with 19 additions and 19 deletions

View file

@ -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 {

View file

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

View file

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

View file

@ -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
}

View file

@ -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 {

View file

@ -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
}

View file

@ -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
}

View file

@ -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;

View file

@ -1163,7 +1163,7 @@ function set_wrapperr_customization() {
html += '</div>';
html += '<div class="form-group">';
html += '<label for="get_user_movie_stats_oldest_subtitle" title="Subtitle of the oldest movie section. Applied if the other spesfic ones are not applicable.">Movie oldest subtitle:<br>';
html += '<label for="get_user_movie_stats_oldest_subtitle" title="Subtitle of the oldest movie section. Applied if the other specific ones are not applicable.">Movie oldest subtitle:<br>';
html += '<textarea cols="40" rows="2" class="form-control" style="overflow-x: hidden;resize:vertical;min-height: 2em;" id="get_user_movie_stats_oldest_subtitle" name="get_user_movie_stats_oldest_subtitle" value="" autocomplete="off"></textarea></label>';
html += '</div>';