Fix.
[audio.git] / src / youtube / models.py
index 576bf49..e6a24ce 100644 (file)
@@ -5,6 +5,7 @@ from django.db import models
 from django.utils.translation import gettext_lazy as _
 from django.template import Template, Context
 from apiclient import youtube_call
+from archive.settings import LICENSE, LICENSE_NAME
 from .utils import (
     concat_audio,
     concat_videos,
@@ -42,7 +43,11 @@ class YouTube(models.Model):
         verbose_name_plural = _("YouTube configurations")
 
     def get_context(self, audiobook):
-        return Context(dict(audiobook=audiobook))
+        return Context(dict(
+            audiobook=audiobook,
+            LICENSE=LICENSE,
+            LICENSE_NAME=LICENSE_NAME,
+        ))
 
     def get_description(self, audiobook):
         return Template(self.description_template).render(self.get_context(audiobook))