We should be referencing media_sources by their ID on programs,
external_ids, etc. This enables us to use proper foreign keys for
referential integrity at the DB level, not worry about unique names for
media sources, and simplifies a lot of the code relating to media source
deletion and the cleanup thereafter.
This change also introduces the DBContext, which should allow for
arbitrarily calling other DB accessor functions when within transactions
and not deadlocking the connection to the DB.
We've seen reports like
https://github.com/chrisbenincasa/tunarr/issues/550 where swagger-ui
prevents the server from starting, permanently. I haven't been able to
reproduce this yet. We've opened an issue on the plugin repo to see if
they have ideas:
https://github.com/fastify/fastify-swagger-ui/issues/156
For now, we're not really in need of this anyway, so just remove it.
I've also updated a bunch of deps and shimmed in the "DOM" types in our
tsconfig since there are lots of errors when compiling during the lib
check phase for things like esbuild, vitest.
* Checkpoint - dynamic channels
* Yet another checkpoint
* Bump versions - makes a ton of stuff work magically; needed a patch for ts-essentials because of https://github.com/ts-essentials/ts-essentials/issues/381
* Checkpointing
* Checkpoint