m3u modifications so streams are identified by hash, configurable, also streams now have channel_groups instead of a string for groups

This commit is contained in:
dekzter 2025-03-19 16:35:49 -04:00
parent 86a0e5b741
commit 8cdf9a40cf
18 changed files with 347 additions and 34 deletions

View file

@ -142,6 +142,7 @@ class StreamProfile(models.Model):
DEFAULT_USER_AGENT_KEY= slugify("Default User-Agent")
DEFAULT_STREAM_PROFILE_KEY = slugify("Default Stream Profile")
STREAM_HASH_KEY = slugify("M3U Hash Key")
class CoreSettings(models.Model):
key = models.CharField(
@ -166,3 +167,7 @@ class CoreSettings(models.Model):
@classmethod
def get_default_stream_profile_id(cls):
return cls.objects.get(key=DEFAULT_STREAM_PROFILE_KEY).value
@classmethod
def get_m3u_hash_key(cls):
return cls.objects.get(key=STREAM_HASH_KEY).value