21 lines
1.9 KiB
Markdown
21 lines
1.9 KiB
Markdown
# MeTube project notes
|
|
|
|
## Versioning rule
|
|
|
|
- The version number checked into git (recorded in `DEPLOY.md`) is the **current online version** — the version of the latest published Docker image.
|
|
- When any changes are made, the new Docker image version must **bump the minor number of the latest git version** (e.g. latest is `1.9` → new image is `1.10`).
|
|
- The version is injected into the image at build time via `--build-arg VERSION=<version>` (exposed as `METUBE_VERSION` and served by the `/version` endpoint).
|
|
- Whenever a new image is built and pushed, update the build/push commands in `DEPLOY.md` in the same commit so the checked-in version always matches the published image.
|
|
- Use `./publish.sh` to publish: it bumps the minor version from `DEPLOY.md`, updates `DEPLOY.md`, builds and pushes the image. Pass an explicit version (`./publish.sh 2.0`) to override. Do not run it unless the user asked to publish.
|
|
|
|
## UI
|
|
|
|
- Angular app in `ui/`. Build with `cd ui && npm run build`. The Docker image builds the UI itself (see `Dockerfile`), so no need to commit `ui/dist`.
|
|
|
|
## Media library (organize/browse) feature
|
|
|
|
- `LIBRARY_DIR` (empty = feature off) points to a separate media library directory, mounted as its own volume. See `LIBRARY_ORGANIZE_DESIGN.md` for the full design.
|
|
- Library state is read from disk on demand — no DB/index. `/library/folders` is cached ~60s in memory; organize/delete invalidate it.
|
|
- Organizing a completed download moves its file into the library and removes the done entry (a `cleared` socket event updates the UI).
|
|
- At organize time a hidden sidecar `.<filename>.metube.json` is written next to the video with source metadata (`url`, `title`, `uploader`, `website`, `downloaded_at`) — see `library_meta_path()` in `app/ytdl.py`. `/library/files` attaches it as `meta`; library delete removes it. Files organized before this existed have no sidecar.
|