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:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user