Files
root f56b088643
Base Image Build / prepare (push) Has been cancelled
Build and Push Multi-Arch Docker Image / build-and-push (push) Has been cancelled
Frontend Tests / test (push) Has been cancelled
Base Image Build / docker (amd64, ubuntu-24.04) (push) Has been cancelled
Base Image Build / docker (arm64, ubuntu-24.04-arm) (push) Has been cancelled
Base Image Build / create-manifest (push) Has been cancelled
Proyecto LCX Dispatcharr multicuenta
2026-05-09 21:24:50 +02:00

20 lines
698 B
Python

from django.contrib import admin
from .models import EPGSource, ProgramData
@admin.register(EPGSource)
class EPGSourceAdmin(admin.ModelAdmin):
list_display = ['name', 'source_type', 'is_active']
list_filter = ['source_type', 'is_active']
search_fields = ['name']
@admin.register(ProgramData)
class ProgramAdmin(admin.ModelAdmin):
list_display = ['title', 'get_epg_tvg_id', 'start_time', 'end_time']
list_filter = ['epg__tvg_id', 'tvg_id']
search_fields = ['title', 'epg__name']
def get_epg_tvg_id(self, obj):
return obj.epg.tvg_id if obj.epg else ''
get_epg_tvg_id.short_description = 'Channel TVG ID'
get_epg_tvg_id.admin_order_field = 'epg__tvg_id'