diff --git a/main.py b/main.py index d5802c7..fb3f06e 100644 --- a/main.py +++ b/main.py @@ -148,13 +148,18 @@ class gPotherSide: podcasts = self._get_podcasts_sorted() return [self.convert_podcast(podcast) for podcast in podcasts] + def _get_subtitle(self, episode): + for line in util.remove_html_tags(episode.subtitle).strip().splitlines(): + return line + return '' + def convert_episode(self, episode): now = datetime.datetime.now() tnow = time.time() return { 'id': episode.id, 'title': episode.trimmed_title, - 'subtitle': episode.subtitle, + 'subtitle': self._get_subtitle(episode), 'progress': episode.download_progress(), 'downloadState': episode.state, 'isNew': episode.is_new, diff --git a/touch/EpisodeItem.qml b/touch/EpisodeItem.qml index 60671ab..8e28d15 100644 --- a/touch/EpisodeItem.qml +++ b/touch/EpisodeItem.qml @@ -231,6 +231,7 @@ Item { } text: subtitle + textFormat: Text.PlainText font.pixelSize: 20 * pgst.scalef visible: subtitle !== ''