from django.utils.translation import gettext_lazy as _
from django.template import Template, Context
from apiclient import youtube_call
from django.utils.translation import gettext_lazy as _
from django.template import Template, Context
from apiclient import youtube_call
verbose_name_plural = _("YouTube configurations")
def get_context(self, audiobook):
verbose_name_plural = _("YouTube configurations")
def get_context(self, audiobook):
def get_description(self, audiobook):
return Template(self.description_template).render(self.get_context(audiobook))
def get_description(self, audiobook):
return Template(self.description_template).render(self.get_context(audiobook))
title=self.get_title(audiobook),
description=self.get_description(audiobook),
categoryId=self.category,
title=self.get_title(audiobook),
description=self.get_description(audiobook),
categoryId=self.category,
part = ",".join(data.keys())
with open(path, "rb") as f:
part = ",".join(data.keys())
with open(path, "rb") as f:
data['id'] = audiobook.youtube_id
part = ",".join(data.keys())
youtube_call(
data['id'] = audiobook.youtube_id
part = ",".join(data.keys())
youtube_call(
- files.append(self.intro_flac.path)
- files.append(input_path)
+ files.append(standardize_audio(self.intro_flac.path))
+ files.append(standardize_audio(input_path, cache=False))