0.2.48 - Tv calender fixes

This commit is contained in:
ponzischeme89
2026-08-11 12:08:51 +12:00
parent dd2dd497f2
commit f46d6596c5
47 changed files with 3415 additions and 125 deletions
+7 -5
View File
@@ -279,9 +279,10 @@ func (s *Store) LibraryGenres(
// practice — to the Emby series the library holds, so a card built from that catalogue
// can open the show's own page. Year is 0 when Emby does not know it.
type SeriesRef struct {
ID string
Name string
Year int
ID string
Name string
Year int
LogoTag string
}
// SeriesRefs lists every imported series. The catalogue is a household's, not a
@@ -289,7 +290,8 @@ type SeriesRef struct {
// all rather than querying per title.
func (s *Store) SeriesRefs(ctx context.Context) ([]SeriesRef, error) {
rows, err := s.pool.Query(ctx, `
SELECT id, name, COALESCE(production_year, 0)
SELECT id, name, COALESCE(production_year, 0),
COALESCE(payload->'ImageTags'->>'Logo', '')
FROM library_items
WHERE type = 'Series'`)
if err != nil {
@@ -299,7 +301,7 @@ func (s *Store) SeriesRefs(ctx context.Context) ([]SeriesRef, error) {
out := []SeriesRef{}
for rows.Next() {
var ref SeriesRef
if err := rows.Scan(&ref.ID, &ref.Name, &ref.Year); err != nil {
if err := rows.Scan(&ref.ID, &ref.Name, &ref.Year, &ref.LogoTag); err != nil {
return nil, err
}
out = append(out, ref)