From 1bc5dc889e3183ef05f3a5e88fa0fbf78c9d73d1 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Stefan=20K=C3=B6gl?= Date: Wed, 10 Sep 2014 13:08:33 +0000 Subject: [PATCH] [API] handle Podcast groups in OPML --- mygpo/api/opml.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/mygpo/api/opml.py b/mygpo/api/opml.py index 1445f224..2ee6d422 100644 --- a/mygpo/api/opml.py +++ b/mygpo/api/opml.py @@ -99,10 +99,16 @@ class Exporter(object): def create_outline(channel): from mygpo.subscriptions.models import SubscribedPodcast + from mygpo.podcasts.models import PodcastGroup if isinstance(channel, SubscribedPodcast): title = channel.podcast.title description = channel.podcast.description url = channel.ref_url + elif isinstance(channel, PodcastGroup): + title = channel.title + podcast = channel.podcast_set.first() + description = podcast.description + url = podcast.url else: title = channel.title description = channel.description -- 2.11.4.GIT