From d418cd7c0680d46cfbfd9524bef093c6763dd302 Mon Sep 17 00:00:00 2001 From: dekzter Date: Thu, 27 Mar 2025 13:02:19 -0400 Subject: [PATCH] new custom properties fields for m3u and program data --- ..._programdata_custom_properties_and_more.py | 22 +++++++++++++++++++ apps/epg/models.py | 1 + .../0005_m3uaccount_custom_properties.py | 18 +++++++++++++++ apps/m3u/models.py | 1 + 4 files changed, 42 insertions(+) create mode 100644 apps/epg/migrations/0005_programdata_custom_properties_and_more.py create mode 100644 apps/m3u/migrations/0005_m3uaccount_custom_properties.py diff --git a/apps/epg/migrations/0005_programdata_custom_properties_and_more.py b/apps/epg/migrations/0005_programdata_custom_properties_and_more.py new file mode 100644 index 00000000..35d8d1c3 --- /dev/null +++ b/apps/epg/migrations/0005_programdata_custom_properties_and_more.py @@ -0,0 +1,22 @@ +# Generated by Django 5.1.6 on 2025-03-27 17:01 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('epg', '0004_epgdata_epg_source_alter_epgdata_tvg_id'), + ] + + operations = [ + migrations.AddField( + model_name='programdata', + name='custom_properties', + field=models.TextField(blank=True, null=True), + ), + migrations.AlterUniqueTogether( + name='epgdata', + unique_together={('tvg_id', 'epg_source')}, + ), + ] diff --git a/apps/epg/models.py b/apps/epg/models.py index e5bac55f..c98e2d2b 100644 --- a/apps/epg/models.py +++ b/apps/epg/models.py @@ -44,6 +44,7 @@ class ProgramData(models.Model): sub_title = models.CharField(max_length=255, blank=True, null=True) description = models.TextField(blank=True, null=True) tvg_id = models.CharField(max_length=255, null=True, blank=True) + custom_properties = models.TextField(null=True, blank=True) def __str__(self): return f"{self.title} ({self.start_time} - {self.end_time})" diff --git a/apps/m3u/migrations/0005_m3uaccount_custom_properties.py b/apps/m3u/migrations/0005_m3uaccount_custom_properties.py new file mode 100644 index 00000000..587a3496 --- /dev/null +++ b/apps/m3u/migrations/0005_m3uaccount_custom_properties.py @@ -0,0 +1,18 @@ +# Generated by Django 5.1.6 on 2025-03-27 17:01 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('m3u', '0004_m3uaccount_stream_profile'), + ] + + operations = [ + migrations.AddField( + model_name='m3uaccount', + name='custom_properties', + field=models.TextField(blank=True, null=True), + ), + ] diff --git a/apps/m3u/models.py b/apps/m3u/models.py index 773261df..18e21e0b 100644 --- a/apps/m3u/models.py +++ b/apps/m3u/models.py @@ -67,6 +67,7 @@ class M3UAccount(models.Model): blank=True, related_name='m3u_accounts' ) + custom_properties = models.TextField(null=True, blank=True) def __str__(self): return self.name