mirror of
https://github.com/Tautulli/Tautulli.git
synced 2025-07-13 08:42:59 -07:00
Add export directory
This commit is contained in:
parent
b872cce2a4
commit
6334ffa197
7 changed files with 28 additions and 3 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -17,6 +17,7 @@ version.lock
|
||||||
logs/*
|
logs/*
|
||||||
backups/*
|
backups/*
|
||||||
cache/*
|
cache/*
|
||||||
|
exports/*
|
||||||
newsletters/*
|
newsletters/*
|
||||||
*.mmdb
|
*.mmdb
|
||||||
version.txt
|
version.txt
|
||||||
|
|
|
@ -49,6 +49,10 @@ DOCUMENTATION :: END
|
||||||
<td>Cache Directory:</td>
|
<td>Cache Directory:</td>
|
||||||
<td>${plexpy.CONFIG.CACHE_DIR}</td>
|
<td>${plexpy.CONFIG.CACHE_DIR}</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>Export Directory:</td>
|
||||||
|
<td>${plexpy.CONFIG.EXPORT_DIR}</td>
|
||||||
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>Newsletter Directory:</td>
|
<td>Newsletter Directory:</td>
|
||||||
<td>${plexpy.CONFIG.NEWSLETTER_DIR}</td>
|
<td>${plexpy.CONFIG.NEWSLETTER_DIR}</td>
|
||||||
|
|
|
@ -1442,6 +1442,22 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label for="export_dir">Export Directory</label> ${docker_msg | n}
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-7">
|
||||||
|
<div class="input-group">
|
||||||
|
<input type="text" class="form-control directory-settings" id="export_dir" name="export_dir" value="${config['export_dir']}" ${docker_setting}>
|
||||||
|
<span class="input-group-btn">
|
||||||
|
<button class="btn btn-form" type="button" id="export_dir_browse" data-toggle="browse" data-filter=".folderonly" data-target="#export_dir" ${docker_setting}>Browse</button>
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
<div class="btn-group">
|
||||||
|
<button class="btn btn-form" type="button" id="clear_exports">Clear All Exports</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<p><input type="button" class="btn btn-bright save-button" value="Save" data-success="Changes saved successfully"></p>
|
<p><input type="button" class="btn btn-bright save-button" value="Save" data-success="Changes saved successfully"></p>
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
# This file is part of Tautulli.
|
# This file is part of Tautulli.
|
||||||
#
|
#
|
||||||
# Tautulli is free software: you can redistribute it and/or modify
|
# Tautulli is free software: you can redistribute it and/or modify
|
||||||
# it under the terms of the GNU General Public License as published by
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
@ -226,6 +226,8 @@ def initialize(config_file):
|
||||||
CONFIG.BACKUP_DIR, os.path.join(DATA_DIR, 'backups'), 'backups')
|
CONFIG.BACKUP_DIR, os.path.join(DATA_DIR, 'backups'), 'backups')
|
||||||
CONFIG.CACHE_DIR, _ = check_folder_writable(
|
CONFIG.CACHE_DIR, _ = check_folder_writable(
|
||||||
CONFIG.CACHE_DIR, os.path.join(DATA_DIR, 'cache'), 'cache')
|
CONFIG.CACHE_DIR, os.path.join(DATA_DIR, 'cache'), 'cache')
|
||||||
|
CONFIG.EXPORT_DIR, _ = check_folder_writable(
|
||||||
|
CONFIG.EXPORT_DIR, os.path.join(DATA_DIR, 'exports'), 'exports')
|
||||||
CONFIG.NEWSLETTER_DIR, _ = check_folder_writable(
|
CONFIG.NEWSLETTER_DIR, _ = check_folder_writable(
|
||||||
CONFIG.NEWSLETTER_DIR, os.path.join(DATA_DIR, 'newsletters'), 'newsletters')
|
CONFIG.NEWSLETTER_DIR, os.path.join(DATA_DIR, 'newsletters'), 'newsletters')
|
||||||
|
|
||||||
|
|
|
@ -96,6 +96,7 @@ _CONFIG_DEFINITIONS = {
|
||||||
'CONFIG_VERSION': (int, 'Advanced', 0),
|
'CONFIG_VERSION': (int, 'Advanced', 0),
|
||||||
'DO_NOT_OVERRIDE_GIT_BRANCH': (int, 'General', 0),
|
'DO_NOT_OVERRIDE_GIT_BRANCH': (int, 'General', 0),
|
||||||
'ENABLE_HTTPS': (int, 'General', 0),
|
'ENABLE_HTTPS': (int, 'General', 0),
|
||||||
|
'EXPORT_DIR': (str, 'General', ''),
|
||||||
'FIRST_RUN_COMPLETE': (int, 'General', 0),
|
'FIRST_RUN_COMPLETE': (int, 'General', 0),
|
||||||
'FREEZE_DB': (int, 'General', 0),
|
'FREEZE_DB': (int, 'General', 0),
|
||||||
'GET_FILE_SIZES': (int, 'General', 0),
|
'GET_FILE_SIZES': (int, 'General', 0),
|
||||||
|
@ -194,7 +195,7 @@ _WHITELIST_KEYS = ['HTTPS_KEY']
|
||||||
|
|
||||||
_DO_NOT_IMPORT_KEYS = [
|
_DO_NOT_IMPORT_KEYS = [
|
||||||
'FIRST_RUN_COMPLETE', 'GET_FILE_SIZES_HOLD', 'GIT_PATH', 'PMS_LOGS_FOLDER',
|
'FIRST_RUN_COMPLETE', 'GET_FILE_SIZES_HOLD', 'GIT_PATH', 'PMS_LOGS_FOLDER',
|
||||||
'BACKUP_DIR', 'CACHE_DIR', 'LOG_DIR', 'NEWSLETTER_DIR', 'NEWSLETTER_CUSTOM_DIR',
|
'BACKUP_DIR', 'CACHE_DIR', 'EXPORT_DIR', 'LOG_DIR', 'NEWSLETTER_DIR', 'NEWSLETTER_CUSTOM_DIR',
|
||||||
'HTTP_HOST', 'HTTP_PORT', 'HTTP_ROOT',
|
'HTTP_HOST', 'HTTP_PORT', 'HTTP_ROOT',
|
||||||
'HTTP_USERNAME', 'HTTP_PASSWORD', 'HTTP_HASH_PASSWORD', 'HTTP_HASHED_PASSWORD',
|
'HTTP_USERNAME', 'HTTP_PASSWORD', 'HTTP_HASH_PASSWORD', 'HTTP_HASHED_PASSWORD',
|
||||||
'ENABLE_HTTPS', 'HTTPS_CREATE_CERT', 'HTTPS_CERT', 'HTTPS_CERT_CHAIN', 'HTTPS_KEY'
|
'ENABLE_HTTPS', 'HTTPS_CREATE_CERT', 'HTTPS_CERT', 'HTTPS_CERT_CHAIN', 'HTTPS_KEY'
|
||||||
|
|
|
@ -897,7 +897,7 @@ def export(section_id=None, rating_key=None, file_format='json'):
|
||||||
return
|
return
|
||||||
|
|
||||||
filename = helpers.clean_filename(filename)
|
filename = helpers.clean_filename(filename)
|
||||||
filepath = os.path.join(plexpy.CONFIG.CACHE_DIR, filename)
|
filepath = os.path.join(plexpy.CONFIG.EXPORT_DIR, filename)
|
||||||
logger.info("Tautulli Exporter :: Starting export for '%s'...", filename)
|
logger.info("Tautulli Exporter :: Starting export for '%s'...", filename)
|
||||||
|
|
||||||
export_id = set_export_state(timestamp=timestamp,
|
export_id = set_export_state(timestamp=timestamp,
|
||||||
|
|
|
@ -3052,6 +3052,7 @@ class WebInterface(object):
|
||||||
"backup_dir": plexpy.CONFIG.BACKUP_DIR,
|
"backup_dir": plexpy.CONFIG.BACKUP_DIR,
|
||||||
"backup_interval": plexpy.CONFIG.BACKUP_INTERVAL,
|
"backup_interval": plexpy.CONFIG.BACKUP_INTERVAL,
|
||||||
"cache_dir": plexpy.CONFIG.CACHE_DIR,
|
"cache_dir": plexpy.CONFIG.CACHE_DIR,
|
||||||
|
"export_dir": plexpy.CONFIG.EXPORT_DIR,
|
||||||
"log_dir": plexpy.CONFIG.LOG_DIR,
|
"log_dir": plexpy.CONFIG.LOG_DIR,
|
||||||
"log_blacklist": checked(plexpy.CONFIG.LOG_BLACKLIST),
|
"log_blacklist": checked(plexpy.CONFIG.LOG_BLACKLIST),
|
||||||
"check_github": checked(plexpy.CONFIG.CHECK_GITHUB),
|
"check_github": checked(plexpy.CONFIG.CHECK_GITHUB),
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue