Commit Graph

11 Commits

Author SHA1 Message Date
Christian Benincasa
769b05d201 refactor: add media_source_id to relevant entities (#1106)
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.
2025-02-28 15:53:29 -05:00
Christian Benincasa
cd2a6df5d5 refactor: define schemas in Drizzle ORM (#1097)
This will hopefully make for simpler migrations
2025-02-18 11:26:49 -05:00
Christian Benincasa
c6df9e3bc0 refactor: execute database migrations by creating separate DB copy (#1100) 2025-02-17 16:08:27 -05:00
Christian Benincasa
a15e55e3e4 chore: dep cleanup and some random fixes; more bun 2025-01-30 12:03:31 -05:00
Christian Benincasa
c9c3130d70 refactor: use bun for runtime and packaging (#1063) 2025-01-29 13:42:34 -05:00
Christian Benincasa
db97e574c5 fix: properly create tunarr database directory on first run 2025-01-25 15:29:19 -05:00
Christian Benincasa
c192ec1c1b refactor: introduce inversify to server (#1059) 2025-01-22 15:02:48 -05:00
Christian Benincasa
86cdb721da refactor: massive backend refactoring (#965)
* refactor: massive backend refactoring

I've been putting off this refactor for a while, but now that the
mikro-orm removal and ffmpeg builder PRs are in, it is time.

* refactor: use ts import paths on server
2024-11-19 10:26:20 -05:00
Christian Benincasa
16220cc98d feat: ffmpeg pipeline builder overhaul (#829) 2024-11-14 13:51:58 -05:00
Christian Benincasa
d8b8e09d00 fix: resolve Jellyfin items when underlying file changes (#933)
Jellyfin item IDs are not stable. When the underlying file changes in
Jellyfin, apparently even if this file has the same path, Jellyfin will
regenerate the ID. An example of this is when an upgrade occurs to a
file from an *arr suite program. We can use existing IMDB/TMDB/TVDB IDs
we found when initially saving the item to search Jellyfin and find its
replacement. This is done on-the-fly when attempting to stream an item
that is subsequently not found.
2024-11-08 15:59:19 -05:00
Christian Benincasa
8a34af456b refactor: cleanup CLI command structure (#927) 2024-11-02 10:13:40 -04:00