import io
from os import unlink
-from tempfile import NamedTemporaryFile
from django.db import models
from django.utils.translation import gettext_lazy as _
from django.template import Template, Context
{
"author": ', '.join((a['name'] for a in audiobook.book['authors'])),
"title": title,
- "part": (audiobook.youtube_volume or audiobook.part_name).strip(),
+ "part": (audiobook.youtube_volume or audiobook.part_name).strip() if audiobook.youtube_volume_count > 1 else '',
},
lambda name: Font.objects.get(name=name).truetype.path
)