|
@@ -35,7 +35,9 @@ TESTING = len(sys.argv) > 1 and sys.argv[1] == "test"
|
|
|
FEATURED_GAME_DURATION = os.getenv("EMUS_FEATURED_GAME_DURATION", 60 * 60 * 18)
|
|
|
|
|
|
ALLOWED_HOSTS = ["*"]
|
|
|
-CSRF_TRUSTED_ORIGINS = [os.getenv("EMUS_TRUSTED_ORIGINS", "http://localhost:8000")]
|
|
|
+CSRF_TRUSTED_ORIGINS = [
|
|
|
+ os.getenv("EMUS_TRUSTED_ORIGINS", "http://localhost:8000")
|
|
|
+]
|
|
|
X_FRAME_OPTIONS = "SAMEORIGIN"
|
|
|
|
|
|
REDIS_URL = os.getenv("EMUS_REDIS_URL", None)
|
|
@@ -105,11 +107,14 @@ WSGI_APPLICATION = "emus.wsgi.application"
|
|
|
|
|
|
DATABASES = {
|
|
|
"default": dj_database_url.config(
|
|
|
- default=os.getenv("EMUS_DATABASE_URL", "sqlite:///db.sqlite3"), conn_max_age=600
|
|
|
+ default=os.getenv("EMUS_DATABASE_URL", "sqlite:///db.sqlite3"),
|
|
|
+ conn_max_age=600,
|
|
|
),
|
|
|
}
|
|
|
if TESTING:
|
|
|
- DATABASES = {"default": dj_database_url.config(default="sqlite:///testdb.sqlite3")}
|
|
|
+ DATABASES = {
|
|
|
+ "default": dj_database_url.config(default="sqlite:///testdb.sqlite3")
|
|
|
+ }
|
|
|
|
|
|
|
|
|
CACHES = {
|
|
@@ -119,7 +124,9 @@ CACHES = {
|
|
|
}
|
|
|
}
|
|
|
if REDIS_URL:
|
|
|
- CACHES["default"]["BACKEND"] = "django.core.cache.backends.redis.RedisCache"
|
|
|
+ CACHES["default"][
|
|
|
+ "BACKEND"
|
|
|
+ ] = "django.core.cache.backends.redis.RedisCache"
|
|
|
CACHES["default"]["LOCATION"] = REDIS_URL
|
|
|
|
|
|
SESSION_ENGINE = "django.contrib.sessions.backends.cached_db"
|
|
@@ -130,9 +137,13 @@ AUTHENTICATION_BACKENDS = [
|
|
|
]
|
|
|
|
|
|
REST_FRAMEWORK = {
|
|
|
- "DEFAULT_PERMISSION_CLASSES": ("rest_framework.permissions.IsAuthenticated",),
|
|
|
+ "DEFAULT_PERMISSION_CLASSES": (
|
|
|
+ "rest_framework.permissions.IsAuthenticated",
|
|
|
+ ),
|
|
|
"DEFAULT_PAGINATION_CLASS": "rest_framework.pagination.PageNumberPagination",
|
|
|
- "DEFAULT_FILTER_BACKENDS": ["django_filters.rest_framework.DjangoFilterBackend"],
|
|
|
+ "DEFAULT_FILTER_BACKENDS": [
|
|
|
+ "django_filters.rest_framework.DjangoFilterBackend"
|
|
|
+ ],
|
|
|
"PAGE_SIZE": 100,
|
|
|
}
|
|
|
|
|
@@ -182,6 +193,7 @@ COLLECTIONS_DIR = os.path.join(ROMS_DIR, "emulationstation-collections")
|
|
|
SCRAPER_BIN_PATH = os.getenv("EMUS_SCRAPER_BINPATH", "Skyscraper")
|
|
|
SCRAPER_CONFIG_FILE = os.getenv("EMUS_SCRAPER_CONFIG_FILE", "skyscraper.ini")
|
|
|
SCRAPER_SITE = os.getenv("EMUS_SCRAPER_SITE", "screenscraper")
|
|
|
+SCRAPER_FRONTEND = os.getenv("EMUS_FRONTEND", "emulationstation")
|
|
|
|
|
|
JSON_LOGGING = os.getenv("EMUS_JSON_LOGGING", False)
|
|
|
LOG_TYPE = "json" if JSON_LOGGING else "log"
|
|
@@ -196,7 +208,11 @@ LOG_FILE_PATH = os.getenv("EMUS_LOG_FILE_PATH", "/tmp/")
|
|
|
LOGGING = {
|
|
|
"version": 1,
|
|
|
"disable_existing_loggers": False,
|
|
|
- "root": {"handlers": ["console", "file"], "level": LOG_LEVEL, "propagate": True},
|
|
|
+ "root": {
|
|
|
+ "handlers": ["console", "file"],
|
|
|
+ "level": LOG_LEVEL,
|
|
|
+ "propagate": True,
|
|
|
+ },
|
|
|
"formatters": {
|
|
|
"color": {
|
|
|
"()": "colorlog.ColoredFormatter",
|
|
@@ -269,6 +285,14 @@ GAME_SYSTEM_DEFAULTS = {
|
|
|
"name": "Nintendo 3DS",
|
|
|
"retroarch_core": "citra",
|
|
|
},
|
|
|
+ "atari2600": {
|
|
|
+ "name": "Atari 2600",
|
|
|
+ "retroarch_core": "",
|
|
|
+ },
|
|
|
+ "atari7800": {
|
|
|
+ "name": "Atari 7800",
|
|
|
+ "retroarch_core": "",
|
|
|
+ },
|
|
|
"atarijaguar": {
|
|
|
"name": "Atari Jaguar",
|
|
|
"retroarch_core": "virtualjaguar",
|