import: more-perfect-union — Palantir (2025-04-17)
Some checks failed
secret-scan / gitleaks (HEAD + history) (push) Has been cancelled
secret-scan / detect-secrets (entropy + cross-tool) (push) Has been cancelled
secret-scan / summary (push) Has been cancelled

First import for the More Perfect Union channel. Hit the documented
single-file-in-folder title-leak: JF named the item "More Perfect Union"
(folder name) instead of the video title. Fixed via Items PUT +
LockData=true. Channel now seeded; future imports should parse cleanly.
This commit is contained in:
s8n 2026-05-12 18:40:34 +01:00
parent 034dbe68c0
commit 3b67ada1a8

View file

@ -0,0 +1,124 @@
# more-perfect-union-palantir-20250417
Single-video YouTube import into the **STOCK** Jellyfin at `tv.s8n.ru`
(container `jellyfin-stock`), **Education** library
(`collectionType=movies`, internet providers disabled, fresh path).
First import for channel `More Perfect Union` — creates the channel folder
under `/media/education/`.
## Provenance
- **Source:** YouTube — `https://www.youtube.com/watch?v=DZ95Gmvg_D4`
- **Channel:** More Perfect Union
- **Title:** "I Worked At Palantir: The Tech Company Reshaping Reality"
- **Upload date:** 2025-04-17
- **Duration:** 16:31
- **Tool:** `yt-dlp` on onyx
- **Format selector:** `bv*[height<=1080][ext=mp4]+ba[ext=m4a]/b[height<=1080][ext=mp4]/bv*[height<=1080]+ba/b[height<=1080]/b``--merge-output-format mp4` (source native 1080p AV1+AAC)
- **Subs:** `--write-subs --sub-langs 'en' --embed-subs --convert-subs srt` — author-provided English subs embedded AND sidecar `.en.srt`
- **Thumbnail:** `--write-thumbnail --convert-thumbnails jpg` → sidecar `.jpg`, Primary via Local Posters
- **yt-dlp output template:** `-o "%(title)s — %(upload_date)s.%(ext)s"`
- **Staging path on onyx:** `/home/admin/staging-jelly/More Perfect Union/`
### Filename normalisation
Raw yt-dlp output (with fullwidth colon substitute):
`I Worked At Palantir The Tech Company Reshaping Reality — 20250417.mp4`
Applied playbook §1f rules:
- Replaced U+FF1A FULLWIDTH COLON (yt-dlp's safe substitute for `:`) with
` - `. Playbook §1f forbids ASCII `:`; the fullwidth fallback is
cosmetically ugly and breaks search.
Final filename (per playbook §1d Education pattern — date as suffix, em-dash):
`I Worked At Palantir - The Tech Company Reshaping Reality — 20250417.mp4`
## Target
- **Server:** `jellyfin-stock` on nullstone, `https://tv.s8n.ru`
- **Library:** Education (`collectionType=movies`, `EnableInternetProviders=false`)
- **Library Item ID:** `484cf52875118e03bd7effc72621bec0`
- **Movie Item ID:** `d9127cf53df5f81565bc217305179962`
- **Path on host:** `/home/user/media/education/More Perfect Union/I Worked At Palantir - The Tech Company Reshaping Reality — 20250417.mp4`
### Sidecar files
| Kind | File |
|---|---|
| Media | `… — 20250417.mp4` (89,599,403 B, ~85 MiB) |
| Subtitle | `… — 20250417.en.srt` (22,955 B) |
| Thumbnail | `… — 20250417.jpg` (56,398 B) — Primary via Local Posters |
## Counts
| | Before | After | Delta |
|---|---:|---:|---:|
| Education library items | 11 | 12 | +1 |
| `More Perfect Union/` channel folder | — | created | new channel |
## Stream summary
```
Container: mp4 Size: 85.5 MiB Duration: 16:31
Video av1 und 1080p AV1 SDR
Audio aac eng English AAC stereo
Subtitle mov_text eng English — Default — MOV_TEXT (embedded)
Subtitle subrip eng English — SUBRIP — External (.en.srt)
```
AV1 1080p source — direct-play in any AV1-capable client (Chromium 100+,
recent VLC, mpv).
## Subtitle status
- Embedded: yes — one English `mov_text` track from `--embed-subs`.
- External sidecar: yes — `.en.srt`.
- Source: channel-published (author-provided) — yt-dlp `--sub-langs 'en'`
fetches manual subs only, never auto-CC.
- Action: none. No WhisperX rebuild needed.
## Verification checks
- [x] Folder/filename canonical (playbook §1d — date suffix, em-dash, no Season dir).
- [x] No forbidden chars in path.
- [x] Permissions `user:user` 644 / 755.
- [x] `Scan Media Library` triggered via `/ScheduledTasks/Running/<id>`,
`LastExecutionResult.Status=Completed`.
- [x] Item resolved as `Type=Movie` in Education library.
- [x] `ImageTags.Primary` present (Local Posters from sidecar `.jpg`).
- [x] Embedded + external subtitle streams both registered.
- [x] `LockData=true` set after manual Name override (see Notes).
- [ ] Direct-play in mobile / Smart-TV client not exercised.
## Notes / surprises
### JF single-file-in-channel-folder leaked folder name as title
First import for a brand-new channel folder produces exactly **one** file in
`/media/education/More Perfect Union/`. JF's movie resolver applied the
folder-name-as-title heuristic and registered the item as
`Name="More Perfect Union"` — wiping the actual episode title.
This matches the documented pattern in
`feedback_jellyfin_single_file_channel`: movie-in-own-folder → folder name
wins. Fix: PUT `/Items/<id>` with corrected `Name` + `LockData=true` so
future scans don't revert it.
Working fix:
```bash
TOK=<admin>
ITEM=d9127cf53df5f81565bc217305179962
USER_ID=2ad8033c4f97486788d4a4b4915b9c0f
curl -sf -H "X-Emby-Token: $TOK" \
"$SERVER_URL/Users/$USER_ID/Items/$ITEM" \
| jq '.Name = "I Worked At Palantir - The Tech Company Reshaping Reality — 20250417" | .LockData = true' \
| curl -sf -X POST -H "X-Emby-Token: $TOK" -H 'Content-Type: application/json' \
--data @- "$SERVER_URL/Items/$ITEM" # → HTTP 204
```
Generalises to all single-file YouTube imports: drop a second file into the
channel folder before scanning, OR accept the post-import `Name`+`LockData`
override. Once the channel has ≥2 files, JF parses filenames correctly.