All three were found by running the thing rather than reading it, and the first one is serious. 1. probeable() compared the LIBRARY kind against a hardcoded list. Splitting video into movies/tv/adult/hentai left every new kind out of that list, so a movies or tv library was never probed and stored no codec facts at all. With no facts, resolve cannot tell an unplayable file from a playable one: an HEVC file reported "playable via html5" for a browser that cannot decode HEVC, and transcoding would never have triggered for anything. It now tests the kind the rows carry, through library.ItemKindFor, so every video library is probed exactly as the original video kind was and a future video kind cannot repeat this. 2. jellyfin CollectionType() had no case for the new kinds, so a Jellyfin client saw movies, tv, adult and hentai libraries with no collection type. 3. kindNoun() fell through to its default for the new kinds, which reads "tv" in a sentence rather than "shows". Also hardened the empty-kind fallback in upsertItem to resolve through ItemKindFor, so it cannot store a library's own name where 'video' belongs. Verified end-to-end: codec facts are recorded again (v=h264 and v=hevc), an h264 file resolves to engine html5, and the HEVC file resolves to engine transcode. That last line is the whole feature working: scan records the facts, resolve sees the browser cannot decode it, and the server offers to re-encode it instead of saying the file is unplayable. |
||
|---|---|---|
| .. | ||
| discover.go | ||
| discover_test.go | ||
| home.go | ||
| home_test.go | ||