2020-04-15 20:29:59 +02:00
|
|
|
from django.db import models
|
|
|
|
|
|
|
|
# Create your models here.
|
|
|
|
|
2020-04-23 21:08:39 +02:00
|
|
|
from rtmp.models import Stream
|
2020-04-20 14:51:44 +02:00
|
|
|
|
2020-04-15 20:29:59 +02:00
|
|
|
|
|
|
|
class RestreamConfig(models.Model):
|
2020-04-23 21:08:39 +02:00
|
|
|
stream = models.ForeignKey(Stream, on_delete=models.CASCADE)
|
2020-04-15 20:29:59 +02:00
|
|
|
target = models.CharField(max_length=500)
|
|
|
|
name = models.CharField(max_length=100)
|
|
|
|
active = models.BooleanField()
|
|
|
|
|
2020-04-29 18:48:23 +02:00
|
|
|
def class_name(self):
|
|
|
|
return self.__class__.__name__
|
|
|
|
|
2020-04-15 20:29:59 +02:00
|
|
|
def __str__(self):
|
2020-04-23 21:08:39 +02:00
|
|
|
return '{} to {}'.format(self.stream, self.name)
|