+ alerts = []
+ parts_count = audiobook.parts_count
+ if parts_count > 1:
+ series = models.Audiobook.objects.filter(slug=audiobook.slug)
+ if not audiobook.index:
+ alerts.append(_('There is more than one part, but index is not set.'))
+ if set(series.values_list('index', flat=True)) != set(range(1, parts_count + 1)):
+ alerts.append(_('Part indexes are not 1..%(parts_count)d.') % {"parts_count": parts_count})
+
+ from youtube.models import YouTube
+ youtube = YouTube.objects.first()
+ youtube_title = youtube.get_title(audiobook)
+ youtube_description = youtube.get_description(audiobook)
+
+