Skip to content

Commit

Permalink
tidy up settings and readme
Browse files Browse the repository at this point in the history
  • Loading branch information
meeb committed Dec 11, 2024
1 parent 5f28b8b commit 2c12bf5
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 26 deletions.
41 changes: 17 additions & 24 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -361,30 +361,23 @@ There are a number of other environment variables you can set. These are, mostly
**NOT** required to be set in the default container installation, they are really only
useful if you are manually installing TubeSync in some other environment. These are:

| Name | What | Example |
| --------------------------- | ------------------------------------------------------------ |--------------------------------------|
| DJANGO_SECRET_KEY | Django's SECRET_KEY | YJySXnQLB7UVZw2dXKDWxI5lEZaImK6l |
| DJANGO_URL_PREFIX | Run TubeSync in a sub-URL on the web server | /somepath/ |
| TUBESYNC_DEBUG | Enable debugging | True |
| TUBESYNC_WORKERS | Number of background workers, default is 2, max allowed is 8 | 2 |
| TUBESYNC_HOSTS | Django's ALLOWED_HOSTS, defaults to `*` | tubesync.example.com,otherhost.com |
| TUBESYNC_RESET_DOWNLOAD_DIR | Toggle resetting `/downloads` permissions, defaults to True | True |
| GUNICORN_WORKERS | Number of gunicorn workers to spawn | 3 |
| LISTEN_HOST | IP address for gunicorn to listen on | 127.0.0.1 |
| LISTEN_PORT | Port number for gunicorn to listen on | 8080 |
| HTTP_USER | Sets the username for HTTP basic authentication | some-username |
| HTTP_PASS | Sets the password for HTTP basic authentication | some-secure-password |
| DATABASE_CONNECTION | Optional external database connection details | mysql://user:pass@host:port/database |
| VIDEO_HEIGHT_CUTOFF | Smallest video height in pixels permitted to download | 240 |
| TUBESYNC_DIRECTORY_PREFIX | Controls how downloaded files are organized. | true |

# TubeSync Directory Mode

Controls how downloaded files are organized.

Values:
- true: Audio files go to `audio`, video files to `video`.
- false: All files are placed in the root of DOWNLOAD_DIR.
| Name | What | Example |
| ---------------------------- | ------------------------------------------------------------- |--------------------------------------|
| DJANGO_SECRET_KEY | Django's SECRET_KEY | YJySXnQLB7UVZw2dXKDWxI5lEZaImK6l |
| DJANGO_URL_PREFIX | Run TubeSync in a sub-URL on the web server | /somepath/ |
| TUBESYNC_DEBUG | Enable debugging | True |
| TUBESYNC_WORKERS | Number of background workers, default is 2, max allowed is 8 | 2 |
| TUBESYNC_HOSTS | Django's ALLOWED_HOSTS, defaults to `*` | tubesync.example.com,otherhost.com |
| TUBESYNC_RESET_DOWNLOAD_DIR | Toggle resetting `/downloads` permissions, defaults to True | True |
| TUBESYNC_VIDEO_HEIGHT_CUTOFF | Smallest video height in pixels permitted to download | 240 |
| TUBESYNC_DIRECTORY_PREFIX | Enable `video` and `audio` directory prefixes in `/downloads` | True |
| GUNICORN_WORKERS | Number of gunicorn workers to spawn | 3 |
| LISTEN_HOST | IP address for gunicorn to listen on | 127.0.0.1 |
| LISTEN_PORT | Port number for gunicorn to listen on | 8080 |
| HTTP_USER | Sets the username for HTTP basic authentication | some-username |
| HTTP_PASS | Sets the password for HTTP basic authentication | some-secure-password |
| DATABASE_CONNECTION | Optional external database connection details | mysql://user:pass@host:port/database |


# Manual, non-containerised, installation

Expand Down
3 changes: 3 additions & 0 deletions tubesync/tubesync/local_settings.py.container
Original file line number Diff line number Diff line change
Expand Up @@ -84,3 +84,6 @@ else:


SOURCE_DOWNLOAD_DIRECTORY_PREFIX = os.getenv('TUBESYNC_DIRECTORY_PREFIX', 'True').strip().lower()


VIDEO_HEIGHT_CUTOFF = int(os.getenv("TUBESYNC_VIDEO_HEIGHT_CUTOFF", "240"))
4 changes: 2 additions & 2 deletions tubesync/tubesync/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -154,8 +154,8 @@
MEDIA_THUMBNAIL_HEIGHT = 240 # Height in pixels to resize thumbnails to


VIDEO_HEIGHT_CUTOFF = int(os.getenv("VIDEO_HEIGHT_CUTOFF", "240")) # Smallest resolution in pixels permitted to download
VIDEO_HEIGHT_IS_HD = 500 # Height in pixels to count as 'HD'
VIDEO_HEIGHT_CUTOFF = 240 # Smallest resolution in pixels permitted to download
VIDEO_HEIGHT_IS_HD = 500 # Height in pixels to count as 'HD'



Expand Down

0 comments on commit 2c12bf5

Please sign in to comment.