# KV Download — installed by the Synology package (one-click).

Your app is already running. To open it:
  - click the KV Download icon in the DSM main menu (opens the app in a
    browser tab at http://<NAS-LAN-IP>:<port>/), or
  - Control Panel -> Application Portal -> KV Download shows the address
    (a random free port between 20000-59999 is assigned automatically, so
    there are no port conflicts).

## Where are my downloaded files?

Every finished download is saved on your NAS in this folder:

    /var/packages/kvdownload/var/data
    (= /volume2/@appdata/kvdownload/data on the filesystem)

Browse it with File Station: open the root of volume2, enable "Show hidden
files" (Settings -> General -> Show hidden files), then open
@appdata -> kvdownload -> data. Or use an SMB mount of the `docker` share
path: /volume2/@appdata/kvdownload/data.

## Auto-cleanup of downloaded files (optional)

To automatically delete old downloads, schedule a task in DSM:

1. Control Panel -> Task Scheduler -> Create -> Scheduled Task ->
   User-defined script.
2. Task name: "KV Download cleanup", User: root.
3. Schedule: daily at e.g. 03:00 (or weekly).
4. Task settings -> User-defined script:

       find /volume2/@appdata/kvdownload/data -type f -mtime +30 -delete

   (deletes files older than 30 days — adjust the number, or use
    `-mmin +1440` for 24h). Add `-mindepth 1` if you want to also prune
    empty subfolders later.

Uninstall: Package Center -> KV Download -> Uninstall (container is removed;
your downloads under /var/packages/kvdownload/var/data are kept).

Optional cookies: place a Netscape cookies.txt at /app/cookies.txt inside the
container to unlock private/age-restricted content — restart the package
afterwards (Package Center -> KV Download -> Stop/Start).
