add plex network metadata (#2085)

* initial plumbing

* scan for plex networks

* save network contents to db as tags

* eliminate network tag id churn

* add network and show_network to search index

* update last networks scan

* show networks on tv show page

* update changelog
This commit is contained in:
Jason Dove
2025-06-28 12:49:26 +00:00
committed by GitHub
parent 583cbf7b14
commit 0f795e4e2f
42 changed files with 24134 additions and 33 deletions
@@ -136,6 +136,17 @@ public class TelevisionRepository : ITelevisionRepository
.ToListAsync();
}
public async Task<List<int>> GetEpisodeIdsForShow(int showId)
{
await using TvContext dbContext = await _dbContextFactory.CreateDbContextAsync();
return (await dbContext.Connection.QueryAsync<int>(
@"SELECT Episode.Id FROM `Show`
INNER JOIN Season ON Season.ShowId = `Show`.Id
INNER JOIN Episode ON Episode.SeasonId = Season.Id
WHERE `Show`.Id = @ShowId",
new { ShowId = showId })).ToList();
}
public async Task<List<Season>> GetAllSeasons()
{
await using TvContext dbContext = await _dbContextFactory.CreateDbContextAsync();