62 lines
2.4 KiB
Markdown
62 lines
2.4 KiB
Markdown
# fsdy — the filesystem provider
|
|
|
|
Mounts a local directory at **`/fs`** in the crabidy library. The same
|
|
engine also powers the server-managed mounts `/queues`, `/bookmarks`,
|
|
and `/captures` — everything below applies to their on-disk format too.
|
|
|
|
## How it works
|
|
|
|
The provider walks one configured root directory. Every **directory**
|
|
becomes a queueable library node; every file ending in
|
|
**`.cbd-track.toml`** becomes a track; everything else (audio files,
|
|
covers, hidden entries) is invisible to the library. Listing order is
|
|
case-insensitive by file name — prefix files with numbers to fix an
|
|
order (the capture/bookmark writers use `0001`-style prefixes for
|
|
exactly this reason).
|
|
|
|
A track file carries the track's metadata plus a reference to the
|
|
playable thing:
|
|
|
|
```toml
|
|
title = "We Will Rock You" # required
|
|
artist = "Queen" # optional
|
|
duration = 122 # optional, seconds
|
|
|
|
[album] # optional
|
|
title = "News of the World"
|
|
release_date = "1977-10-28"
|
|
|
|
# Exactly ONE of the following four:
|
|
[playable]
|
|
file = "we-will-rock-you.flac" # local audio; absolute, or relative to
|
|
# this file's directory (relocatable)
|
|
# url = "https://example.org/radio.mp3" # http(s) stream
|
|
# link = "/tidal/artists/1/2/3" # another provider's track
|
|
# skipped = true # no audio: a capture recorded its
|
|
# source as uncapturable; shown red,
|
|
# skipped by playback
|
|
```
|
|
|
|
Malformed track files are skipped with a warning; they never break the
|
|
listing. `link` playables resolve exactly one hop (a link to a link
|
|
fails at play time), which keeps cycles impossible.
|
|
|
|
## Configuration — `~/.config/crabidy/fsdy.toml`
|
|
|
|
```toml
|
|
# Absolute path of the directory to expose under /fs.
|
|
# Default: the platform music directory (e.g. ~/Music). When neither is
|
|
# available the /fs mount is disabled — the rest of the server runs on.
|
|
# root = "/home/me/music"
|
|
```
|
|
|
|
## The server-managed instances
|
|
|
|
`/queues`, `/bookmarks`, and `/captures` are fsdy instances over
|
|
`~/.config/crabidy/{queues,bookmarks,captures}/`, written by the server
|
|
(queue persistence, `w`, `W`) and readable/editable with any file
|
|
manager — they are just folders of the track files described above.
|
|
Their top-level folders can be renamed (`e`) and deleted (`d`) from the
|
|
TUI; `/queues/current` is the continuously persisted play queue and is
|
|
protected.
|