Tweaks to default settings

- Typos
- Cookie exp date changed
- Changed default config settings
This commit is contained in:
aunefyren 2022-01-16 13:29:20 +01:00
parent ba65ae2832
commit e905851042
5 changed files with 19 additions and 19 deletions

View file

@ -64,7 +64,7 @@ function log_in() {
document.getElementById("log_in_button").style.opacity = '1';
document.getElementById('password').value = '';
} else {
set_cookie("wrapperr-admin", result.cookie, 1);
set_cookie("wrapperr-admin", result.cookie, 7);
location.reload();
}
@ -381,7 +381,7 @@ function set_tautulli_settings() {
html += '</div>';
html += '<div class="form-group">';
html += '<label for="tautulli_libraries" title="Comma seprated list of ID\'s to use for statistics. If none are given, it will search all.">Libraries ID\'s to use: (Optional)</label>';
html += '<label for="tautulli_libraries" title="Comma seprated list of ID\'s to use for statistics. If none are given, it will search all.">Library ID\'s to use: (Optional)</label>';
html += '<input type="text" class="form-control" id="tautulli_libraries" value="' + tautulli_libraries + '" autocomplete="off" placeholder=""/><br>';
html += '</div>';

View file

@ -21,9 +21,9 @@ $config = new Config();
if(!$config->is_configured()) {
// Log activity
$log->log_activity('get_login_url.php', 'unknown', 'Wrapperr is not confgured..');
$log->log_activity('get_login_url.php', 'unknown', 'Wrapperr is not configured.');
echo json_encode(array("message" => "Wrapperr is not confgured.", "error" => true));
echo json_encode(array("message" => "Wrapperr is not configured.", "error" => true));
exit(0);
}

View file

@ -25,9 +25,9 @@ $data = json_decode(file_get_contents("php://input"));
if(!$config->is_configured() || !$admin->is_configured()) {
// Log activity
$log->log_activity('get_stats.php', 'unknown', 'Wrapperr is not confgured..');
$log->log_activity('get_stats.php', 'unknown', 'Wrapperr is not configured.');
echo json_encode(array("message" => "Wrapperr is not confgured.", "error" => true));
echo json_encode(array("message" => "Wrapperr is not configured.", "error" => true));
exit(0);
}
@ -35,7 +35,7 @@ if(!$config->is_configured() || !$admin->is_configured()) {
date_default_timezone_set($config->timezone);
// Set maximum run-time
set_time_limit(600);
set_time_limit(1200);
// Base-URL for connections to Tautulli API.
$connection = create_url();
@ -219,7 +219,7 @@ if($config->get_user_movie_stats || $config->get_user_show_stats || $config->get
$year_music = array("error" => True, "message" => "Disabled in config.", "data" => array());
}
// Select the retrieved dataset if music are configured for the server.
// Select the retrieved dataset if the leaderboard is configured for the server.
if(($config->get_year_stats_movies || $config->get_year_stats_shows || $config->get_year_stats_music) && $config->get_year_stats_leaderboard ) {
$year_users = array("data" => $user_stats["year_users"], "message" => "Success. User year-stats are loaded.", "error" => False);
} else {

View file

@ -15,7 +15,7 @@ class Config {
public $https;
// Wrapperr config
public $wrapperr_version = 'v2.2.1';
public $wrapperr_version = 'v2.2.2';
public $timezone;
public $application_name;
public $application_url;
@ -205,7 +205,7 @@ class Config {
if(isset($json->use_logs)) {
$this->use_logs = $json->use_logs;
} else {
$this->use_logs = false;
$this->use_logs = true;
}
if(isset($json->client_id) && $json->client_id !== '') {
@ -265,14 +265,14 @@ class Config {
if(isset($json->create_share_links)) {
$this->create_share_links = $json->create_share_links;
} else {
$this->create_share_links = false;
$this->create_share_links = true;
}
// Movie values
if(isset($json->get_user_movie_stats)) {
$this->get_user_movie_stats = $json->get_user_movie_stats;
} else {
$this->get_user_movie_stats = false;
$this->get_user_movie_stats = true;
}
// Title
@ -447,7 +447,7 @@ class Config {
if(isset($json->get_user_show_stats)) {
$this->get_user_show_stats = $json->get_user_show_stats;
} else {
$this->get_user_show_stats = false;
$this->get_user_show_stats = true;
}
// Get show-buddy
@ -573,7 +573,7 @@ class Config {
if(isset($json->get_user_music_stats)) {
$this->get_user_music_stats = $json->get_user_music_stats;
} else {
$this->get_user_music_stats = false;
$this->get_user_music_stats = true;
}
// Title
@ -706,7 +706,7 @@ class Config {
if(isset($json->get_year_stats_movies)) {
$this->get_year_stats_movies = $json->get_year_stats_movies;
} else {
$this->get_year_stats_movies = false;
$this->get_year_stats_movies = true;
}
// Top movie stats for server title
@ -726,7 +726,7 @@ class Config {
if(isset($json->get_year_stats_shows)) {
$this->get_year_stats_shows = $json->get_year_stats_shows;
} else {
$this->get_year_stats_shows = false;
$this->get_year_stats_shows = true;
}
// Top shows stats for server title
@ -746,7 +746,7 @@ class Config {
if(isset($json->get_year_stats_music)) {
$this->get_year_stats_music = $json->get_year_stats_music;
} else {
$this->get_year_stats_music = false;
$this->get_year_stats_music = true;
}
// Top shows stats for server title
@ -766,7 +766,7 @@ class Config {
if(isset($json->get_year_stats_leaderboard)) {
$this->get_year_stats_leaderboard = $json->get_year_stats_leaderboard;
} else {
$this->get_year_stats_leaderboard = false;
$this->get_year_stats_leaderboard = true;
}
// Top users for server title

View file

@ -155,7 +155,7 @@ function check_token(code, id) {
if(result.error) {
reset_button();
} else {
set_cookie("wrapperr-user", result.cookie, 1);
set_cookie("wrapperr-user", result.cookie, 7);
location.reload();
}
}