The Files library starts here. A user's every download, clip and upload now lands in a source folder made per origin (YouTube, Plex clips, uploads, one per other site), decided once in downloads/folders.py at every place a job is made. How long a file stays moves from the shared asset to the user's job: stamped from its folder when it is done, never for a file the user keeps. The GC warns each user once, then takes the expired file out of their library; the cache cap never evicts a kept file, and an evicted one leaves every holder's library. The media mount is /files now (FILES_ROOT, FILES_HOST_PATH, volume siftlode_files); docs/self-hosting.md says how to carry an old volume over. Migration 0102 places every existing job and carries each done file's expiry over from its asset. safe_abs_path takes a missing path and answers None, which drops one baselined type error.
14 lines
529 B
Python
14 lines
529 B
Python
"""Shared on-disk cache root for proxied Plex assets.
|
|
|
|
Both poster/art images (imgcache.py) and converted subtitle VTTs (subtitles.py) are cached here, so
|
|
the directory belongs to neither module — it lives in this neutral home to avoid a cross-import.
|
|
On-demand + bounded by the library size; no eviction (a few hundred MB at most for a big library —
|
|
acceptable, matching the download disk trade-offs).
|
|
"""
|
|
|
|
from pathlib import Path
|
|
|
|
from app.config import settings
|
|
|
|
CACHE_DIR = Path(settings.files_root) / ".plex-img-cache"
|