- if set(series.values_list('index', flat=True)) != set(range(1, audiobook.parts_count + 1)):
- alerts.append(_('Part indexes are not 1..%(parts_count)d.') % {"parts_count": audiobook.parts_count})
+ 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)